CATRule to Validate the NC Program Before the NC Output Generation

Using this CATRule, you can check and rework the NC Program before the NC Code gets created. This enables adding PPInstruction or checking the machining activities.

This page discusses:

General Information

You can add the Business Logic as a CATRule file or define it through the DataSetup app.

If you create the script through the DataSetup, it remains persistent in the database, is stored on the server and available to all.

If you create the script using a CATRule, you must store the files DELValidateNCOutput.CATRule and DELValidateNCOutput.CATRuleExit are present in ..\resources\knowledge\scripts. You can then edit the CATRule file or create a new CATRule and CATRuleExit files with an Opening ID of DELValidateNCOutput_ID.

You can then execute the Business Rule before generating the NC Output.

Input Objects

Input object must be ManufacturingProgram.

Example of Usage

For CATRule file:

Parameters.SetAttributeBoolean("CreateNCOutput", FALSE)
Parameters.SetAttributeString("AbortMessageString","Testing")
// Set the type of message to be sent to the user
// MessageType = 1 => Message is of Type Information
// MessageType = 2 => Message is of Type Warning
// MessageType = 3 => Message is of Type Fatal
Parameters.SetAttributeInteger("MessageType",3)

For CATRuleExit file:

<Scripts>
<Script OpeningID="DELValidateNCOutput_ID"
      Type="ManufacturingProgram" ScriptName="DELValidateNCOutput" />
</Scripts>