I would like to Export all the parts of my assembly.
To do this I have done File -> Export ->Parts
My specifications for the Export Part menu are the following:
Part Specification: New
Specify Part: "newprt.prt"
Object Selection Scope: All Objects
Class Selections: Select All
Highlight Choice: Selected Objects
Feature Parameters: Remove Parameters
Expression Transfer Mode: Copy if Referenced.
This works for what I am trying to do. However, after recording a journal of Exporting the parts, when I attempt to run the journal again, the program does not save the new file name ("newprt.prt) and therefore can not open the file which is being exported. How would I get the journal to record my Specify Part filename? Any advice?
Here is the portion of the journal where I attempt to export the part and open the exported file:
' NX 1863 Imports System Imports NXOpen Module NXJournal Sub Main (ByVal args() As String) Dim theSession As NXOpen.Session = NXOpen.Session.GetSession() ' ---------------------------------------------- ' Menu: File->Open... ' ---------------------------------------------- Dim basePart1 As NXOpen.BasePart = Nothing Dim partLoadStatus1 As NXOpen.PartLoadStatus = Nothing basePart1 = theSession.Parts.OpenActiveDisplay("H:newprt.SLDPRT", NXOpen.DisplayPartOption.AllowAdditional, partLoadStatus1) Dim workPart As NXOpen.Part = theSession.Parts.Work Dim displayPart As NXOpen.Part = theSession.Parts.Display partLoadStatus1.Dispose() theSession.ApplicationSwitchImmediate("UG_APP_GATEWAY") ' ---------------------------------------------- ' Menu: File->Export->Part... ' ---------------------------------------------- ' ---------------------------------------------- ' Dialog Begin Export Part ' ---------------------------------------------- Dim markId1 As NXOpen.Session.UndoMarkId = Nothing markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start") theSession.SetUndoMarkName(markId1, "Class Selection Dialog") ' ---------------------------------------------- ' Dialog Begin Class Selection ' ---------------------------------------------- ' Refer to the sample NXOpen application, Selection for "Select All" alternatives. Dim markId2 As NXOpen.Session.UndoMarkId = Nothing markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Class Selection") theSession.DeleteUndoMark(markId2, Nothing) Dim markId3 As NXOpen.Session.UndoMarkId = Nothing markId3 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Class Selection") theSession.DeleteUndoMark(markId3, Nothing) theSession.SetUndoMarkName(markId1, "Class Selection") theSession.DeleteUndoMark(markId1, Nothing) ' ---------------------------------------------- ' Dialog Begin Export Part ' ---------------------------------------------- ' ---------------------------------------------- ' Menu: File->Open... ' ---------------------------------------------- Dim basePart2 As NXOpen.BasePart = Nothing Dim partLoadStatus2 As NXOpen.PartLoadStatus = Nothing basePart2 = theSession.Parts.OpenActiveDisplay("H:newprt.prt", NXOpen.DisplayPartOption.AllowAdditional, partLoadStatus2) <code>