hexagon logo

PartProgram.Probes returning Application.Probes

Hi Everyone,

I've learned a lot from this forum and would like to thank those taking the time to pass along their trials and tribulations. Like some others I am the only one in our company using the CMM so am without the benefit of a more experienced co-worker.

I've written a small utility to document the probe build components in a program. Originally I had hoped to use the PartProgram.Probes collection which supposedly "returns this part program's Probes collection object". For me, this is actually returning all probes listed in my probes search path location. Instead of getting the Part Program Probes collection it seems to provide the Application Probes collection. I'm currently having to loop through all a programs commands in order to trap the LOADPROBE and pull the components. Has anyone run into this before? Am I going about it wrong? Running 2014 SP1 and coding in Excel 2010.

Sub ListPartProgramProbes()
	Dim DmisApp as PCDLRN.Application
	Dim DmisPart as PCDLRN.PartProgram
	Dim DmisPrbs as PCDLRN.Probes
	Dim DmisPrb as PCDLRN.probe
	
	Set DmisApp = CreateObject("PCDLRN.Application")
	Set DmisPart = DmisApp.ActivePartProgram
	Set DmisPrbs = DmisPart.Probes
	
	For Each DmisPrb in DmisPrbs
		Debug.Print DmisPrb.Name
	Next DmisPrb
	
	Set DmisPrb = Nothing
	Set DmisPrbs = Nothing
	Set DmisPart = Nothing
	Set DmisApp = Nothing
End Sub
Parents
  • Everything looks good in your code. Probably help file semantics. I like the way you interpreted it. Would be handy to be able to get only the probes used by the program. As opposed to all the probes available to the program.

    You say tomato, i say tomahto Slight smile

    Sent from my SPH-L710 using Tapatalk
Reply
  • Everything looks good in your code. Probably help file semantics. I like the way you interpreted it. Would be handy to be able to get only the probes used by the program. As opposed to all the probes available to the program.

    You say tomato, i say tomahto Slight smile

    Sent from my SPH-L710 using Tapatalk
Children
No Data