Your Products have been synced, click here to refresh
DmisCommand.GetTextEx(SIZE_NOMINAL, 0, "SIZE")
DmisCommand.GetText(UPPER_SIZE, LoopIndex)
DmisCommand.GetText(LOWER_SIZE, LoopIndex)
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 & "Upper Toleranz: " & DmisCommand.GetText(FORM_TOLERANCE, 1) & Chr(13) OutputText = OutputText & "lower Toleranz: " & "0" & Chr(13) OutputText = OutputText & "SIZE_NOMINAL: " & DmisCommand.GetTextEx(SIZE_NOMINAL, 0, "SIZE") & Chr(13) LoopIndex = 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) While sPuffer <> "" OutputText = OutputText & " ->" & sPuffer & " DIM_DEVIATION = " & DmisCommand.GetTextEx(DIM_DEVIATION, LoopIndex, "SEG=1") & Chr(13) OutputText = OutputText & " ->" & sPuffer & " UPPER_SIZE = " & DmisCommand.GetText(UPPER_SIZE, LoopIndex) & Chr(13) OutputText = OutputText & " ->" & sPuffer & " LOWER_SIZE = " & DmisCommand.GetText(LOWER_SIZE, LoopIndex) & Chr(13) OutputText = OutputText & " " & Chr(13) LoopIndex = LoopIndex + 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) Wend MsgBox OutputText End If Next DmisCommand End Sub
DmisCommand.GetTextEx(SIZE_NOMINAL, 0, "SIZE")
DmisCommand.GetText(UPPER_SIZE, LoopIndex)
DmisCommand.GetText(LOWER_SIZE, LoopIndex)
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 & "Upper Toleranz: " & DmisCommand.GetText(FORM_TOLERANCE, 1) & Chr(13) OutputText = OutputText & "lower Toleranz: " & "0" & Chr(13) OutputText = OutputText & "SIZE_NOMINAL: " & DmisCommand.GetTextEx(SIZE_NOMINAL, 0, "SIZE") & Chr(13) LoopIndex = 1 sPuffer = DmisCommand.GetText(REF_ID, LoopIndex) While sPuffer <> "" OutputText = OutputText & " ->" & sPuffer & " DIM_DEVIATION = " & DmisCommand.GetTextEx(DIM_DEVIATION, LoopIndex, "SEG=1") & Chr(13) OutputText = OutputText & " ->" & sPuffer & " UPPER_SIZE = " & DmisCommand.GetText(UPPER_SIZE, LoopIndex) & Chr(13) OutputText = OutputText & " ->" & sPuffer & " LOWER_SIZE = " & DmisCommand.GetText(LOWER_SIZE, LoopIndex) & Chr(13) OutputText = OutputText & " " & 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 |