EngProgrammer
Aerospace
- Jan 14, 2015
- 150
Dear Forum,
I am looking for a snippet of NXOpen code to determine if a part is already open.
I use the following lines of code to initially open the part:
Dim part1 As NXOpen.BasePart
Dim partLoadStatus1 As NXOpen.PartLoadStatus
part1 = theSession.Parts.OpenBaseDisplay(mWorkingFolder & "\" & "example.prt", partLoadStatus1)
partLoadStatus1.Dispose()
If I run this code of a part is already open NX blows up. I need to first check whether the part is open in NX before opening.
I am looking for a snippet of NXOpen code to determine if a part is already open.
I use the following lines of code to initially open the part:
Dim part1 As NXOpen.BasePart
Dim partLoadStatus1 As NXOpen.PartLoadStatus
part1 = theSession.Parts.OpenBaseDisplay(mWorkingFolder & "\" & "example.prt", partLoadStatus1)
partLoadStatus1.Dispose()
If I run this code of a part is already open NX blows up. I need to first check whether the part is open in NX before opening.