ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 08-07-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default Rename network paths

The network paths are currently named when they are created (connecting nodes). If you rename the nodes, the paths don't get updated, so this script will go through the model and renames all the path names such that paths to NN1 are called "To /NN1". Furthermore, it uses the model path, so you can see the containers in which the nodes reside: "To /Factory/Cell1/NNxx"


Code:
forobjecttreeunder(model())
   if (isclasstype(a,CLASSTYPE_NETWORKNODE))
        for (treenode path=first(connectionsout(a));objectexists(path);path=next(path))
              setname(path,concat("To ",nodetomodelpath(ownerobject(tonode(get(path))),1)));

Last edited by Jason Lightfoot; 08-07-2011 at 05:36 PM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Kris Geisberger (06-27-2013)


Thread Thread Starter Forum Replies Last Post
Network Nodes Rachid Kolfin Q&A 14 02-03-2011 08:34 PM
Batch object rename KelvinHo Q&A 3 02-05-2010 01:30 AM
Setting relative paths michaelsmith Q&A 1 02-02-2010 09:17 AM
Things I like about v4.3 (autocompletion, billboards, shortcuts, relative media paths, code editor) Tom David Gripes and Goodies 1 03-28-2008 02:34 AM
Expertfit cannot find network key - Flexsim Network License Kris Geisberger Q&A 0 02-05-2008 05:10 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.