Sample NX Open .NET Visual Basic program : run file save user exit and close nx session
작성자k2ice작성시간09.09.05조회수438 목록 댓글 0Date: 12-JUN-2009
Subject: Sample NX Open .NET Visual Basic program : run file save user exit and close nx session
Note: GTAC provides programming examples for illustration only, and
assumes that you are familiar with the programming language being
demonstrated and the tools used to create and debug procedures. GTAC
support professionals can help explain the functionality of a particular
procedure, but we will not modify these examples to provide added
functionality or construct procedures to meet your specific needs.
'
'
' The related environment variable, "USER_FILE"
' should be defined to point to the .dll built from this code
'
' Note: This will not run as a Journal, only as a .dll
'
'
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Utilities
Module UserExit
Function ufput() As Integer
Dim s As Session = Session.GetSession()
MsgBox("Saving: " & s.Parts.Work.FullPath)
ufput = 0 ' set to 1 to stop the save
' This will close the NX session
Environment.Exit(0)
End Function
Public Function GetUnloadOption(ByVal dummy As String) As Integer
Return Session.LibraryUnloadOption.Immediately
End Function
End Module
다음검색