question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Julie Weller commented

Conveyor entry /exit transfer generic code?

Hi Team,

I would like to know if there is any generic code available to get entry/exit transfer of conveyor. It will speed up the process using copy/paste from one conveyor to another conveyor object of same type.

For example: We can get any in object reference using current.inObjects[1].

Thank you!

FlexSim 23.1.0
conveyorcodeentry transfergeneric
· 2
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 Jason Lightfoot edited

I've already sent in a request to be able to find references to conveyors from conveyor transfer objects using a supported api/class/method strucure.

At the moment you need look through the conveyorPoints and determine which points your might be interested in - the conveyorPoints includes references to decisionPoints, photoeyes, stations, inline and side transfers and transfers to fixed resources.

This code finds transfers to fixed resources:

  1. Object conv=Model.find("StraightConveyor1");
  2. Array transfers=[];
  3. Object frTransfer=library().find("?FRTransfer");
  4. Object o;
  5. forobjectlayerunder(getvarnode(conv,"conveyorPoints")){
  6.     o=node("+/~",a);
  7.     if (classobject(classobject(o))==frTransfer)
  8.         transfers.push(o);
  9. }
  10. return transfers;
5 |100000

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