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
|
|||
|
|||
automatically connecting network nodes
Hello,
I have written the following script, based on what I have already read on the forum. Code:
treenode nnobj=node("/NetworkNode", library); treenode tnode1; treenode tnode2; tnode1 = createcopy(nnobj, model()); setname(tnode1, "test1"); setloc(tnode1, 0,1,0); tnode2 = createcopy(nnobj, model()); setname(tnode2, "test2"); setloc(tnode2, 0,4,3); contextdragconnection(tnode1, tnode2 , "A"); Thanks Albert |
#2
|
|||
|
|||
Hi Albert,
use createinstance() instead of createcopy(). Best, Jens |
The Following User Says Thank You to Jens Mühlheimer For This Useful Post: | ||
Albert Munoz (05-16-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
Flexscript question (network nodes and splines) | ericdaoust | Q&A | 5 | 10-21-2013 10:03 AM |
Trouble with network nodes | Bill Lank | Q&A | 2 | 05-11-2012 09:49 AM |
Connecting Network Node to Flowitem | ericdaoust | Q&A | 2 | 01-06-2012 10:45 AM |
Network Nodes | Rachid Kolfin | Q&A | 14 | 02-03-2011 08:34 PM |
Connecting network nodes in different containers | KelvinHo | Q&A | 1 | 05-28-2008 06:49 AM |