In process flow, how to use activity name to retrieve table value?

In process flow, how to use activity name to retrieve table value?

jingyong_p
Not applicable
600 Views
6 Replies
Message 1 of 7

In process flow, how to use activity name to retrieve table value?

jingyong_p
Not applicable

[ FlexSim 21.0.2 ]

Imaging I have many operation steps (delay function in process flow), Each operation will be named as A1, A2, .A3......

How can I use the process name to do global table search?

It is easy if just only few steps in the process. but not very efficient if I have many steps.

Will be the same if I use Performance measure table?

Thank you

example.fsm36508-1612462586341.png

0 Likes
Accepted solutions (1)
601 Views
6 Replies
Replies (6)
Message 2 of 7

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

Just enter:

activity.name
0 Likes
Message 3 of 7

jingyong_p
Not applicable

Thank you.

0 Likes
Message 4 of 7

jpanY7K8B
Contributor
Contributor

How to access a "Resource" name "? I tried below, not working. Thank you

jpanY7K8B_0-1755826059749.png

 

0 Likes
Message 5 of 7

FelixMoehlmann
Collaborator
Collaborator

"activity" is a null value in the Count field for some reason. Use "resource.name" instead.

To check this I placed a breakpoint in the code (open code editor with scroll icon) and checked what values are assigned to the header variables (the code is executed on model reset).

moehlmann_fe_0-1755844414904.png

 

0 Likes
Message 6 of 7

jpanY7K8B
Contributor
Contributor

@FelixMoehlmann Thank you so much. "resource.name" works. 

 

similar question: how can I use the similar code to get the container's name? apparently,  "container.name" does not work.  

 

 

jpanY7K8B_2-1755845563114.png

 

 

 

0 Likes
Message 7 of 7

FelixMoehlmann
Collaborator
Collaborator

That would be the following:

ownerobject(getvarnode(activity, "container").subnodes[1].value).name

With "getvarnode(...).subnodes[1]" we start at the activity node and get the variables node that contains the link to the container. ".value" follows the pointer to the link node in the container's attribute tree. "ownerobject()" traverse up in the hirarchy until it finds an object node. Which is the container in this case.

moehlmann_fe_0-1755846683880.png