Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 787

Open part whether its loaded or not

$
0
0

At the moment I have a function to open parts that are already loaded and one for parts that haven't been opened, yet. But now I need one that can handle both or at least some way to determine if a part is loaded or not. How do I do that?

Sub open(number)
    Dim part1 As NXOpen.Part = CType(theSession.Parts.FindObject("@DB/" + number), NXOpen.Part)
 
    Dim partLoadStatus1 As NXOpen.PartLoadStatus = Nothing
    theSession.Parts.SetActiveDisplay(part1, NXOpen.DisplayPartOption.AllowAdditional, NXOpen.PartDisplayPartWorkPartOption.UseLast, partLoadStatus1)
 
    workPart = theSession.Parts.Work
    displayPart = theSession.Parts.Display
    partLoadStatus1.Dispose()
End Sub

Viewing all articles
Browse latest Browse all 787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>