Introduction
This document is intended to provide a detailed guide and examples on how to automate the user attribute creation on MAFs (Machining Axial Features)
Version – Validated on 2026x FD01 (FP)
Pre-requisites: User must be assigned with Owner Role
Licenses –
CSV (Collaborative Industry Innovator)
NTX (NC Milling Machine Programmer)
Disclaimer: Licenses mentioned above are as per 2026x documentation.Below video demonstrates the implementation of the business rule and its effect during MAF creation for automated user attributes creation.
Example Business Rule
Detail Explanation
Using business rule for MAF User Attributes we can automate and standardize the creation of User Attributes on MAFs during it creation process. Also, when MAFs are already created, while updating out of date features, the user attributes are created automatically.
Following script will explain how to automate the user attributes creation during MAF creation process.
Check Hole Type of MAFs created
We can implement MAF type specific user attributes using this business rule. First check the MAF Type
/* MAF Types
0 : Simple
1 :
2 : Counterbored
3 : Countersunk
4 : Counterdrilled */
if (ThisObject<>NULL)
{
MafType=ThisObject.HoleType
Notify("Name : #",ThisObject.Name)
Notify("Type : # !",MafType)
}Based on MAF Type set user attribute values
OutParams_Name.Append("MyString")
OutParams_Type.Append("string")
if (MafType==0)
OutParams_Value.Append("My Simple Hole")
else if (MafType==2)
OutParams_Value.Append("My Counterbored Hole")
else if (MafType==3)
OutParams_Value.Append("My Countersunk Hole")
else if (MafType==4)
OutParams_Value.Append("My Counterdrilled Hole")
OutParams_Name.Append("MyInteger")
OutParams_Type.Append("integer")
if (MafType==0)
OutParams_Value.Append(0)
else if (MafType==2)
OutParams_Value.Append(20)
else if (MafType==3)
OutParams_Value.Append(30)
else if (MafType==4)
OutParams_Value.Append(40)Set some common user attributes (if any)
OutParams_Name.Append("MyReal")
OutParams_Type.Append("real")
OutParams_Value.Append(5.5)
OutParams_Name.Append("MyLength")
OutParams_Type.Append("length")
OutParams_Value.Append(0.97)
OutParams_Name.Append("MyAngle")
OutParams_Type.Append("angle")
OutParams_Value.Append(3.14159)
OutParams_Name.Append("MyBool")
OutParams_Type.Append("boolean")
OutParams_Value.Append("false")Set any additional MAF Type specific user attributes (if any)
/* Additional parameter only aivalable for a certain type */
if (MafType==0)
{
OutParams_Name.Append("SpecificUserAttribute-1")
OutParams_Type.Append("string")
OutParams_Value.Append(" Simple Hole SpecificUserAttribute")
}
else if (MafType==4)
{
OutParams_Name.Append("SpecificUserAttribute-4")
OutParams_Type.Append("real")
OutParams_Value.Append(666.666)
}Set Output
/* OUTPUTS */
Parameters->SetAttributeObject("Params_Name", OutParams_Name)
Parameters->SetAttributeObject("Params_Type", OutParams_Type)
Parameters->SetAttributeObject("Params_Value", OutParams_Value)Business Rule Setup
Business Rule opening Id - DELGetMAFAttributes_ID
The Business Rule can be executed in two different ways.
DataSetup App: If you create the script through DataSetup, it remains persistent in the database, is stored on the server and available to all. The script opening ID will be available under Machining Business Logic.
CATRule/CATRuleExit: If you create the script using a CATRule, you must store the files
DELGetMAFAttributes.CATRuleandDELGetMAFAttributes.CATRuleExitin..\\resources\\knowledge\\scripts. You can then edit the CATRule file or create a new CATRule and CATRuleExit files with an Opening ID of DELGetMAFAttributes_ID.<strong>Note: </strong>The <strong>Opening ID</strong> cannot be changed. Be careful while using this method as the setup is done on local machine and it is not available to all users. Each user will have to do the setup individually.
Reference
-
Author
Person of Contact - @Sheetal MARDE
Special Thanks to @Vivek BAGALKOT and @Pavankumar K M for providing support in this topic.
