ATTENTIONThis 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 |
#1
|
|||
|
|||
does so() refer to switch_selected() ?
why does this not work the way i want it to? create multiple racks, reference any of them and try to use contextdragconnection() to connect them. it will "select" the rack node i reference, but it seems like so() does not refer to it.
attached is a screenshot that will clarify what i'm talking about. (in this particular model, it would connect rack1 for some reason even tho rack3 was "selected). treenode ss1 = node("/Rack3",model()); treenode qq = node("/Queue5",model()); switch_selected(ss1,1); contextdragconnection(so(),qq,"A"); my goal is to be able to select MULTIPLE objects (all 3 racks) and connect them to another object (such as a queue or NN), using contextdragconnection(). using switch_selected() will "select" all the objects, but i'm not sure if so() references all the selected objects...am i using the wrong command? |
#2
|
||||
|
||||
so() refers to the object that was designated by the right click option Edit > Designate This Node (so). It does not refer to whether an object is selected in a red bounding box.
contextdragconnection() connects one object to one other object. You can use the groupconnectto() and groupconnectfrom() commands to connect one object to/from every selected object in the model. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Gi Cha (08-23-2010) |