How to reference all Global Tables in model?

How to reference all Global Tables in model?

kim_jh
Not applicable
8 Views
1 Reply
Message 1 of 2

How to reference all Global Tables in model?

kim_jh
Not applicable
 
Accepted solutions (1)
9 Views
1 Reply
Reply (1)
Message 2 of 2

Brandon_Peterson
Autodesk
Autodesk
Accepted solution

Kim Jh,

The global tables in a model are stored in the "GlobalTables" node inside of the Tools node of the model. The following code will print the names of all of the global tables to the output console:

treenode GlobalTables = node("/Tools/GlobalTables", model());
for(int i1 = 1; i1 <= content(GlobalTables); i1++){
	treenode temptable = rank(GlobalTables, i1);
	pr(); pt(getname(temptable));
}

Good Luck,

Brandon

img src="https://damassets.autodesk.net/content/dam/autodesk/logos/autodesk-logo-primary-rgbblack-small_forum.png" >

Brandon Peterson
Principal Technology Consultant
>