- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[ FlexSim 16.1.0 ]
Hello,
In this case, we just need to distribute the flowitem moving in conveyor into an empty buffer placed alongside it. Actually we can make it work using just a command of content(node("queue110",model())) for instance, but to set it like that while we have quite lots of buffer (queue110 being a particular buffer), it become tedious.
So I thought of using pointer outobject, as follow (this script is at on arrival on each decision point):
int contentleft = content(outobject(outobject(current, 1), 1));
int contentright = content(outobject(outobject(current, 2), 1));
if (contentleft < 1) { // check left buffer space
// send to left buffer space
conveyorsenditem(item, outobject(outobject(current, 1), 1));
} else if (contentright < 1) { // check right buffer space
// send to right bufferspace
conveyorsenditem(item, outobject(outobject(current, 2), 1));
} else // continue
return 0;
But this command result in an error as below.
time: 302.369221 exception: Exception caught in flexscript execution of MODEL:/DP100>variables/localType/onArrival line 8 instruction 19. Discontinuing execution.
So I was under impression that the cause of this error is most likely because I cascade the outobject. is this possible to be done? or some syntax error?
Thank you very much for your kind help
Best Regards,
Edwin
Solved! Go to Solution.