Your Products have been synced, click here to refresh
PNT1 =FEAT/CONTACT/EDGE POINT/DEFAULT,CARTESIAN THEO/<0,-50,97.137>,<0,-0.7071068,0.7071068>,<0,-0.7071068,0.7071068> ACTL/<0,-50,97.137>,<-1,0,0>,<0,-0.7071068,0.7071068> TARG/<0,-50,97.137>,<0,-0.7071068,0.7071068>,<0,-0.7071068,0.7071068> MEASURE ORDER=SURFACE SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO PNT2 =FEAT/POINT,CARTESIAN,NO THEO/<0,-50,97.137>,<0,-0.7071068,0.7071068> ACTL/<0,0,0>,<0,0,1> CONSTR/POINT,CAST,PNT1.XYZ
SCN1 =FEAT/SCAN,SECTIONSCAN,NUMBER OF HITS=14,SHOW HITS=NO,SHOWALLPARAMS=NO MEAS/SCAN BASICSCAN/LINE,NUMBER OF HITS=14,SHOW HITS=NO,SHOWALLPARAMS=NO ENDSCAN ENDMEAS/ SCAN_PNT1 =FEAT/POINT,CARTESIAN,NO THEO/<0,0,0>,<0,0,1> ACTL/<0,0,0>,<0,0,1> CONSTR/POINT,CAST,SCN1.HIT[1].XYZ SCAN_PNT2 =FEAT/POINT,CARTESIAN,NO THEO/<0,0,0>,<0,0,1> ACTL/<0,0,0>,<0,0,1> CONSTR/POINT,CAST,SCN1.HIT[2].XYZ
[...] if DmisCommand.Type = CONTACT_EDGE_POINT_FEATURE then retval = DmisCommand.GetText (MEAS_X, 0) retval = DmisCommand.GetText (MEAS_Y, 0) retval = DmisCommand.GetText (MEAS_Z, 0) end if [...]
[...] if DmisCommand.Type = BASIC_SCAN_OBJECT then For iCount = 1 To DmisCommand.GetText (N_HITS, 0) retval = DmisCommand.GetText(MEAS_X, iCount) retval = DmisCommand.GetText(MEAS_Y, iCount) retval = DmisCommand.GetText(MEAS_Z, iCount) Next iCount end if [...]
Sub Main_230709() ' Dim something --------------------------- Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Cmds As Object Set Cmds = Part.Commands Dim Cmd As Object Set Cmd = Nothing Dim sPath As String Dim iPoints As Integer Dim mx(), my(), mz() As Double ' File sPath = "C:\Test.txt" Open sPath For Output As #1 ' search For Each Cmd In Cmds If Cmd.Type = BASIC_SCAN_OBJECT Then iPoints = Cmd.GetText(N_HITS, 0) ReDim mx(iPoints) ReDim my(iPoints) ReDim mz(iPoints) For iCount = 1 To iPoints mx(iCount) = Cmd.GetText(MEAS_X, iCount) my(iCount) = Cmd.GetText(MEAS_Y, iCount) mz(iCount) = Cmd.GetText(MEAS_Z, iCount) 'Print #1, "MOVE/POINT,NORMAL,<", xm, ",", ym, ",", zm, ">" Next iCount End If Next Cmd Close #1 ' add retVal = Cmds.InsertionPointAfter(Cmds.LastCommand) For iCount = 1 To iPoints Set Cmd = Cmds.Add(MOVE_POINT, True) Cmd.Marked = True retVal = Cmd.SetToggleString(1, NORM_RELEARN, 0) retVal = Cmd.PutText(CStr(mx(iCount)), THEO_X, 0) retVal = Cmd.PutText(CStr(my(iCount)), THEO_Y, 0) retVal = Cmd.PutText(CStr(mz(iCount)), THEO_Z, 0) Next iCount Part.RefreshPart End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |