question

Drake M avatar image
0 Likes"
Drake M asked Phil BoBo edited

How to reference object inside current object

Hi,

I'm currently developing a TaskExecutor Process flow, in which the linked taskexecutor has other objects within it in the model tree. If I wanted to reference those objects, how would I go about doing that through current instead of Model.find? Would it just be as simple as Model.find("current/Processor") instead of Model.find("TaskExecutor/Processor")? Thank you for your help!

FlexSim 20.1.0
process flowtaskexecutormodel treeprocess flow resourcestask executor process flow
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

Brandon Peterson avatar image
1 Like"
Brandon Peterson answered Phil BoBo edited

@Drake M

myTaskExecuter.subnodes[1] will get you the first object inside of the TaskExecuter.

myTaskExecuter.subnodes.length will get you the number of objects inside of the TaskExecuter.

If current is the TaskExecuter then you can just use current.subnodes[1] for the first object.

· 1
5 |100000

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

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

Also, if you want to reference them by name, just start from current instead of Model:

current.find("/Processor")
3 Likes 3 ·