Custom Code for Entry Trigger

Custom Code for Entry Trigger

bcallaghan1
Not applicable
79 Views
6 Replies
Message 1 of 7

Custom Code for Entry Trigger

bcallaghan1
Not applicable

[ FlexSim 21.1.5 ]

Trying to have a label be automatically created upon queue entry on a flowitem that timestamps the time a flowitem enters a queue. My code is returning an error but unsure what is wrong. Help would be appreciated. Thanks! Tried commenting out some things to see if it would fix it but no luck.

1700498214798.png

0 Likes
Accepted solutions (1)
80 Views
6 Replies
Replies (6)
Message 2 of 7

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Use the new syntax:

item.ArrivalTime=entryTime;

Or use the pick option to set a label value and use its template to enter values.

0 Likes
Message 3 of 7

bcallaghan1
Not applicable

@Jason Lightfoot, should I just replace line 10 with this? Or are you saying to this as my "value" within setting a label under the onEntry label trigger?

0 Likes
Message 4 of 7

jason_lightfootVL7B4
Autodesk
Autodesk
you can use that instead of the line using setlabel()
0 Likes
Message 5 of 7

bcallaghan1
Not applicable
Still not working for some reason.
0 Likes
Message 6 of 7

jason_lightfootVL7B4
Autodesk
Autodesk
Can you post the model or your updated trigger? You can also place a breakpoint in the code and step through in case something is amiss that you might spot.
0 Likes
Message 7 of 7

jason_lightfootVL7B4
Autodesk
Autodesk

Hi @bcallaghan,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes