question

royjuventus29 avatar image
1 Like"
royjuventus29 asked Jason Lightfoot edited

How to get the classname of an object in flexsim script

FlexSim 24.0.1
flexsim script
5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

It depends on the purpose for which you want the name. If you're using Object.create() to create an instance you'll want the class returned from getProperty(). For example:

Object o=Model.find("ControlPoint1");
return o.getProperty("Class");    // returns  "AGV::ControlPoint"
5 |100000

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

Dj Moens avatar image
0 Likes"
Dj Moens answered

Object objectref = so();
return classobject(objectref).name;

5 |100000

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