Jump to content

New to PCM


Recommended Posts

Clarke,

A couple things:

1) The syntax is definitely with a capital "F" as in...loadCADFile.
2) I would remove the code you have in the "Parameter" window and place it into the "Presettings" of the program. In my experience, the "Parameter" window is for you to set parameters that you can then use throughout the program. I am not sure if this is the place to input commands such as load file.
3) You can place the variables and load CAD command for each part size directly into the case specific coding. For example, place the S1 variables and loadCAD command in separate lines directly underneath the:
runPCMFile(dir + "\S1.txt") command

Hope this does the trick for you.

Keith
Link to comment
https://qualityforum.zeiss.com/topic/17448-new-to-pcm/#findComment-97804
Share on other sites

Please sign in to view this quote.

Yes, I think this is what the error message means: loadCADFile is a command, but the parameter window only supports variable assignments. So you could execute it if you'd write something like x=loadCADFile..., but that would probably still not solve the issue.
My guess is that the parameter assignments are executed before any pre- or postsettings and therefore the variable dir doesn't contain any value (or doesn't even exist) when loadCADFile is called.
Link to comment
https://qualityforum.zeiss.com/topic/17448-new-to-pcm/#findComment-97812
Share on other sites

I have a customer supplied program for about 2 dozen part numbers, written by a guy much smarter than I.
Ive actually learned a ton by digging into this program and reverse engineering parts into my own programs.

This is the code he used to swap cad models
clearCAD()
loadCADFile(getActualInspectionDir()+"\"+PN+".sat")

Note, the command getActualInspectionDir() will find your current program folder no matter where it is located, so when Calypso updates and all the programs are moved from Ziess\Calypso6.2 to Zeiss\Calypso6.6, the program isn't corrupted.

The way that i have used this tool is i load a cad model into the program, transform and heal it where i want it, then use CAD>Cadfile>Save and save it into the program file as a sat file. then when you recall the cad model everything is in place perfectly.

Funny story, this guy is a whiz at PCM, everything is parameterized in an excel sheet, much more than i ever thought was possible, but his programming of free form surfaces was entry level at best....
Link to comment
https://qualityforum.zeiss.com/topic/17448-new-to-pcm/#findComment-97816
Share on other sites

×
×
  • Create New...