Hi,
I have a 3d model with a dispatcher and multiProcessors. There are 10 named operators assigned to the dispatcher. How can I track which named operator was selected to work on the flow item?
Thanks,
Hai
Hi,
I have a 3d model with a dispatcher and multiProcessors. There are 10 named operators assigned to the dispatcher. How can I track which named operator was selected to work on the flow item?
Thanks,
Hai
You can do this in an On Receive Task Sequence on the operator. This is the custom code which calls the item using taskSequence.tasks[4].involved1
Object current = ownerobject(c); TaskSequence taskSequence = param(1); Object item = taskSequence.tasks[4].involved1; { // ************* PickOption Start ************* // /***popup:SetLabel*/ /**Set Label on Item*/ Object object = /**\nObject: *//***tag:object*//**/item/**/; string labelname = /**\nLabel: *//***tag:label*//**/"Operator"/**/; Variant value = /**\nValue: *//***tag:value*//**/current/**/; object.labels.assert(labelname).value = value; } // ******* PickOption End ******* //
Here's a sample model:
Note that everything inside the pickoption Start and End equates to one line:
item.labels.assert("Operator").value=current;
so you could just have that as your 4th line and remove all the PickOptions stuff. All the extra special characters and phrases in the pick option section are so you can use the pop-up template gui - but unfortunately they make the code look difficult, which it isn't.
Also note that this assumes the tasksequence is a standard structure - if you have a custom sequence where the 4th task's involved1 is not the item, it will not work.
15 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved