How to move many objects by the number I input

How to move many objects by the number I input

MJ_Kang
Not applicable
17 Views
6 Replies
Message 1 of 7

How to move many objects by the number I input

MJ_Kang
Not applicable

[ FlexSim 24.2.1 ]

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?

0 Likes
Accepted solutions (1)
18 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Observer
Observer
Accepted solution

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.

0 Likes
Message 3 of 7

MJ_Kang
Not applicable

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
Message 4 of 7

moehlmann_fe
Observer
Observer

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.location += offsetVector; }
0 Likes
Message 5 of 7

MJ_Kang
Not applicable

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
Message 6 of 7

moehlmann_fe
Observer
Observer
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
Message 7 of 7

MJ_Kang
Not applicable

Thank you so much for your answer 😄

0 Likes