rafl
Mechanical
- May 30, 2011
- 41
Is there a way to find and make display part the main assembly using journal?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main (ByVal args() As String)
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim markId1 As NXOpen.Session.UndoMarkId
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Make Work Part")
Dim nullNXOpen_Assemblies_Component As NXOpen.Assemblies.Component = Nothing
Dim partLoadStatus1 As NXOpen.PartLoadStatus
theSession.Parts.SetWorkComponent(nullNXOpen_Assemblies_Component, NXOpen.PartCollection.RefsetOption.Current, NXOpen.PartCollection.WorkComponentOption.Visible, partLoadStatus1)
workPart = theSession.Parts.Work
partLoadStatus1.Dispose()
theSession.SetUndoMarkName(markId1, "Make Work Part")
End Sub
End Module