EngProgrammer
Aerospace
- Jan 14, 2015
- 150
Dear Forum,
How do I find out if a dimension is dual dimensioned with NXOpen?
How do I find out if a dimension is dual dimensioned with NXOpen?
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.
EngProgrammer said:How do I find out if a dimension is dual dimensioned with NXOpen?
Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF
Module Module2
Dim theSession As Session = Session.GetSession()
Dim theUfSession As UFSession = UFSession.GetUFSession()
Dim lw As ListingWindow = theSession.ListingWindow
Sub Main()
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "report dims")
lw.Open()
For Each tempDim As Annotations.Dimension In theSession.Parts.Work.Dimensions
lw.WriteLine("tag: " & tempDim.Tag)
If tempDim.GetDimensionPreferences.GetUnitsFormatPreferences.DualDimensionPlacement = Annotations.DualDimensionPlacement.None Then
lw.WriteLine("-- not a dual dimension")
Else
lw.WriteLine("++ dual dimension")
End If
lw.WriteLine("")
Next
lw.Close()
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
End Function
End Module