How to add a tracked variable label using code?

How to add a tracked variable label using code?

arunTTT2P
Enthusiast Enthusiast
104 Views
2 Replies
Message 1 of 3

How to add a tracked variable label using code?

arunTTT2P
Enthusiast
Enthusiast

[ FlexSim 17.2.2 ]

Hi,

Is it possible to add a tracked variable label to an object using code?

Regards,

Arun KR

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

arunTTT2P
Enthusiast
Enthusiast
Accepted solution

Hi,

I managed to do it. The code is given below.

Object Queue = model().find("Queue1");//Object in which the tracked variable is made
treenode tv = labels(Queue).subnodes.add();
tv.name = "Model";
TrackedVariable.init(tv, STAT_TYPE_LEVEL, 0);

Regards,

Arun KR

Message 3 of 3

joerg_vogel_HsH
Mentor
Mentor
treenode tv = Queue.labels.assert("Model");// alternative dot syntax