Assembly Pattern Resources: Assembly Pattern Instance Renaming

An opening ID is an entry point used to customize business logic. Assembly Pattern Instance Renaming defines automatically the names of created instances in Assembly Pattern.

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 ID is invoked whenever the Assembly Pattern is run in creation mode.

This opening ID is used to customize pattern instance names.

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

PLM Opening ID: Assembly_Pattern_Instance_Renaming
Customization intent: Execution
Execution context: Client

Input Objects

Input objects must be of the following types:

  • ThisObject corresponds to the reference of the selected component to instantiate.
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read/Write Comments
CompToInstantiateRefName String Read/Write Defines the reference name of selected component to instantiate.
SpecPatternRefName String Read/Write Defines the reference name of selected specification pattern.
GenericPatternInstanceName String Read/Write Sets the Generic pattern instance name.
NumberingRangeStartValue Integer Read/Write Sets the start value of pattern instance numbering range.
NumberingRangeIntervalValue Integer Read/Write Sets the interval value of pattern instance numbering range.
IntermediateCompRefName String Read/Write Sets the intermediate product reference name.

Sample

The following sample illustrates how to customize assembly pattern instance renaming opening.

/* Variables to store Input parameters */
Let varCompToInstantiateRefName = ""
Let varSpecPatternRefName = ""

Let varPatternInstacePrefix = "PatternInstanceOf"
Let varPatternInstaceSuffix = "AsPatternInstance"

/* Variables to store Output parameters */
Let varGenericPatternInstanceName = ""
Let varIntermediateCompRefName = ""

/* Get Input: Retrieve the component to instantiate reference name */
varCompToInstantiateRefName = Parameters.GetAttributeString("CompToInstantiateRefName")
varSpecPatternRefName = Parameters.GetAttributeString("SpecPatternRefName")

/* Calculate Output: create a generic pattern instance name using any combination of prefix, comp. ref. name, spec. pattern name and postfix */
varGenericPatternInstanceName = varPatternInstacePrefix + varCompToInstantiateRefName + varSpecPatternRefName
varIntermediateCompRefName = “GatheringOf” + varGenericPatternInstanceName;

/* Set Output: Return the output parameters including generic pattern instance name */
Parameters.SetAttributeString("GenericPatternInstanceName", varPatternInstanceName)
Parameters.SetAttributeString("NumberingRangeStartValue”, 10);
Parameters.SetAttributeString("NumberingRangeIntervalValue”, 5);
Parameters.SetAttributeString("IntermediateCompRefName”, varIntermediateCompRefName);