question

Sri_vikas K avatar image
0 Likes"
Sri_vikas K asked Felix Möhlmann answered

Code to apply on exit in VR mode

Hi Community,

In my model, I wanted to set the label of object on exiting the queue by pressing the buttons in VR mode. But it is showing some errors while pressing the button. I am using the following code in the On button press command.

on-button-press-code.png

Thanks In advance.


FlexSim 23.0.4
vr mode
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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

"item" is not defined in your code.

Either use the button press code to set a label on the queue which is then used in the OnExit trigger to copy that value to a label on the item.

Or do it the other way around. Have the OnExit trigger set a label with a reference to the most recent item which is then used in the button press code to assign a label. (Though this way some items might not get any label if the button isn't pressed for each item before the next one leaves)

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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