Your Products have been synced, click here to refresh
Private Sub PullTheos() Dim PCDApp As PCDLRN.Application Dim PCDPart As PCDLRN.PartProgram Dim PCDCommands As Object Dim cmd As PCDLRN.Command Dim editWin As PCDLRN.EditWindow PCDApp = CreateObject("PCDLRN.Application") PCDPart = PCDApp.ActivePartProgram PCDCommands = PCDPart.Commands editWin = PCDPart.EditWindow Dim algnID As String = "" For Each cmd In PCDCommands If cmd.IsAlignment And cmd.ID <> "" Then algnID = cmd.ID End If If cmd.IsDCCFeature Or cmd.IsMeasuredFeature Then If cmd.Marked Then Dim oTHEO As PCDLRN.PointData = cmd.FeatureCommand.GetHit(1, PCDLRN.FHITDATA_TYPES.FHITDATA_CENTROID, PCDLRN.FDATA_DATASET.FDATA_THEO, PCDLRN.FDATA_COORDSYS.FDATA_PART, algnID, PCDLRN.ENUM_PLANE_TYPE.PLANE_TOP) MsgBox("Feature Name: " & cmd.ID & vbCr & "Alignment Name: " & algnID & vbCr & oTHEO.X.ToString & " " & oTHEO.Y.ToString & " " & oTHEO.Z.ToString) End If End If Next cmd PCDApp = Nothing PCDPart = Nothing PCDCommands = Nothing End Sub
Private Sub PullTheos() Dim PCDApp As PCDLRN.Application Dim PCDPart As PCDLRN.PartProgram Dim PCDCommands As Object Dim cmd As PCDLRN.Command Dim editWin As PCDLRN.EditWindow PCDApp = CreateObject("PCDLRN.Application") PCDPart = PCDApp.ActivePartProgram PCDCommands = PCDPart.Commands editWin = PCDPart.EditWindow Dim algnID As String = "" For Each cmd In PCDCommands If cmd.IsAlignment And cmd.ID <> "" Then algnID = cmd.ID End If If cmd.IsDCCFeature Or cmd.IsMeasuredFeature Then If cmd.Marked Then Dim oTHEO As PCDLRN.PointData = cmd.FeatureCommand.GetHit(1, PCDLRN.FHITDATA_TYPES.FHITDATA_CENTROID, PCDLRN.FDATA_DATASET.FDATA_THEO, PCDLRN.FDATA_COORDSYS.FDATA_PART, algnID, PCDLRN.ENUM_PLANE_TYPE.PLANE_TOP) MsgBox("Feature Name: " & cmd.ID & vbCr & "Alignment Name: " & algnID & vbCr & oTHEO.X.ToString & " " & oTHEO.Y.ToString & " " & oTHEO.Z.ToString) End If End If Next cmd PCDApp = Nothing PCDPart = Nothing PCDCommands = Nothing End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |