Compute List of Custom Attribute (L2P_ComputeFamilyCustomAttributes)

An opening ID is an entry point used to customize business logic. The Compute List of Custom Attribute opening ID is available in the Logical to Physical Assistant Resources resource set.

This page discusses:

General Information

This opening ID is invoked to get list of custom attributes for each family in logical to physical command. This rule will be triggered once for each family at start of “Logical to physical Assistant” command.

This opening ID is used to provide information about:

  • Custom columns to be added for the family in the table.
  • Their association with other column values for the computation of the status icon.

Definition Description
PLM Opening ID L2P_ComputeFamilyCustomAttributes
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: None
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
FamilyID String Read Family ID for which custom attributes are to be computed.
ListCustomAttributeNames List Write List of names of custom attributes.
ListCustomAttributeTypes List Write

List of names for a type of custom attribute value.

The size of the list should match with size of the ListCustomAttributeNames parameter.

ListAssociatedAttributes List Write

List of names for associated attribute with the same value type.

The value of a custom attribute is compared with the associated attribute to display the icon and the tooltip. This can be empty if the custom attribute is not associated with any other attribute.

The size of the list should match with size of the ListCustomAttributeNames parameter.

Sample

let iList(List)
let oAttrList(List)
let oAttrType(List)
let oAttrAssocAttr(List)

let sFamilyName(STRING)
let sDescriptionInst(String)
let sDescriptionRef(String)
let sMessage (STRING)

set sFamilyName = Parameters.GetAttributeString("FamilyID")

if (sFamilyName == "Equipment")
{
	oAttrList.Append("Test EQT Attr1")
	oAttrList.Append("Test EQT Attr2")
	oAttrType.Append("String")
	oAttrType.Append("String")
	oAttrAssocAttr.Append("")
	oAttrAssocAttr.Append("Test EQT Attr1")
}
else if (sFamilyName == "Cable")
{
	oAttrList.Append("Test Cable Attr1")
	oAttrList.Append("Test Cable Attr2")
	oAttrType.Append("String")
	oAttrType.Append("String")
	oAttrAssocAttr.Append("")
	oAttrAssocAttr.Append("Test Cable Attr1")
}

Parameters.SetAttributeObject("ListCustomAttributeNames", oAttrList )
Parameters.SetAttributeObject("ListCustomAttributeTypes", oAttrType )
Parameters.SetAttributeObject("ListAssociatedAttributes", oAttrAssocAttr )
Notify("Custom attributes added for family #", sFamilyName)