Can I use global table to auto connect my production line?

Can I use global table to auto connect my production line?

iamfph
Not applicable
584 Views
2 Replies
Message 1 of 3

Can I use global table to auto connect my production line?

iamfph
Not applicable

[ FlexSim 19.2.4 ]

I'm randomly dragging Fixed Resources I need ,and I bulit a global table

BEFORE:34005-1604831359331.png

33984-1604831494209.png

34007-1604836607423.png

Is it possile to make connections between fixed resources and global table to auto connect fixed resources?

Cause I have to add new nodes in connectsin&connectionsout , I don't know how to do it


33993-1604836720605.png

AFTER:

33985-1604836509053.png


0 Likes
Accepted solutions (1)
585 Views
2 Replies
Replies (2)
Message 2 of 3

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

I'm not sure from your post if you want just to make the connections from a line definition that is stored in the global table, or if you want to alter the layout too.

This will do the connections.

contextdragconnecion(<fromobj>,<toobj>,"A");

If you want to align them just create a loop and set each object's x location to that of the predecessor plus that object's x size plus a margin.

Object posobj=Model.find("Source1");
double y=posobj.location.y;  //align in y
double margin=0.2;
double x=posobj.size.x+posobj.location.x+margin;
while (posobj.outObjects.length>0){
    posobj=posobj.outObjects[1];
    posobj.location.x=x;
    posobj.location.y=y;
    x+=posobj.size.x+margin;
}





0 Likes
Message 3 of 3

iamfph
Not applicable

Thank you for your reply , I just want to make the connections from a line definition as well as arrange their positions from x\y\z in my global table.

My intention is to create a GUI where I can import different tables ;each table has the information I need to auto connect&arrange my fixed resources

0 Likes