Move Global Table to different subfolder

Move Global Table to different subfolder

nmzenke
Enthusiast Enthusiast
66 Views
4 Replies
Message 1 of 5

Move Global Table to different subfolder

nmzenke
Enthusiast
Enthusiast

[ FlexSim 23.2.2 ]

I'd like to use flexscript to move a global table to another folder. For example, move GlobalTable2 from TestFolder to DestFolder. Is there a clean way to do this?


1718205289294.png

0 Likes
Accepted solutions (1)
67 Views
4 Replies
Replies (4)
Message 2 of 5

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

You need to do this in a different part of the tree:

treenode ToolboxGTs=Model.find("Tools/Toolbox/GlobalTables");
ToolboxGTs.find("TestFolder/1").up=ToolboxGTs.find("DestFolder");
Message 3 of 5

nmzenke
Enthusiast
Enthusiast

Awesome thanks! Follow-up question....If the global table isn't in a folder already how does the code change if I want to insert it into the DestFolder? I tried a few things but they are throwing errors


1718225779666.png


0 Likes
Message 4 of 5

jason_lightfootVL7B4
Autodesk
Autodesk
ToolboxGTs.find("DestFolder").subnodes.add().value=ownerobject(Table("GlobalTable1")); 
Message 5 of 5

nmzenke
Enthusiast
Enthusiast
Thanks!
0 Likes