cancel
Showing results for 
Search instead for 
Did you mean: 

Can we unload shared image by VB .Net?

Valued Contributor
Valued Contributor

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

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

Valued Contributor
Valued Contributor

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

Experimenter
Experimenter

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.