Jump to content

Using PCM to modify A PARA file


Recommended Posts

I am currently trying to build a program for our cmm to be used as a quarterly verification.  One of the things I want to do is if it determined that cert needs to be updated you can edit the PARA file mid run. I can get note pad to open, but I cant get the file to open. Here is what I have so far. 

// cert file and directory 
Certdata=getActualInspectionDir()+"\PCM\0154-16 Cert.PARA"

//text editor
texteditor="notepad.exe"

// inquire next steps if cert is out of date
u=0
update=0
cert_update=Certdata+texteditor

if q==1 then 
    u=confirm("The Calibration Date for the artifact has passed"+cr()+"Do you wish to continue run?")
    update=confirm("Do you wish to update the cert data now?")
endif 
if update==true then 
    systemCallWithWait(cert_update)
endif 

 

q is set to 1 in steps in the code earlier on if the date is found to be past. 

For the system call I am mimicking code that a former programmer set up, but I cant seem to find what step I am missing.

 

Thanks for the Help 

 

Link to comment
https://qualityforum.zeiss.com/topic/23817-using-pcm-to-modify-a-para-file/
Share on other sites

Try this one:

 

// cert file and directory 
Certdata=getActualInspectionDir()+"\PCM\0154-16 Cert.PARA"

//text editor
texteditor="notepad.exe "

// inquire next steps if cert is out of date
u=0
update=0
cert_update=texteditor + Certdata

if q==1 then 
    u=confirm("The Calibration Date for the artifact has passed"+cr()+"Do you wish to continue run?")
    update=confirm("Do you wish to update the cert data now?")
endif 
if update==true then 
    systemCallWithWait(cert_update)
endif 

 

×
×
  • Create New...