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

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

martin_k5
Not applicable
35 Views
3 Replies
Message 1 of 4

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

martin_k5
Not applicable

[ FlexSim 21.1.4 ]

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

0 Likes
Accepted solutions (1)
36 Views
3 Replies
Replies (3)
Message 2 of 4

moehlmann_fe
Observer
Observer
Accepted solution

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

0 Likes
Message 3 of 4

martin_k5
Not applicable
Yes, that is exactly what I was looking for.


Thanks a lot.


Martin

0 Likes
Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk

@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#...



Matthew Gillespie
FlexSim Software Developer

0 Likes