Naming Components at Creation (RFLP_PostTreatment_AfterCreation)

An opening ID is an entry point used to customize business logic. The RFLP_PostTreatment_AfterCreation business logic allows you to define the name a layout or a sheet. You can also define the name of the function or logical instance according to the creation mode.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when you perform the following actions:

  • Insert a new layout
  • Insert a new sheet
  • Insert a new view
  • Insert a new function
  • Insert a new logical component
  • Cut and paste
  • Copy and paste
  • Drag and drop

This opening ID is used to customize:

  • The name of a layout or a sheet according to the functional or logical reference under which it is attached.
  • The name of the function or logical instance according to the creation mode.
  • The graphical properties according to the attributes value or other criteria.

When only a reference is created (for example, the creation of a layout or sheet reference directly under a functional or logical component), the business logic is called after the reference creation.

When an instance (with its reference if needed) is created for example, standard instantiation, cut and paste, copy and paste, drag and drop), the business logic is called after the instance creation.

Definition Description
PLM Opening ID RFLP_PostTreatment_AfterCreation
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject:
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
CreationMode String Read Insert, cut and paste, copy and paste
Note: The drag and drop is similar to the cut and paste

This input parameter is valuated with the cut, copy or drag action. It is added to the business logic during the paste operation.

AttachReference PLMCoreReference Read Functional or logical reference used to attach the layout, the sheet or the view structure when using the following commands:
  • Insert New Layout when the reference is directly attached under a functional or logical component.
  • Insert New Sheet when reference is directly attached under a functional or logical component.
  • Insert New Sheet instance (standard instantiation under a layout reference.
  • Insert New View instance (standard instantiation under a sheet reference)

Functional or logical reference parent of the old instance when using:

  • Cut and paste
  • Copy and paste
  • Drag and drop

InstanceName String Write Instance name used for a cut and paste or a drag drop operation. This is the name of the instance selected to report this naming to the new instance created after the operation.

Sample

The following sample

Let sCreationMode (String)
Let sInstanceName (String)
Let spAttachReference(PLMCoreReference)
Let PrimaryType(Type)
Let TName=""

spAttachReference = Parameters->GetAttributeObject("AttachReference")
sCreationMode = Parameters->GetAttributeString("CreationMode")
sInstanceName = Parameters->GetAttributeString("InstanceName")
spAttachReference.GetAttributeString("PLM_ExternalID"))

set PrimaryType = ThisObject.PrimaryType
TName = PrimaryType.Name

if(TName=="DIFLayout" or TName=="DIFSheet" )
{
	sInstanceName = ThisObject.GetAttributeString("V_Name")
	ThisObject.SetAttributeString("V_Name", sInstanceName + "ABC")	
}
else
{
	
	//FReference=ThisObject.Reference
	sInstanceName = ThisObject.GetAttributeString("PLM_ExternalID")
	ThisObject.SetAttributeString("PLM_ExternalID", sInstanceName + "ABC")	
}