question

Bryan Suharik avatar image
0 Likes"
Bryan Suharik asked Phil BoBo answered

Network Node and Virtual Distance

Hello,

i'm trying to change the virtual distance from my flexscript.

I'm using the setnodenum command, but i'm missing something.

createinstance(node("/travelnetworks/NetworkNode",library),model());
treenode NN = last(model());
setloc(NN,-15,40,0);
treenode Dist = node(">connections/connectionsout/To NN2/userDistance",NN);
setnodenum(Dist,143232);

Thanks in advance for any help you can provide!

FlexSim 16.2.2
codenetwork nodesvirtual distance
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

The first part creates an instance of the node. The second part references another node relatively, but the node "NN" hasn't been connected to NN2 by any function before. Can you please connect the inserted node NN before you try to set a virtual distance. Or can you ask a Question how to build a network by code? Thx.

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.