Your Products have been synced, click here to refresh
Sub main() Dim App As Object Dim Part As Object Dim Commands As Object Dim Command As Object Dim Dimension As Object Dim cnt As Integer Dim ID As String Dim Dev, Nom As Double Set App = CreateObject("PCDLRN.Application") Set Part = App.ActivePartProgram Set Commands = Part.Commands For cnt = 1 To Commands.Count Set Command = Commands(cnt) [COLOR="Red"]If (Command.Type = DIMENSION_START_LOCATION) Then ID = Command.ID End If[/COLOR] If Command.IsDimension Then Set Dimension = Command.DimensionCommand If Dimension.AxisLetter = "D" Then Dev = Dimension.Deviation Nom = Dimension.Nominal MsgBox ID & " " & Dimension.AxisLetter & " " & Nom & " " & Dev End If End If Next End Sub
Sub main() Dim App As Object Dim Part As Object Dim Commands As Object Dim Command As Object Dim Dimension As Object Dim cnt As Integer Dim ID As String Dim Dev, Nom As Double Set App = CreateObject("PCDLRN.Application") Set Part = App.ActivePartProgram Set Commands = Part.Commands For cnt = 1 To Commands.Count Set Command = Commands(cnt) [COLOR="Red"]If (Command.Type = DIMENSION_START_LOCATION) Then ID = Command.ID End If[/COLOR] If Command.IsDimension Then Set Dimension = Command.DimensionCommand If Dimension.AxisLetter = "D" Then Dev = Dimension.Deviation Nom = Dimension.Nominal MsgBox ID & " " & Dimension.AxisLetter & " " & Nom & " " & Dev End If End If Next End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |