question

Arun avatar image
0 Likes"
Arun asked Arun commented

Access Object attribute tree

Hi,
Is there a way to access "Attribute tree" in code.
1721323718705.pngI tried using DOT function but no result.

br
Arun

FlexSim 24.0.2
object treenode
1721323718705.png (34.5 KiB)
5 |100000

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

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Arun commented

Many of the attributes can be accessed through the "attrs" property.

https://docs.flexsim.com/en/24.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html#Property-attrs

In a path string, entering an object's attributes is done through ">" (Model.find("Processor1>stats"), for example). See the documentation on the "find" method for more information about how to traverse the model tree.

https://docs.flexsim.com/en/24.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html#Method-find

· 5
5 |100000

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

Arun avatar image Arun commented ·

Hi Felix
Thanks for the answer

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Arun commented ·

When the node text is blue you can also use that name as a keyword, passing in the object eg:

behaviour(current)
0 Likes 0 ·
Arun avatar image Arun Jason Lightfoot ♦♦ commented ·

Hi Jason,
Can you give me a sample code so that i can build, lets say we check
1. "global instance" value = Available: size (Red Box)
2. "content" value (green box)

1721395826808.png
Test.fsm
Thanks
Arun

0 Likes 0 ·
1721395826808.png (138.7 KiB)
test.fsm (58.1 KiB)
Show more comments