I believe the only way to safegaurd against that is to run in Operator Mode as VPT suggested. If it's malfunctioning then I would get ahold of Hexagon and have them fix it, or reinstall it.
You can certainly code this yourself but Hexagon already has a product that will do exactly this. Ask your salesperson if it is possible to purchase Bladerunner without having to purchase the full Blade software package (which I assume that you don't need, or you would have it already.) Bladerunner is just a VB front end interface that Hexagon whipped up to help package together, and call as a group, the many files required for Blade to function. It is extremely handy for executing any Pcdmis program. It does a few really nice things:
- Allows you to call programs by selecting a part number and operation number from two drop down menus.
- Allows you to define a list of programs that will execute in sequence when that particular part number and op number are called.
- Captures traceability information in a form window and writes it to a text document that can easily be read into your programs.
- Copies the called program to a temp folder and exectues it. This leaves your master program untouched. So you can store all of your programs in a read only network directory and it will copy them down to the local machine when they are called and execute them. This allows you to very easily have one master network directory servicing programs to multiple machines.
The operator only interacts with Bladerunner. They never launch pcdmis directly and pcdmis closes as soon as program execution has ended so no opportunity for them to monkey with anything.
That sounds like a very useful tool, but getting it approved for purchase could be a little difficult. I will definitely ask Hexagon about it and, in the mean time, continue searching for a way to program what I desire myself. Thank you for your helpful suggestion