question

royjuventus29 avatar image
1 Like"
royjuventus29 asked Jason Lightfoot answered

How to list all the properties 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
1 Like"
Jason Lightfoot answered

If you wanted to generate a list you can use something similar to this script which creates a map of the non-null properties:

Object involved=Model.find("Processor1");
Table result=Table.query("SELECT * FROM Objects() WHERE Object=$1",involved);
Map props;
Variant val;
for (int n=result.numCols;n>0;n--){
    val=result[1][n];
    if (val.type!=VAR_TYPE_NULL)
        props[result.getColHeader(n)]=val;
}


5 |100000

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

Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered

@royjuventus29 they are mentioned in the helpfile. See this link below on how to get the value of a property but it also states where you can find them:

https://docs.flexsim.com/en/23.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html#Method-getProperty

5 |100000

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

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.