Is it possible to change diameter or offset values of a probe with a code ? (instead of open the probe window / edit / write the values).
Ok, it seems to be dangerous, but it could be useful.....
Your Products have been synced, click here to refresh
Sub[SIZE=2][COLOR=#000000] Main()[/COLOR] [/SIZE]Dim pcd As Object Dim prg As Object Dim pd As Object Dim diam As Double Dim tip As Object Set pcd = CreateObject("pcdlrn.application", "") Set pd = new pcdlrn.pointdata Set prg = pcd.ActivePartProgram prg.Probes.Visible = False Set tip = prg.Probes("STA6").Tips("T1A0B0") 'Get tip data Set pd = tip.MeasXYZ diam = tip.MeasDiam 'Change tip data pd.X = pd.X + 0.001 pd.Y = pd.Y + 0.002 pd.Z = pd.Z + 0.003 diam = diam + 0.004 'Write tip data And save changes Set prg.Probes("STA6").Tips("T1A0B0").MeasXYZ = pd prg.Probes("STA6").Tips("T1A0B0").MeasDiam = diam prg.Probes.SaveChanges EndSub
'Write tip data And save changes Set prg.Probes("STA6").Tips("T1A0B0").MeasXYZ = pd prg.Probes("STA6").Tips("T1A0B0").MeasDiam = diam prg.Probes.SaveChanges
'Write tip data And save changes Set tip.MeasXYZ = pd tip.MeasDiam = diam prg.Probes.SaveChanges
Basically I delete all unwanted tips from the probe file (but store the data from them first)
Calibrate the remaining ones
Then add the deleted one back in
Heads up - I was unable to write modified data to uncalibrated tips. When you add the deleted tips back - they may be flagged as uncalibrated.
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |