Your Products have been synced, click here to refresh
CONTACT_CIRCLE_FEATURE = 612
MEASURED_CIRCLE = 202
VISION_CIRCLE_FEATURE = 245
[...] If PCDCommand.IsFeature Then If (PCDCommand.Type = 612) Or (PCDCommand = 202) Or (PCDCommand = 245) Then If Left(PCDCommand.ID, 3) = "CIR" Then Set FCmd = PCDCommand.FeatureCommand tX = PCDCommand.GetText(THEO_X, 0) tY = PCDCommand.GetText(THEO_Y, 0) tZ = PCDCommand.GetText(THEO_Z, 0) tD = FCmd.TheoDiam 'tD = PCDCommand.GetText(THEO_DIAM, 0) mX = PCDCommand.GetText(MEAS_X, 0) mY = PCDCommand.GetText(MEAS_Y, 0) mZ = PCDCommand.GetText(MEAS_Z, 0) mD = FCmd.MeasDiam 'mD = PCDCommand.GetText(MEAS_DIAM, 0) tRound = FCmd.GetFormError() Write #1, PCDCommand.ID & ", " & tX & ", " & tY & ", " & tZ & ", " & tD & ", " & tRound & ", " & mX & ", " & mY & ", " & mZ & ", " & mD & ", " & mRound End If End If End If [...]
Dim DmisApp As Object Dim DmisPart As Object Dim DmisCommands As Object Dim DmisCommand As Object Dim FCmd As Object Dim savePath Dim repFolder Dim repName Dim tX, tY, tD, tRound, mX, mY, mD, mRound As String Sub Main(OutputFileNameAndPath) Set DmisApp = CreateObject("PCDLRN.Application") Set DmisPart = DmisApp.ActivePartProgram Set DmisCommands = DmisPart.Commands CommandCount = DmisCommands.Count Set DmisCommand = DmisCommands.Item(CommandCount) repName = format(now(),"YYYYMMDDHHNNSS") savePath = "D:\PC-DMIS Data\Scripts\TEMP\" repFolder = left(DmisPart.Name,len(DmisPart.Name)-4) OutputFileNameAndPath = savePath & repFolder & repName & ".TXT" Open OutputFileNameAndPath For Output As #1 For Each DmisCommand In DmisCommands If DmisCommand.IsFeature Then '' If DmisCommand.Type = 612 Or DmisCommand = 202 Or DmisCommand = 245 Then If Left(DmisCommand.ID, 3) = "CIR" Then Set FCmd = DmisCommand.FeatureCommand tX = DmisCommand.GetText(THEO_X, 0) tY = DmisCommand.GetText(THEO_Y, 0) tD = FCmd.TheoDiam 'tD = PCDCommand.GetText(THEO_DIAM, 0) mX = DmisCommand.GetText(MEAS_X, 0) mY = DmisCommand.GetText(MEAS_Y, 0) mD = FCmd.MeasDiam 'mD = PCDCommand.GetText(MEAS_DIAM, 0) mRound = FCmd.GetFormError() tRound = 0 tL= DmisCommand.GetText(THEO_LENGTH, 0) mL = DmisCommand.GetText(MEAS_LENGTH, 0) tW =DmisCommand.GetText(THEO_WIDTH, 0) mW = DmisCommand.GetText(MEAS_WIDTH, 0) Write #1, DmisCommand.ID & ", " & tX & ", " & tY & ", " & tD & ", " & tRound & ", " & mX & ", " & mY & ", " & mD & ", " & mRound & ", " & tL & ", " & mL & ", "& tW & ", " & mW If mRound>0.3 Then End If End If Next DmisCommand Close #1 End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |