General InformationThe 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 Input ObjectsYou 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:
Context Object Parameters
Additional InformationUse the following names to set the corresponding default manufacturing fastener attributes:
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)
| ||||||||||||||||||||||||||||||||||||||