|
采用此种方式可以使用*.show(),不会一闪而过,但是有弊端,不会在关闭窗口后自动释放。7 A# H" I" e9 r& R1 x, ^
Public Function GetUnloadOption(ByVal dummy As String) As Integer
# `( N, |4 n8 U, p. V5 |- K% F( H3 \! s
'Unloads the image when the NX session terminates
6 `4 m9 W+ B9 y 'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
' C+ D, A2 P7 T6 ]/ X4 n: {& _( G8 ^+ S1 x
'----Other unload options-------
: H4 L* V% I7 G 'Unloads the image immediately after execution within NX
$ g; v5 I! f. y1 W* l! P* O8 k, D6 ? 'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately; ?2 Z! c/ b. h8 g" t0 W, z
/ j$ t3 s$ S4 F# c# l1 f8 _' n 'Unloads the image explicitly, via an unload dialog
# a. e/ n) q. [4 s. f GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly# {% a5 W/ z5 n
'-------------------------------: ]+ e0 Z* j9 r! P! d+ q, A. h, x
9 a3 e' x, A7 H5 R
End Function |
|