question

Martin K5 avatar image
0 Likes"
Martin K5 asked Martin K5 edited

Is there a way to make AGV Paths two way by code?

Hi,

I would like to ask, if there is a way to make the AGV Paths to be in the Two way "mode" by code? I am trying to build whole model by code and I would like to make this also by code, I know how to make it by hand, so that is why I ask?

Thank you.


Martin

FlexSim 21.1.4
agvcodepathpropertytwo way
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 Matthew Gillespie commented

@Martin K5 Yes, there is.

You can use the Object.setProperty() method to set the value of the property (in general a lot of options can be set this way using code). If you are using "Model.find()" to reference the path, remember that AGV paths are not direct subnodes of the model but are placed in the "AGVNetwork" node.

  1. Object path = Model.find("AGVNetwork/StraightPath1");
  2. path.setProperty("IsTwoWay", 1);

Setting the value to 0 instead will reset the path to be one-way.

The arrow indicator on the path in the 3d model will only update on the next reset. Not immediately after you run the code.

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