08-07-2008 07:06 AM
08-07-2008 07:10 AM
08-07-2008 07:27 AM
Hi Mike
Thanks for the quick reply. This is where I am a bit puzzled about the operation of the Automation Open dialogue. According to the help infomation when left in its default state the dialogue will first try and connect to an existing valid reference before creating a new reference/instance. This does not appear to work, at least not how I interperate the available information about how it should work. In any case what would you consider an appropriate test of whether a reference is valid (appart from a non-null value)?
Regards
Ian
08-07-2008 07:33 AM
Hi Ian,
you can use a shift register to store your refnum and check it with "not a refnum". See the attached picture.
Hope it helps.
Mike
08-07-2008 07:40 AM
08-07-2008 09:39 AM
Hi Wiebe.
Thanks for the input and the solutions when a reference is lost. What I'm still trying to understand is the reason/mechanism that causes the reference to be lost in the first place? Is the storing of a reference in a cluster via a local variable for future use not allowed? The reason I ask is that the Program is nested structure with SubVi's within SubVi's which does not easily lend itself to the Action Engine structure that yourself and Mike suggested.
Regards
Ian
08-08-2008 09:40 AM
08-11-2008 04:16 AM
Hi Wiebe
I have the ability to debug the COM Object using .NET Visual Studio and can see that every time the interface is accessed the process to create a new instance is performed. During recent discussions it has become apparent that the because I have created the original instance/refnum in a SubVi when the SubVi is exited the instance resources are released thus causing the refnum to be no longer valid. As the COM Object needs a reference to the original instance to shutdown the event handling properly I need to ensure the original refnum/instance is not released until the end of the LabView program shutdown. Would a AE/FG actually help under these circumstances?
Best Regards
Ian Melville
08-11-2008 05:10 AM