question

MJ_Kang avatar image
0 Likes"
MJ_Kang asked MJ_Kang commented

How to move many objects by the number I input

As I said in the question, I want to move multiple objects (conveyors, AGVs, etc.) in total along the X or Y axis by the amount I want.

Is there a way to select multiple objects using Shift + Drag and then move them by entering numeric values instead of moving the mouse?

FlexSim 24.2.1
moveobjects
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered MJ_Kang commented

You can move all of the object into a plane (from the "Edit Selected Objects" window found under "View") and then move that plane by changing its coordinates.

Or you add all of the objects to a group and adjust their position in code by looping though the group and incrementing the coordinates of each object.

· 5
5 |100000

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

MJ_Kang avatar image MJ_Kang commented ·

1.

Where is the option to input numbers in "Edit Selected Objects"?

I was able to find "Rotate" and "Flip", but I can't find Move.캡처.jpg


2.

I'm new to Flexsim, where should I write the code and what code should I put in it?

I found the following code in the help, how do I change it?

Group queues = Group("Queues");for (int i = 1; i <= queues.length; i++) queues[i].setProperty("MaxContent", 5);

0 Likes 0 ·
캡처.jpg (28.6 KiB)
Felix Möhlmann avatar image Felix Möhlmann MJ_Kang commented ·

You use the "Edit Selected Objects" window to move the selected items into a plane. (Have the plane selected (yellow outline), then the "Move into Model" button at the top will change to "Move into highlighted"). Then you move the plane as normal through the properties window.

The code could look like below:

Group objects = Group("Group1");
Vec3 offsetVector = Vec3(1, 1, 0); for(int i = 1; i <= objects.length; i++) {     objects[i].location += offsetVector; }
0 Likes 0 ·
MJ_Kang avatar image MJ_Kang commented ·

Thank you so much for your answer.


I have one last question.


If I work with "Edit Selected Objects", all objects are assigned to "Plane". Is there a good way to unassign this?


When I delete "Plane" and try to draw it again, I get this error message.

캡처.jpg

0 Likes 0 ·
캡처.jpg (98.3 KiB)
Felix Möhlmann avatar image Felix Möhlmann MJ_Kang commented ·
Deselect the plane (click on an empty spot in the model) while still having all objects inside it selected (red outline). Click the "Move into Model" button. You should then be able to delete the plane without issues.
0 Likes 0 ·
MJ_Kang avatar image MJ_Kang Felix Möhlmann commented ·

Thank you so much for your answer :D

0 Likes 0 ·