question

Fred Kan avatar image
1 Like"
Fred Kan asked Fred Kan commented

How to access GlobalTables folder in Model tree?

Hi,

I'm trying to access the GlobalTables folder in the model tree to search through each node to inspect the table names.

I've tried using:

for (int num = 1; num <= treeLength; num++) {

currNode = model().subnodes[num];

But that doesn't go into Model>tools>GlobalTables

Does anyone know how I can direct the search to the folder that I want within the model tree?

Thank you

FlexSim 19.2.3
codetablesmodel tree
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

Jacob Gillespie avatar image
0 Likes"
Jacob Gillespie answered Fred Kan commented

Here is an example:

treenode globalTables = Model.find("Tools/GlobalTables");
for (int i = 1; i <= globalTables.subnodes.length; i++) {
	treenode globalTable = globalTables.subnodes[i];
	Table table = Table(globalTable.name);
	// Do something
}
· 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.

Fred Kan avatar image Fred Kan commented ·

That's amazing, thank you for the quick response!

0 Likes 0 ·