Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Can we unload shared image by VB .Net?

Hi all

 

We all know there are three way to unload shared image...

 

'Unloads the image when the NX session terminates
' GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination


'Unloads the image immediately after execution within NX
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately

 

'Unloads the image explicitly, via an unload dialog
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly

 

But sometime we have to choose GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly for open a VB form with "theform1.show()", that could at the same time to select NX object and VB dialog, like we do part list with Datagridview.

 

Now I record a macro program to unload shared image, it no problem, but whether we have better way to achieve that? 

Best Regards
Christian
2 REPLIES
Solution
Solution
Accepted by topic author Christian0313
‎05-11-2016 02:05 AM

Re: Can we unload shared image by VB .Net?

Re: Can we unload shared image by VB .Net?

While that is a fine solution, why wouldn't you just call the UnloadNXLibrary() subroutine in the closing event of your windows form?  This avoids the issues with multiple threads.  I have just implemented this in a project I'm working on.