General Information
This opening ID is invoked when you edit the
Predefined Part Number and
Predefined Part Type attributes of a logical
piping part reference.
This opening ID is used to customize the following extension attributes:
- Predefined Part Number
- Predefined Part Type.
The table below provides you with information related to the definition
of the Opening ID.
PLM Opening ID:
|
ManagePredefinedPartType_PartNumber
|
Customization intent:
|
Computation
|
Execution context:
|
Client
|
Input Objects
Input objects must be of the following types:
ThisObject
: logical piping part to be analyzed for
the synchronization.
Parameters
corresponds to the context object.
Validation
: variable set to know if the validation
succeeded or failed.
- Severity information:
- Severity=0: the treatment is to be continued (no message).
- Severity=1: the treatment is to be continued and only a warning
raised.
- Severity=2: the treatment is supposed to be undone.
Context Object Parameters
Parameter Name
|
Type
|
Read/Write
|
Comments
|
GetAttributeValue (input)
|
Boolean
|
Read
|
Sets or gets the attributes' values available
in
ListAttributeName .
|
ListAttributeName (input)
|
List
|
Read
|
Defines the list of attributes' names.
|
ListAttributeValueToSet
(input)
|
List
|
Read
|
Defines the input argument.
|
ListComputedAttributeValue
(output)
|
List
|
Read
|
Defines the output argument.
|
Sample
The following sample explains how to use an opening ID to customize the
two extensions attributes:
- V_versionComment and V_descript
- V_Ens_PredefinedPartType
/* Rule created by IFB 6/20/2014 */
Let GetAttributeValue_Boolean (Boolean)
Let AttributeName_List (List)
Let AttributeValueToSet_String (List)
Let ComputedAttributeValue_List (List)
Let AttrNameString (String)
Let AttrValueString (String)
Let ThisReference (PLMEntity)
ComputedAttributeValue_List = Parameters.GetAttributeObject("ListComputedAttributeValue")
GetAttributeValue_Boolean = Parameters.GetAttributeBoolean("GetAttributeValue")
set AttributeValueToSet_String = Parameters.GetAttributeObject("ListAttributeValueToSet")
set ThisReference = ThisObject.Reference
if(GetAttributeValue_Boolean == true)
{
Trace(1, "GET_IFB", "Get")
if (ThisReference.HasAttribute("V_versionComment") == true )
{
Trace(1, "V_versionComment attribute found", "AttrFound")
ComputedAttributeValue_List.Append(ThisReference.GetAttributeString("V_versionComment"))
}
if (ThisReference.HasAttribute("V_description") == true )
{
Trace(1, "V_description attribute found", "AttrFound")
ComputedAttributeValue_List.Append(ThisReference.GetAttributeString("V_description"))
}
ComputedAttributeValue_List.Size()
Parameters.SetAttributeObject("ListComputedAttributeValue", ComputedAttributeValue_List)
}
else
{
Trace(1, "SET_IFB Set", "Set")
AttrValueString = AttributeValueToSet_String.GetItem(1)
AttributeName_List = Parameters.GetAttributeObject("ListAttributeName")
AttributeName_List.Size()
AttrNameString = AttributeName_List.GetItem(1)
if(AttrNameString == "V_Ens_PredefinedPartType")
{
if (ThisReference.HasAttribute("V_versionComment") == true )
{
Trace(1, "V_versionComment attribute found", "AttrFound")
ThisReference.SetAttributeString( "V_versionComment", AttrValueString)
}
}
else
{
if (ThisReference.HasAttribute("V_description") == true )
{
Trace(1, "V_description attribute found", "AttrFound")
ThisReference.SetAttributeString( "V_description", AttrValueString)
}
}
}