Your Products have been synced, click here to refresh
Sub PCDinfo 'Gather Information from part program Set ObjApp = CreateObject ("PCDLRN.Application") Set ObjPart = ObjApp.ActivePartProgram Set ObjCmds = ObjPart.Commands State = 1 For ix = 1 To ObjCmds.Count Set ObjCmd = ObjCmds(ix) 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 Select Case State Case 1 'Normal case If (ObjDimCmd.OutputMOde <> DIMOUTPUT_NONE) Then DoOutPut = 1 Else DoOutPut = 0 End If StrDimID = ObjDimCmd.ID If (ObjDimCmd.Type = DIMENSION_TRUE_START_POSITION) Then State = 2 ElseIf (ObjDimCmd.Type = DIMENSION_START_LOCATION) Then State = 3 End If If (DoOutPut = 1) and (State = 1) Then StrDimType = ObjDimCmd.TypeDescription StrDimValueType = ObjDimCmd.AxisLetter End If StrDimNom = ObjDimCmd.Nominal StrDimDev = ObjDimCmd.Deviation StrDimAct = StrDimNom + StrDimDev Case 2 'True Position If (DoOutPut = 1) Then StrDimID = ObjDimCmd.ID StrDimType = ObjDimCmd.TypeDescription StrDimValueType = ObjDimCmd.AxisLetter End If StrDimNom = ObjDimCmd.Nominal StrDimDev = ObjDimCmd.Deviation StrDimAct = StrDimNom + StrDimDev Case 3 'Location If (DoOutPut = 1) Then StrDimID = ObjDimCmd.ID StrDimType = ObjDimCmd.TypeDescription StrDimValueType = ObjDimCmd.AxisLetter End If StrDimNom = ObjDimCmd.Nominal StrDimDev = ObjDimCmd.Deviation StrDimAct = StrDimNom + StrDimDev End Select If (ObjDimCmd.Type = DIMENSION_TRUE_END_POSITION) Then State = 1 ElseIf (ObjDimCmd.Type = DIMENSION_END_LOCATION) Then State = 1 End If If (StrDimID = "CIRC2 DIA") Then MyReading1 = StrDimAct End If If (StrDimID = "ROUNDNESS CIRC2") Then MyReading2 = StrDimAct End If If (StrDimID = "CIRC3 DIA") Then MyReading3 = StrDimAct End If If (StrDimID = "CIRC6 DIA") Then MyReading4 = StrDimAct End If If (StrDimID = "ROUNDNESS CIRC6") Then MyReading5 = StrDimAct End If If (StrDimID = "CONC1") Then MyReading6 = StrDimAct End If If (StrDimID = "CONC2") Then MyReading7 = StrDimAct If (StrDimID = "POINT 1Z") Then MyReading8 = StrDimAct End If If (StrDimID = "POINT 2Z") Then MyReading9 = StrDimAct End If If (StrDimID = "POINT 3Z") Then MyReading10 = StrDimAct End If If (StrDimID = "POINT 3Z") Then MyReading10 = StrDimAct End If If (StrDimID = "PLANE4 Z") Then MyReading12 = StrDimAct End If If (StrDimID = "PLANE5 Z") Then MyReading13 = StrDimAct End If If (StrDimID = "POINT5Z") Then MyReading14 = StrDimAct End If If (StrDimID = "POINT6Z") Then MyReading15 = StrDimAct End If If (StrDimID = "POINT7Z") Then MyReading16 = StrDimAct End If If (StrDimID = "POINT8Z") Then MyReading17 = StrDimAct End If Next
Sub PCDinfo 'Gather Information from part program Set ObjApp = CreateObject ("PCDLRN.Application") Set ObjPart = ObjApp.ActivePartProgram Set ObjCmds = ObjPart.Commands State = 1 For ix = 1 To ObjCmds.Count Set ObjCmd = ObjCmds(ix) 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 Select Case State Case 1 'Normal case If (ObjDimCmd.OutputMOde <> DIMOUTPUT_NONE) Then DoOutPut = 1 Else DoOutPut = 0 End If StrDimID = ObjDimCmd.ID If (ObjDimCmd.Type = DIMENSION_TRUE_START_POSITION) Then State = 2 ElseIf (ObjDimCmd.Type = DIMENSION_START_LOCATION) Then State = 3 End If If (DoOutPut = 1) and (State = 1) Then StrDimType = ObjDimCmd.TypeDescription StrDimValueType = ObjDimCmd.AxisLetter End If StrDimNom = ObjDimCmd.Nominal StrDimDev = ObjDimCmd.Deviation StrDimAct = StrDimNom + StrDimDev Case 2 'True Position If (DoOutPut = 1) Then StrDimID = ObjDimCmd.ID StrDimType = ObjDimCmd.TypeDescription StrDimValueType = ObjDimCmd.AxisLetter End If StrDimNom = ObjDimCmd.Nominal StrDimDev = ObjDimCmd.Deviation StrDimAct = StrDimNom + StrDimDev Case 3 'Location If (DoOutPut = 1) Then StrDimID = ObjDimCmd.ID StrDimType = ObjDimCmd.TypeDescription StrDimValueType = ObjDimCmd.AxisLetter End If StrDimNom = ObjDimCmd.Nominal StrDimDev = ObjDimCmd.Deviation StrDimAct = StrDimNom + StrDimDev End Select If (ObjDimCmd.Type = DIMENSION_TRUE_END_POSITION) Then State = 1 ElseIf (ObjDimCmd.Type = DIMENSION_END_LOCATION) Then State = 1 End If If (StrDimID = "CIRC2 DIA") Then MyReading1 = StrDimAct End If If (StrDimID = "ROUNDNESS CIRC2") Then MyReading2 = StrDimAct End If If (StrDimID = "CIRC3 DIA") Then MyReading3 = StrDimAct End If If (StrDimID = "CIRC6 DIA") Then MyReading4 = StrDimAct End If If (StrDimID = "ROUNDNESS CIRC6") Then MyReading5 = StrDimAct End If If (StrDimID = "CONC1") Then MyReading6 = StrDimAct End If If (StrDimID = "CONC2") Then MyReading7 = StrDimAct If (StrDimID = "POINT 1Z") Then MyReading8 = StrDimAct End If If (StrDimID = "POINT 2Z") Then MyReading9 = StrDimAct End If If (StrDimID = "POINT 3Z") Then MyReading10 = StrDimAct End If If (StrDimID = "POINT 3Z") Then MyReading10 = StrDimAct End If If (StrDimID = "PLANE4 Z") Then MyReading12 = StrDimAct End If If (StrDimID = "PLANE5 Z") Then MyReading13 = StrDimAct End If If (StrDimID = "POINT5Z") Then MyReading14 = StrDimAct End If If (StrDimID = "POINT6Z") Then MyReading15 = StrDimAct End If If (StrDimID = "POINT7Z") Then MyReading16 = StrDimAct End If If (StrDimID = "POINT8Z") Then MyReading17 = StrDimAct End If Next
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |