How to access the node data value through code

How to access the node data value through code

tanmay_varshney
Not applicable
510 Views
1 Reply
Message 1 of 2

How to access the node data value through code

tanmay_varshney
Not applicable

[ FlexSim 19.0.2 ]

Hello,

I want to access the data of node type through code, how can I access.
Node type is a subnode of conveyor, where "type" node represents which conveyor type it follows

22965-capture.jpg

Actually I need to access a conveyor type from a trigger when a part flows inside the conveyor,

kindly help

0 Likes
Accepted solutions (1)
511 Views
1 Reply
Reply (1)
Message 2 of 2

tanner_p
Not applicable
Accepted solution

Hi @Trex,

Have you tried using the below function?

getvarnode(myObject, "node").value

For example, if I wanted the "maxcontent" value on a Queue like in the image below, I could use the following code.

23009-wanted-node.png

getvarnode(Model.find("Queue1"), "maxcontent").value

This line of code in the example would return 1000.00.

You didn't upload a model, but I'm assuming that if you have things set up correctly, you can read the object's type in a similar fashion, but using a trigger on an entry transfer or photo eye or something. If you post an example, I'd be happy to show you what I'm thinking could work.

0 Likes