Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
IsRoot | Boolean |
Read | True if the component is the root product reference of the product structure, False otherwise. |
ItemName | String | Read | Name of the family item currently resolved. It is equal to the value of the identification column (PartNumber column or first one if no PartNumber column is present.) |
ItemIndex | Integer | Read | Index of the family item currently resolved. |
GenericModel | PLMEntity | Read | Cloned component reference. |
RevisionIndex | Integer | Read | Index of the Component Family Definition revision. This revision index is equal to 1 at the Component Family Definition creation, and incremented each time a new version of the Generic Model is applied. |
Sample
The following sample shows how to modify the PLM_ExternalID
of the component to clone with the Component Family Definition item name if the root of the cloned structure is considered and in the other case, how to build this PLM_ExternalID
based on the cloned component PLM_ExternalID
concatenated with the Component Family Definition item index.
let generic (PLMEntity)
let isroot (Boolean)
let index (Integer)
let itemname (String)
set generic = Parameters.GetAttributeObject("GenericModel")
isroot = Parameters.GetAttributeBoolean("IsRoot")
index = Parameters.GetAttributeInteger("ItemIndex")
itemname = Parameters.GetAttributeString("ItemName")
if (isroot == true)
{
ThisObject.PLM_ExternalID = itemname
}
else
{
ThisObject.PLM_ExternalID = generic.PLM_ExternalID + "_" + ToString(index)
}