Business Rule: CATRule to Customize Manufacturing Fastener Parameters from PLM Attributes

Using a CATRule, you can customize manufacturing fastener parameters using Synchronize Data with Planning from the Setup section of the action bar.

This page discusses:

General Information

The DELGetManufFastenerAttributes.CATRule is located in ..\resources\knowledge\scripts and can be invoked when creating a manufacturing fastener using Synchronize Data with Planning from the Setup section of the action bar.

This business rule is executed by default when creating a manufacturing fastener using the command Synchronize Data with Planning. If this rule is undefined, the CATRule DELPLMMapAttributesForMFTCreation.CATRule is executed. For more information, see Business Rule: CATRule to Propagate Manufacturing Fastener Attributes From Planning.

Input Objects

You can use the attributes of the design fastener references and instances or their respective implementing process references and instances for the implementation. Input objects must be of the following types:

  • FastenerOccurrence: Fastener product occurrence.
  • ProcessOccurrence: Manufacturing item process occurrence.
  • OperationOccurrence: Planning operation occurrence.

Context Object Parameters

Parameter Name Type Read/Write
Params_Name List Write
Params_Type List Write
Params_Value List Write
Params_Editability List Write

Additional Information

Use the following names to set the corresponding default manufacturing fastener attributes:

Name Attribute
RefName Reference name
Diameter Diameter
Length Length
StackDepthMin Minimum stack length
StackDepthMax Maximum stack length
Color Color
Name Manufacturing fastener name

Example of usage

Let PrdOcc(ProductOccurrence)
Let MfgItemOcc(MfgProcessOccurrence)
Let OperationOcc(ProdSystemOccurrence)
Let OutParams_Name(List)
Let OutParams_Type(List)
Let OutParams_Value(List)
Let OutParams_Editability(List)

Let String_Value(string)
Let int_Value(integer)
Let MfgItemInst(DELFmiFunctionInstance)
Let OperationRef(PLMEntity)
Let PrdRef(VPMReference)
Let ListOfFastenedParts(List)
Let FastenerOcc(SpotAssyFastenerOccurrence)
Let FastenedPartOcc(ProductOccurrence)

/* ----------------------------------------------------------------------------------*/
/* Get input objects */
/* ----------------------------------------------------------------------------------*/
PrdOcc= Parameters->GetAttributeObject("FastenerOccurrence") 
MfgItemOcc= Parameters->GetAttributeObject("ProcessOccurrence") 
OperationOcc= Parameters->GetAttributeObject("OperationOccurrence") 

/* ----------------------------------------------------------------------------------*/
/* Get Fastened part name from Prd occurrence*/
/* ----------------------------------------------------------------------------------*/
String_Value = ""
set FastenerOcc = PrdOcc
ListOfFastenedParts = FastenerOcc.FastenedParts
if (ListOfFastenedParts.Size() >0)
{
	FastenedPartOcc= ListOfFastenedParts.GetItem(1)
	PrdRef = FastenedPartOcc.Reference
	String_Value = PrdRef.Name
}
OutParams_Name.Append("FastenedPart")
OutParams_Type.Append("string")
OutParams_Value.Append(String_Value)
OutParams_Editability.Append(0)

/* ----------------------------------------------------------------------------------*/
/* Get fasten process name */
/* ----------------------------------------------------------------------------------*/
String_Value = ""
Set MfgItemInst = MfgItemOcc.Instance
String_Value = MfgItemInst->GetAttributeString("PLM_ExternalID")
OutParams_Name.Append("ProcessName")
OutParams_Type.Append("string")
OutParams_Value.Append(String_Value)
OutParams_Editability.Append(0)

/* ----------------------------------------------------------------------------------*/
/* Get ope code from operation type*/
/* ----------------------------------------------------------------------------------*/
int_Value = 100
OperationRef = OperationOcc.Reference
if (OperationRef.IsASortOf("DELLmiRemoveMaterialOperationReference"))
	int_Value = 200
OutParams_Name.Append("OperationType")
OutParams_Type.Append("integer")
OutParams_Value.Append(int_Value)
OutParams_Editability.Append(1)

/* ----------------------------------------------------------------------------------*/
/* Color */
/* ----------------------------------------------------------------------------------*/
OutParams_Name.Append("Color")
OutParams_Type.Append("Color")
OutParams_Value.Append("yellow")
OutParams_Editability.Append(0)

/* ----------------------------------------------------------------------------------*/
/* Thick */
/* ----------------------------------------------------------------------------------*/
OutParams_Name.Append("Tot_thick")
OutParams_Type.Append("length")
OutParams_Value.Append(0.1/1000.)
OutParams_Editability.Append(1)

/* ----------------------------------------------------------------------------------*/
/* Resync */
/* ----------------------------------------------------------------------------------*/
OutParams_Name.Append("Resync")
OutParams_Type.Append("boolean")
OutParams_Value.Append("false")
OutParams_Editability.Append(1)

/* ----------------------------------------------------------------------------------*/
/* RefName (standard param) */
/* ----------------------------------------------------------------------------------*/
Set PrdRef = PrdOcc.Reference
String_Value = PrdRef.Name
OutParams_Name.Append("#RefName")
OutParams_Type.Append("string")
OutParams_Value.Append(String_Value)
OutParams_Editability.Append(0)

/* ----------------------------------------------------------------------------------*/
/* Return the output lists */
/* ----------------------------------------------------------------------------------*/
Parameters->SetAttributeObject("Params_Name", OutParams_Name)
Parameters->SetAttributeObject("Params_Type", OutParams_Type)
Parameters->SetAttributeObject("Params_Value", OutParams_Value)
Parameters->SetAttributeObject("Params_Editability", OutParams_Editability)