Nik Posted May 2, 2023 Share Posted May 2, 2023 I have an event-based PIO Linear Object that doesn't seem to be firing the OnInit event. I have an AlrtDialog that fires immediately after vsoGetEventInfo function but I never get an event ID of 5. Specifically I don't get it the first time I use the tool after opening VW2023. Any thoughts? Quote Link to comment
twk Posted May 3, 2023 Share Posted May 3, 2023 (edited) What is the logic flow of your code? -> get_custom_info_ok, plugin_name_internal, plugin_handle, plugin_record_handle, plugin_wallHand = vs.GetCustomObjectInfo() -> if get_custom_info_ok: <main plugin code functions> -> theEvent, theMessage = vs.vsoGetEventInfo() set an AlrtDialog for both theEvent, and theMessage and see what you get Edited May 3, 2023 by twk Quote Link to comment
Nik Posted May 18, 2023 Author Share Posted May 18, 2023 The weird thing is another PIO I use the logic is working fine, This is what I have done to try and figure out what is going on. this is python Script in the script editor.: import _Gizmo id, button = vs.vsoGetEventInfo() vs.AlrtDialog(f'Script Editor {id}') #normally I don't make this call here but in the _Gizmo.run after running the vs.GetCustomObjectInfo call _Gizmo.run(id, button) this is the python Script in "_Gizmo.run": vs.PushAttrs event.id, event.button = eventID, eventButton pioName, hPIO, recHand, wallHand = 0, 0, 0, 0 ok, pioName, hPIO, recHand, wallHand = vs.GetCustomObjectInfo(pioName, hPIO, recHand, wallHand) if ok: vs.AlrtDialog(f'Gizmo.run {event.id}') vs.PopAttrs When I exit the VW SciptEditor I get the following alerts: Script Editor 5 Script Editor 3 Gizmo.run 3 So it appears the onInit event is not "finishing" Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.