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
'If Cmd.Type = DIMENSION_START_LOCATION Or _ 'Cmd.Type = DIMENSION_TRUE_START_POSITION[COLOR="red"] Then 'FeatName = DCmd.ID[/COLOR] 'Select Case Cmd.Type 'Case DIMENSION_2D_DISTANCE 'Dev_Val = Round(DCmd.Deviation, 4) 'Case Else 'If DCmd.AxisLetter <> "" Then 'Dev_Val = Round(DCmd.Deviation, 4) 'End If 'End Select 'End If 'End If
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |