Business Rule: CATRule to Define Initial Values of a Machining Resource

You can use a Business Logic to customize the initial default values of a machining resource, such as a tool or a tool assembly. You can also apply multiple Business Rules to customize the default attribute values of different types of resources.

This page discusses:

General Information

The Business Logic can either be added as a CATRule file or it can be defined in the DataSetup app.

If the script is created through DataSetup, it will be persistent in the database, stored on the server and available to all.

If the script created using a CATRule, it can only be executed as long as both files InitResourceAttributes.CATRule and InitResourceAttributes.CATRuleExit are present in ..\resources\knowledge\scripts. The files can be invoked by editing the CATRule file or by creating a new CATRule and CATRuleExit files with an Opening ID of InitResourceAttributes_ID.

Note: The Opening ID cannot be changed.

The CATRuleExit file contains the information about the script to be executed on the specific type. The CATRule file contains the logic to upgrade the tool resource.

Note: The logic should not exceed 100 characters.

The Business Rule is then executed when creating a tool or a tool assembly.

Input Objects

You can use the attributes of a tool. Input objects must be of the following types:

  • MfgDrillTool
  • MfgTapTool
  • MfgThreadMillTool
  • MfgCounterSinkTool
  • MfgReamerTool
  • MfgSpotDrillTool
  • MfgCenterDrillTool
  • MfgMultiDiamDrillTool
  • MfgBoringAndChamferingTool
  • MfgTwoSidesChamferingTool
  • MfgCounterboreMillTool
  • MfgEndMillTool
  • MfgFaceMillTool
  • MfgConicalMillTool
  • MfgTSlotterTool
  • MfgBarrelMillTool
  • MfgLensTool

Attribute Information

Use the following names to set the corresponding default attribute values:

Attribute ISO Parameter
MFG_ANGLE2 Step included angle (STA_3)
MFG_BODY_DIAM Shank diameter (DMM)
MFG_CHAMFR_DIAM1 Cutting diameter 2 (DC_2)
MFG_CHAMFR_DIAM2 Cutting diameter 3 (DC_3)
MFG_CORNER_RAD Corner radius (RE)
MFG_CORNER_RAD_2 Upper corner radius (RE2)
MFG_CUT_ANGLE Tool cutting edge angle (KAPR)
MFG_CUT_LENGTH Depth of cut maximum (APMX)
MFG_ENTRY_DIAM Entry diameter (DE)
MFG_LENGTH Head length (LH)
MFG_LENGTH_1 Step diameter length (SDL_2)
MFG_LENGTH_2 Step diameter length (SDL_3)
MFG_LOWER_ANGLE Bottom tool cutting edge angle (KAPR1)
MFG_LOWER_DIAM Bottom cutting diameter (DC1)
MFG_NOMINAL_DIAM Cutting diameter (DC)
MFG_OUTSIDE_DIAM Cutting diameter max (DCX)
MFG_OVERALL_LGTH Overall length (OAL)
MFG_TAPER_ANGLE Taper angle (STA_2)
MFG_TL_TIP_LGTH Point length (PL)
MFG_UPPER_ANGLE Top tool cutting edge angle (KAPR2)
MFG_UPPER_DIAM Top cutting diameter (DC2)
MFG_NON_CUT_DIAM Non cut diameter (dn)
MFG_TIP_ANGLE Tip angle (E)
MFG_TIP_RADIUS Tip radius (Re)
MFG_TIP_LENGTH Tip length (lt)
MFG_TOOL_ANGLE Tool angle (B)
MFG_RADIAL_DISTANCE Radial distance (Xce)
MFG_VERTICAL_DISTANCE Vertical distance (Zce)

For more information on tool attribute values, see Tool Resources for Milling and Drilling.

Example of usage

  • For CATRule file:

    Let EndMillTool(MfgEndMillTool)
    // Default values for End Mill Tool attributes
    Set EndMillTool = ThisObject
    If(EndMillTool <> NULL)
    {
    	EndMillTool.MFG_OVERALL_LGTH = 105mm
    }
    

  • For CATRuleExit file:

    <Scripts>
      <Script OpeningID="InitResourceAttributes_ID" Type="MfgEndMillTool" ScriptName="InitResourceAttributes" />
    </Scripts>