Consultation on Node-Related Issues

Consultation on Node-Related Issues

wangyuxuangg
Observer Observer
74 Views
2 Replies
Message 1 of 3

Consultation on Node-Related Issues

wangyuxuangg
Observer
Observer

During the transportation of the model, the fluid storage tank is converted into a sub-node of a transport vehicle (e.g., TE4). However, when resetting the model, it does not automatically revert to its initial state. Currently, I use a reset trigger to reposition it back to its initial location, but the fluid storage tank remains a sub-node of TE4.
Is there a syntax to directly control which transport vehicle the fluid storage tank is a sub-node of? For example, during reset, regardless of its current parent node, can it be detached from its sub-node status or assigned to another parent node (e.g., TE1)?
If possible, please provide solutions for both approaches.

Wishing you smooth work and good health! Looking forward to your prompt reply!

 

0 Likes
Accepted solutions (1)
75 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

To get/set a node's parent node you can use the .up property.

https://docs.flexsim.com/en/25.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html...

 

To have it return to a fixed position, including the position in the tree, setting the tanks reset position in the right-click menu is the easiest option.

moehlmann_fe_0-1757328204283.png

 

Message 3 of 3

wangyuxuangg
Observer
Observer

Your answer is very helpful to me. Thank you

0 Likes