12-10-2023 06:00 AM
Hi folks,
I attempt to create a new event in my Main module and all the module's EHL cases get renamed to Unknown Event.
Is it because I have placed the DQMH Reg Events method into a sub-vi ? If not, could you offer me ideas on what to try to identify the problem ?
The module had passed the DQMH validation test OK prior to me attempting to create a new event.
Thanks in advance,
Solved! Go to Solution.
12-10-2023 06:48 AM
@Peter_B wrote:
Is it because I have placed the DQMH Reg Events method into a sub-vi ?
Short answer: Most likely, yes.
Whenever you touch framework/scripted code, chances are you will break the scripting. It is virtually impossible for us to foresee all the ways the code could be changed and present meaningful (error) messages to the user. We really would if we could.
As a side note, we usually do not place event registration functions into subVIs. The reason is that event registration references cannot be type-def'ed the way you expect them to. Meaning: When you change the event registration, those changes do not propagate across VIs, so you have to manually update each control or indicator of said event registration reference.
In your example, I can see how moving the event registration node into a subVI breaks two things:
1. The scripting can't find it anymore, because it searches for it on the BD of the Main.vi
2. The datatype of the reference coming out of your subVI would not update automatically even if the scripting found and updated the event registration node itself.
Hope that helps!
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
12-10-2023 07:24 AM
Thanks for such a quick reply Joerg !
In the next day or so I'll take the code out of the sub-vi and try again and report back.
12-11-2023 02:05 AM
Placing the Register for Events method inside a sub-vi was indeed the problem, thank for confirming that Joerg.