Attribute Valuation Computation for Family Items (ComponentsFamilyNaming)

An opening ID is an entry point used to customize business logic. Attribute Valuation Computation for Family Items is called when resolving Component Family Definition items (by code, through catalog integration or within family editor. The goal of the Business Logic is to provide new identification attributes values for generated components.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening is invoked for any reference (PLMCoreReference andPLMCoreRepReference) included into a Product structure that results from the cloning of the Product structure defining the Component Family Definition generic model, except for the design table representation.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: ComponentsFamilyNaming
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
IsRootBoolean ReadTrue if the component is the root product reference of the product structure, False otherwise.
ItemNameStringReadName 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.)
ItemIndexIntegerReadIndex of the family item currently resolved.
GenericModelPLMEntityReadCloned component reference.
RevisionIndexIntegerReadIndex 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)
}