Your Products have been synced, click here to refresh
Sub test() Dim App, Part, Cmds, DmisCommand As Object Dim OutputText, sPuffer As String Dim RetVal Dim LoopIndex As Integer Set App = CreateObject("PCDLRN.Application") Set Part = App.PartPrograms.Item(1) Set Cmds = Part.Commands For Each DmisCommand In Cmds If (DmisCommand.Type = ISO_TOLERANCE_COMMAND) Or (DmisCommand.Type = ASME_TOLERANCE_COMMAND) Then OutputText = "STANDARD: " & DmisCommand.GetText(STANDARD, 0) & Chr(13) OutputText = OutputText & "UNIT_TYPE: " & DmisCommand.GetText(UNIT_TYPE, 0) & Chr(13) OutputText = OutputText & "SEGMENT_TYPE_TOGGLE: " & DmisCommand.GetText(SEGMENT_TYPE_TOGGLE, 1) & Chr(13) OutputText = OutputText & "OUTPUT_TYPE: " & DmisCommand.GetText(OUTPUT_TYPE, 0) & Chr(13) OutputText = OutputText & "ARROW_DENSITY: " & DmisCommand.GetText(ARROW_DENSITY, 0) & Chr(13) OutputText = OutputText & "Upper Toleranz: " & DmisCommand.GetText(FORM_TOLERANCE, 1) & Chr(13) OutputText = OutputText & "lower Toleranz: " & "0" & Chr(13) LoopIndex = 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) While sPuffer <> "" OutputText = OutputText & " ->" & sPuffer & " = " & DmisCommand.GetTextEx(DIM_DEVIATION, LoopIndex, "SEG=1") & Chr(13) LoopIndex = LoopIndex + 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) Wend MsgBox OutputText End If Next DmisCommand End Sub
Sub test() Dim App, Part, Cmds, DmisCommand As Object Dim OutputText, sPuffer As String Dim RetVal Dim LoopIndex As Integer Set App = CreateObject("PCDLRN.Application") Set Part = App.PartPrograms.Item(1) Set Cmds = Part.Commands For Each DmisCommand In Cmds If (DmisCommand.Type = ISO_TOLERANCE_COMMAND) Or (DmisCommand.Type = ASME_TOLERANCE_COMMAND) Then OutputText = "STANDARD: " & DmisCommand.GetText(STANDARD, 0) & Chr(13) OutputText = OutputText & "UNIT_TYPE: " & DmisCommand.GetText(UNIT_TYPE, 0) & Chr(13) OutputText = OutputText & "SEGMENT_TYPE_TOGGLE: " & DmisCommand.GetText(SEGMENT_TYPE_TOGGLE, 1) & Chr(13) OutputText = OutputText & "OUTPUT_TYPE: " & DmisCommand.GetText(OUTPUT_TYPE, 0) & Chr(13) OutputText = OutputText & "ARROW_DENSITY: " & DmisCommand.GetText(ARROW_DENSITY, 0) & Chr(13) OutputText = OutputText & "Upper Toleranz: " & DmisCommand.GetText(FORM_TOLERANCE, 1) & Chr(13) OutputText = OutputText & "lower Toleranz: " & "0" & Chr(13) LoopIndex = 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) While sPuffer <> "" OutputText = OutputText & " ->" & sPuffer & " = " & DmisCommand.GetTextEx(DIM_DEVIATION, LoopIndex, "SEG=1") & Chr(13) LoopIndex = LoopIndex + 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) Wend MsgBox OutputText End If Next DmisCommand End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |