Your Products have been synced, click here to refresh
'PCDMIS commands Dim ObjApp As Object Dim ObjCmds As Object Dim ObjCmd As Object Dim ObjPart As Object Dim ObjDimCmd as Object Dim lngNumCmds As Long Set ObjApp = CreateObject("PCDLRN.Application") Set ObjPart = ObjApp.ActivePartProgram Set ObjCmds = ObjPart.Commands set lngNumCmds = ObjCmds.Count Dim StrDimID As String Dim StrDimFeature As String Dim StrDimType As String Dim StrDimNominal As String Dim StrDimUTol As String Dim StrDimLTol As String Dim StrDimMeasure As String Dim StrDimDiameter As String Dim StrDimPlane As String Dim MeasZ As String Dim Clock As String Dim Part As String Dim DimMeas As Double Dim MyComment As Double Dim MyReading1 As Double Dim MyReading2 As Double Dim MyReading3 As Double Dim MyReading4 As Double Dim MyReading5 As Double Dim MyReading6 As Double Dim MyReading7 As Double Dim MyReading8 As Double Dim MyReading9 As Double Dim MyReading10 As Double Dim MyReading11 As Double Dim MyReading12 As Double Dim MyReading13 As Double Dim MyReading14 As Double Dim MyReading15 As Double Dim MyReading16 As Double For Each ObjCmd In ObjCmds If ObjCmd.IsComment Then If ObjCmd.CommentCommand.CommentType = PCD_COMMENT_INPUT Then If ObjCmd.ID = "C1" Then StrC1 = ObjCmd.CommentCommand.Input End If End If End If If ObjCmd.IsComment Then If ObjCmd.CommentCommand.CommentType = PCD_COMMENT_INPUT Then If ObjCmd.ID = "C2" Then StrC2 = ObjCmd.CommentCommand.Input End If End If End If If ObjCmd.IsDimension Then Set ObjDimCmd = ObjCmd.DimensionCommand StrDimID = ObjDimCmd.ID StrDimFeature = ObjDimCmd.Feat1 StrDimType = ObjCmd.Type StrDimNominal = ObjDimCmd.Nominal StrDimUTol = ObjDimCmd.Plus StrDimLTol = ObjDimCmd.Minus StrDimMeasure = ObjDimCmd.Measured If (StrDimType = "DIMENSION_START_LOCATION" Or StrDimType = "DIMENSION_Z_LOCATION") Then StrDimPlane=ObjCmd.GetText(DIM_MEASURED,0) End If ElseIf ObjCmd.IsFeature Then StrDimID = ObjCmd.FeatureCommand.ID StrDimDiameter = ObjCmd.FeatureCommand.MeasDiam MeasZ = ObjCmd.GetText(MEAS_Z,0) End If If StrDimID = "CIR2- OUTER CIRCLE ABOVE STEP" Then MyReading1 = StrDimDiameter If StrDimID = "ROUNDNESS CIRC2" Then MyReading2 = StrDimMeasure If StrDimID = "CIR3- RADIUS OF STEP ON OUTER EDGE" Then MyReading3 = StrDimDiameter If StrDimID = "CIR6- OUTER CIRCLE BELOW STEP" Then MyReading4 = StrDimDiameter If StrDimID = "ROUNDNESS CIRC6" Then MyReading5 = StrDimMeasure If StrDimID = "CONC1" Then MyReading6 = StrDimMeasure If StrDimID = "CONC2" Then MyReading7 = StrDimMeasure If StrDimID = "POINT 1Z" Then MyReading8 = StrDimMeasure If StrDimID = "POINT 2Z" Then MyReading9 = StrDimMeasure If StrDimID = "POINT 3Z" Then MyReading10 = StrDimMeasure If StrDimID = "POINT 4Z" Then MyReading11 = StrDimMeasure If StrDimID = "PLANE4 Z" Then MyReading12 = StrDimMeasure If StrDimID = "PLANE5- COMBINATION OF POINT 1 2 3 4 ON STEP" Then MyReading13 = MeasZ If StrDimID = "POINT5Z" Then MyReading14 = MeasZ If StrDimID = "POINT6Z" Then MyReading15 = MeasZ If StrDimID = "POINT7Z" Then MyReading16 = MeasZ If StrDimID = "POINT8Z" Then MyReading17 = MeasZ Next
'PCDMIS commands Dim ObjApp As Object Dim ObjCmds As Object Dim ObjCmd As Object Dim ObjPart As Object Dim ObjDimCmd as Object Dim lngNumCmds As Long Set ObjApp = CreateObject("PCDLRN.Application") Set ObjPart = ObjApp.ActivePartProgram Set ObjCmds = ObjPart.Commands set lngNumCmds = ObjCmds.Count Dim StrDimID As String Dim StrDimFeature As String Dim StrDimType As String Dim StrDimNominal As String Dim StrDimUTol As String Dim StrDimLTol As String Dim StrDimMeasure As String Dim StrDimDiameter As String Dim StrDimPlane As String Dim MeasZ As String Dim Clock As String Dim Part As String Dim DimMeas As Double Dim MyComment As Double Dim MyReading1 As Double Dim MyReading2 As Double Dim MyReading3 As Double Dim MyReading4 As Double Dim MyReading5 As Double Dim MyReading6 As Double Dim MyReading7 As Double Dim MyReading8 As Double Dim MyReading9 As Double Dim MyReading10 As Double Dim MyReading11 As Double Dim MyReading12 As Double Dim MyReading13 As Double Dim MyReading14 As Double Dim MyReading15 As Double Dim MyReading16 As Double For Each ObjCmd In ObjCmds If ObjCmd.IsComment Then If ObjCmd.CommentCommand.CommentType = PCD_COMMENT_INPUT Then If ObjCmd.ID = "C1" Then StrC1 = ObjCmd.CommentCommand.Input End If End If End If If ObjCmd.IsComment Then If ObjCmd.CommentCommand.CommentType = PCD_COMMENT_INPUT Then If ObjCmd.ID = "C2" Then StrC2 = ObjCmd.CommentCommand.Input End If End If End If If ObjCmd.IsDimension Then Set ObjDimCmd = ObjCmd.DimensionCommand StrDimID = ObjDimCmd.ID StrDimFeature = ObjDimCmd.Feat1 StrDimType = ObjCmd.Type StrDimNominal = ObjDimCmd.Nominal StrDimUTol = ObjDimCmd.Plus StrDimLTol = ObjDimCmd.Minus StrDimMeasure = ObjDimCmd.Measured If (StrDimType = "DIMENSION_START_LOCATION" Or StrDimType = "DIMENSION_Z_LOCATION") Then StrDimPlane=ObjCmd.GetText(DIM_MEASURED,0) End If ElseIf ObjCmd.IsFeature Then StrDimID = ObjCmd.FeatureCommand.ID StrDimDiameter = ObjCmd.FeatureCommand.MeasDiam MeasZ = ObjCmd.GetText(MEAS_Z,0) End If If StrDimID = "CIR2- OUTER CIRCLE ABOVE STEP" Then MyReading1 = StrDimDiameter If StrDimID = "ROUNDNESS CIRC2" Then MyReading2 = StrDimMeasure If StrDimID = "CIR3- RADIUS OF STEP ON OUTER EDGE" Then MyReading3 = StrDimDiameter If StrDimID = "CIR6- OUTER CIRCLE BELOW STEP" Then MyReading4 = StrDimDiameter If StrDimID = "ROUNDNESS CIRC6" Then MyReading5 = StrDimMeasure If StrDimID = "CONC1" Then MyReading6 = StrDimMeasure If StrDimID = "CONC2" Then MyReading7 = StrDimMeasure If StrDimID = "POINT 1Z" Then MyReading8 = StrDimMeasure If StrDimID = "POINT 2Z" Then MyReading9 = StrDimMeasure If StrDimID = "POINT 3Z" Then MyReading10 = StrDimMeasure If StrDimID = "POINT 4Z" Then MyReading11 = StrDimMeasure If StrDimID = "PLANE4 Z" Then MyReading12 = StrDimMeasure If StrDimID = "PLANE5- COMBINATION OF POINT 1 2 3 4 ON STEP" Then MyReading13 = MeasZ If StrDimID = "POINT5Z" Then MyReading14 = MeasZ If StrDimID = "POINT6Z" Then MyReading15 = MeasZ If StrDimID = "POINT7Z" Then MyReading16 = MeasZ If StrDimID = "POINT8Z" Then MyReading17 = MeasZ Next
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |