Your Products have been synced, click here to refresh
public sub getprobeoffsets( _ byval buffer as pointdata _ )
Sub Main Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDPrbOffset Dim rad As Double Set PCDApp = CreateObject("PCDLRN.Application") Set PCDPartPrograms = PCDApp.PartPrograms Set PCDPartProgram = PCDApp.ActivePartProgram Set PCDPrbOffset = CreateObject("PCDLRN.PointData") Set PCDOB = PCDPartProgram.OldBasic PCDOB.GetProbeOffsets(PCDPrbOffset) rad=PCDOB.GetProbeRadius MsgBox(rad) Set PCDCommands = Nothing Set PCDPartProgram = Nothing Set PCDPartPrograms = Nothing Set PCDApp = Nothing Set PCDPrbOffset = Nothing Set PCDOB = Nothing End Sub
This should allow us to access the properties from the GetProbeOffsets, but everytime I run this, it crashes PC-DMIS.
[SIZE=2][FONT=courier new][COLOR=#000000]Sub Main()[/COLOR] [COLOR=#000000] Dim pcd As Application[/COLOR] [COLOR=#000000] Dim pd As PointData[/COLOR] [COLOR=#000000] Set pcd = CreateObject("PCDLRN.Application", "")[/COLOR] [COLOR=#000000] Set pd = CreateObject("PCDLRN.PointData", "")[/COLOR] [COLOR=#000000] Set pd = pcd.ActivePartProgram.Probes(pcd.ActivePartProgram.CurrentProbeName).Tips("T1A0B0").XYZ[/COLOR] [COLOR=#000000] MsgBox (pd.X & "," & pd.Y & "," & pd.Z)[/COLOR] [/FONT][/SIZE][FONT=Arial][SIZE=3][COLOR=#000000][SIZE=2][FONT=courier new]End Sub[/FONT][/SIZE] [/COLOR][/SIZE][/FONT]
@DJAMS:
Set pd = pcd.ActivePartProgram.Probes(pcd.ActivePartProgram.CurrentProbeName).Tips("T1A0B0").XYZ
"T1A0B0" is not active tip,could you tell how to get the active tip at currentcommand line like this ASSIGN/V1=PROBEDATA("OFFSET","") returns XYZ offsets for the active tip
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |