I have an area that contains lots of locations and is connected up to lots of other areas. I would like to rename the area, but the only way I can see to do that is to change the area name on each object which will delete all the connections.
I have an area that contains lots of locations and is connected up to lots of other areas. I would like to rename the area, but the only way I can see to do that is to change the area name on each object which will delete all the connections.
Currently there isn't an easy way to do this through the interface, but here's a script you can run that will rename the area:
string oldName = "BedArea"; string newName = "MyArea"; for(int i = 1; i <= content(model()); i++) { treenode obj = rank(model(), i); if(getvarstr(obj, "AreaName") == oldName) setvarstr(obj, "AreaName", newName); } setname(node(oldName, AreasNode), newName); treenode globalVar = node(concat("MODEL:/Tools/ModelLibraries/FlexsimHC/globalvariables/", oldName)); setname(globalVar, newName); sets(first(globalVar), newName); refreshglobalvariables(); UpdateReferences(oldName, newName);
Just replace BedArea with the name of the area you want to rename and MyArea with the new name.
Thank you @Sam Stubbs. I will run the script and let you know should I encounter any issues.
Alireza
5 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved