CADMANSOUTH
Mechanical
- Aug 2, 2006
- 43
Hi
I want to add a save as to the end of an NX OPEN vb.net .dll
How to I add error handling to this journal? Also how would I add a user interactive save as if I get an error? I want to have a defult value of "file1" in the user interactive SaveAs.
I am using NX6 in native.
'++++++++++++++++++++++++++++++++++++++++++++++++++
'++++++++++++++++++++++++++++++++++++++++++++++++++
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
' ----------------------------------------------
' Menu: File->Save As...
' ----------------------------------------------
Dim partSaveStatus1 As PartSaveStatus
Dim file1 as string = "C:\some.prt"
partSaveStatus1 = workPart.SaveAs(file1)
partSaveStatus1.Dispose()
' ----------------------------------------------
' Menu: Tools->Journal->Stop Recording
' ----------------------------------------------
End Sub
End Module
I want to add a save as to the end of an NX OPEN vb.net .dll
How to I add error handling to this journal? Also how would I add a user interactive save as if I get an error? I want to have a defult value of "file1" in the user interactive SaveAs.
I am using NX6 in native.
'++++++++++++++++++++++++++++++++++++++++++++++++++
'++++++++++++++++++++++++++++++++++++++++++++++++++
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
' ----------------------------------------------
' Menu: File->Save As...
' ----------------------------------------------
Dim partSaveStatus1 As PartSaveStatus
Dim file1 as string = "C:\some.prt"
partSaveStatus1 = workPart.SaveAs(file1)
partSaveStatus1.Dispose()
' ----------------------------------------------
' Menu: Tools->Journal->Stop Recording
' ----------------------------------------------
End Sub
End Module