question

Fu P avatar image
0 Likes"
Fu P asked Fu P commented

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

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

BEFORE:

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


AFTER:


FlexSim 19.2.4
flexsim 19.2.4global tablesauto connection
1604831359331.png (152.5 KiB)
1604831494209.png (25.7 KiB)
1604836509053.png (232.0 KiB)
1604836581977.png (7.8 KiB)
1604836607423.png (43.8 KiB)
1604836720605.png (18.5 KiB)
5 |100000

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

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Fu P commented

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.

  1. 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.

  1. Object posobj=Model.find("Source1");
  2. double y=posobj.location.y;  //align in y
  3. double margin=0.2;
  4. double x=posobj.size.x+posobj.location.x+margin;
  5. while (posobj.outObjects.length>0){
  6.     posobj=posobj.outObjects[1];
  7.     posobj.location.x=x;
  8.     posobj.location.y=y;
  9.     x+=posobj.size.x+margin;
  10. }





· 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.