Rule to Filter Architecture Component for Replace

An opening ID is an entry point used to customize business logic. Using the EscItm_FilterItemsForReplace opening ID, you can filter the list of possible architecture components when replacing objects by 2D logical facet.

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 proposed architecture components.

Definition Description
PLM Opening ID EscItm_FilterItemsForReplace
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_ListSelectedOccurrences List (string) Read The input list of the selected objects. These objects are the selected objects to be replaced during the command.
Input_ListOfListAvailableItems List (string) Read The input list of the list of available Items. Each list corresponds to the list of architecture components for a selected occurrence in Input_ListSelectedOccurrences. This list contains the architecture number values for the architecture components.
Output_ListOfListFilteredItems List (string) Write The output list of the list of filtered architecture number values for the architecture components.

Sample

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

let ListOfSelObj(List)
let ListOfListAvailItem(List)
let ListOfListFilterItem(List)

set ListOfSelObj = Parameters.GetAttributeObject("Input_ListSelectedOccurrences")
set ListOfListAvailItem = Parameters.GetAttributeObject("Input_ListOfListAvailableItems")

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

let LogicalOcc(LogicalOccurrence)

let i(Integer)
set i = 1
for i while i <= numobj //side ListOfSelObj
{
	set LogicalOcc = ListOfSelObj.GetItem(i) 
 	let LogicalInst(RFLVPMLogicalInstance)
	set LogicalInst = LogicalOcc.Instance
	
	let archinum(String)
	set archinum = LogicalInst.GetAttributeString("V_description")
 
	let ListOfAvailItem(List)
	let ListOfFilterItem(List)
	set ListOfAvailItem = ListOfListAvailItem.GetItem(i)

	let numItem(Integer)
	set numItem = ListOfAvailItem.Size()

	let itemindx(Integer)
	set itemindx = 1
 
	for itemindx while itemindx <= numItem
	{
		let availArchiNum(String)
		set availArchiNum = ListOfAvailItem.GetItem(itemindx)
		
		let findx(Integer)
		findx = archinum.Search(availArchiNum)
	
		if (findx <> -1 )
		{
			ListOfFilterItem.Append(availArchiNum)
		}
	}
	
	let fitmsize(Integer)
	set fitmsize = ListOfFilterItem.Size()

	if(fitmsize <> 0)
		ListOfListFilterItem.Append(ListOfFilterItem)
	else
		ListOfListFilterItem.Append(ListOfAvailItem)		
}

Parameters.SetAttributeObject("Output_ListOfListFilteredItems", ListOfListFilterItem)