question

Jimmy jang avatar image
0 Likes"
Jimmy jang asked Jimmy jang answered

Flexsscript exception:Invalid down cast

Good day i am getting 2 types of exceptions while running the simulation.

the exception message are
1.
exception : Flexscript exception : Invaild down cast. Object is not an instance of the target type. at MODEL:/Tools/ProcessFlow/Stop
2.

exception : Flexscript exception : Invaild down cast. Object is not an instance of the target type. at MODEL:/Tools/ProcessFlow/ Resume

Both Stop and Resume are used Custom Code -> Stop/Resume Item on Conveyor

Please help solve the problem.

sorry that i can not upload my model.
if you need more information please let me know.


FlexSim 24.1.1
exception
5 |100000

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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

Most likely the item you are trying to stop/resume is not on a conveyor when the code is executed. Inside the code the object that the item is currently in is cast as a conveyor class object. This will fail and prompt the error message if the object does not belong to that class.

· 4
5 |100000

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

Jimmy jang avatar image
0 Likes"
Jimmy jang answered

Thank you the problem has been solved. It has been a great help!!

Thank you again for your prompt reply

5 |100000

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