Jump to content

Executing PCM script after every feature in any program


Recommended Posts

Hello,

I am trying to run a PCM script after every feature in any inspection. This is working fine through a "plugin_postFeature_pcm.txt" file inside a specific measurement plan directory. However, when I move this file to the default global inspection directory (workarea/inspections) it does not execute after every feature. In fact, it does not execute at all.

To me, it seems like the "plugin_{pre/post}{Feature/Characteristic}_pcm.txt" files can not execute if they are not inside an actual measurement plan. Other PCM scripts (e.g. inspection_start_pcm.txt) do work from the global inspection directory, but aforementioned 4 specific files are never ran. This behaviour does not seem to be documented and I can not find any issue concerning this on the internet either.

Does anyone have an idea of how to solve this issue, or a workaround? I would prefer not having to add the script to every individual measurement plan, we have hundreds of programs and the risk of having older/multiple versions of said script floating around is rather high.

Kind regards,
Jelle
Hello,

the workaround could be to copy the "plugin_post_feature_pcm.txt" after loading the actual measurement plan.
Make a "inspection_post_load_pcm.txt" file to copy the files while loading the plan.

for Example:

if fileExists("plugin_postFeature_pcm.txt") == false
mysource = "C:\Users\Public\Documents\Zeiss\CALYPSO 7.2\workarea\inspections\plugin_postFeature_pcm.txt"
myfile = getActualInspectionDir()+"\plugin_postFeature_pcm.txt"
copyFile(mysource,myfile)
endif

both files has to be in the global inspection folder......

Good luck
  • 3 months later...
Hello

I have a question about plugin files.
I tried to use it and mostly works, but not all information can be extracted from features/characteristics.

I need to extract the name of the characteristic which running now.
if I use in the characteristic pre/post settings (inside measurement plan)
name = getNominal().identifier
then give me information which I need
but the same command in the file plugin_preCharacteristic_pcm.txt or plugin_postCharacteristic_pcm.txt give me an error message.

please help (Calypso 5.8)

Please sign in to view this quote.


If you see: in the error message that you have is not indicated on the characteristic; it comes from somewhere else, you should have an indication of where is located the error (see my screeenshots). Then maybe you have the command somewhere else, if not, definitely is a software bug…

2022-08-04_16h06_52.png2022-08-04_15h59_57.png

Is no other formulas. This is a program which was created to show issues.
Simple program with characteristics (all PCM windows is empty) and plugin file in the program folder. Nothing else.

I need to grab the name of the characteristic without program edit.
Around 1000 programs with a long list of characteristics.

Maybe someone knows the different solutions to extract the name of characteristics, but not all, this one only which is used in the current measurement (without masked, out of miniplans, or excluded thru condition)

Thanks for help
×
×
  • Create New...