How to reference object as AGV?

How to reference object as AGV?

hsamuels
Not applicable
296 Views
1 Reply
Message 1 of 2

How to reference object as AGV?

hsamuels
Not applicable

[ FlexSim 22.2.2 ]

I'd like to use some of the properties under the AGV class but don't know how to reference an object as an AGV. The objects I'm using are task executers attached to an AGV network.


Here my current code:

AGV agv1 = Model.find("TaskExecuter1");

This is the error I'm getting:

FlexScript exception: Invalid down cast. Object is not an instance of the target type.

0 Likes
Accepted solutions (1)
297 Views
1 Reply
Reply (1)
Message 2 of 2

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

You need to use the AGV() constructor:

AGV agv1 = AGV(Model.find("TaskExecuter1")); 


Matthew Gillespie
FlexSim Software Developer

0 Likes