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.

Object path = Model.find("AGVNetwork/StraightPath1");
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.

Martin K5 avatar image Martin K5 commented ·
Yes, that is exactly what I was looking for.


Thanks a lot.


Martin

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

@Felix Möhlmann @Martin K5

The preferred way of doing this is to use the Object.setProperty() method so that users don't need to search through the tree or worry about the underlying node structure. Also a lot of the new features (like Property tables) are built on top of properties.

You can find a list of available properties for each object in the user manual, for example, for AGV paths: https://docs.flexsim.com/en/21.2/Reference/3DObjects/AGV/StraightCurvedPath/StraightCurvedPath.html#properties

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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