Rule to Get Father for 2D Facet Instance

An opening ID is an entry point used to customize business logic. Using the Schematic_GetFatherFor2DFacetInstance opening ID, you can filter the list of possible locations where a facet can be created during the Replace Multiple Objects Using Architecture Components command.

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 using the Replace Multiple Objects Using Architecture Components command.

This opening ID is used to filter the list of possible locations where a facet can be created.

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

Input Objects

Input objects must be of the following types:

  • ThisObject: Logical Occurence
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
FactType Occurrence Read The occurrence containing the piping/electrical/HVAC design and linked to the architecture component system.
Input_ListPossibleFathersFor2DFacet List Read The input list of the possible fathers for the new facet. These are the titles of the references having a reference-reference implement link with the system of the architecture component for which a facet is to be created.
Output_SelectedFatherFor2DFacet String Write The output name of the selected father for the 2D facet.

Sample

The following sample illustrates how to use the Schematic_GetFatherFor2DFacetInstance opening ID.

Notify('Schematic_Get2DFacetCreationContext Called')
let ListOfAvailableContext(List)
set ListOfAvailableContext = Parameters.GetAttributeObject("Input_ListPossibleFathersFor2DFacet")

let numobj(Integer)
set numobj = ListOfAvailableContext.Size()

let Context(String)
let i(Integer)
set i = 1
for i while i <= numobj //side ListOfSelObj
{
	let TmpContext(String)
	set TmpContext=ListOfAvailableContext.GetItem(i)
	if(TmpContext like '*Contribution*')
	{
		Notify('Schematic_Get2DFacetCreationContext Successful')
		Context=TmpContext
		break
	}
}

Parameters.SetAttributeString("Output_SelectedFatherFor2DFacet", Context)