question

Simone F avatar image
1 Like"
Simone F asked Simone F commented

Set the robot size using a script

Hi,

I'm trying to resize a robot in my model using a script. I've tried to use the method that i generally use for all the objects:

  1. Object obj = Model.find("Robot1");
  2. double x = 0.5;
  3. double y = 0.5;
  4. double z = 0.5;
  5. obj.setSize(x, y, z);

This operation doesn't work for the robot (the values in the properties are changed but the real robot dimensions in the model aren't).There is a solution for this problem?

FlexSim 21.0.0
robotflexsim 21.0.0scriptsetsize
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

Matthew Gillespie avatar image
5 Likes"
Matthew Gillespie answered Simone F commented

You need to call applicationcommand("resizesubcomponents", obj) after changing the size.

  1. Object obj = Model.find("Robot1");
  2. double x = 0.5;
  3. double y = 0.5;
  4. double z = 0.5;
  5. obj.setSize(x, y, z);
  6. applicationcommand("resizesubcomponents", obj);


· 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.