question

len zm avatar image
0 Likes"
len zm asked Jeanette F commented

importing objects

I have a machine built on a model and i want to take to a new model when i copy and then paste it to the new model a lot of parts are missing , how i can save built machines and then use it in new model? also if i want to size up or down a machine with many components how can i do it in one time without having to deal with each components a lone? also, there are some bin items that were build in an old model like pill bottle without a cap when i open a model it does not show it also when i copy its 3D code it just create a box so how can i also import these without the need of building them from scratch?

FlexSim 22.2.1
objects3dshapeimporting
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @len zm, was Jeanette F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jeanette F avatar image
0 Likes"
Jeanette F answered Jeanette F commented

You could place everything into a plane using the Edit Selected Objects pane. 1662570894322.png

You can then copy the plane and paste it in your new model.

From there you could use a code to resize everything. The following code is resizing from feet to inches

Object plane = Model.find("Plane1");
double x =0;
double y =0;
double z =0;
for(int i =1; i<= plane.subnodes.length; i++){
x = plane.subnodes[i].as(Object).size.x;
y = plane.subnodes[i].as(Object).size.y;
z = plane.subnodes[i].as(Object).size.z;
plane.subnodes[i].as(Object).setSize(x/12,y/12,z/12);
}

For yourcustom flowitem I am not entirely sure how to move it. I know in the profram file for our software you can find more 3D shapes and one of them is an empty pill bottle so you could load that in. You will find it by going to your c drive-> program files-> FlexSim 2022 Update 2 -> fs3d -> Bottles.

You may also find a Custom user Library to be useful for exporting objects and importing them to new models


1662570894322.png (141.5 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

len zm avatar image len zm commented ·
where should i write the code?
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ len zm commented ·

In a script window.

1662668639111.png

1 Like 1 ·
1662668639111.png (18.4 KiB)