Rule to Filter Logical Ports to Be Exposed (Schematic_FilterLogicalPortsToExpose)

An opening ID is an entry point used to customize business logic. The Schematic_FilterLogicalPortsToExpose opening ID is used to define the ports to be exposed.

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 use the following commands:

  • Create Architecture Components: when Business Rule option selected to expose port after itemization
  • Create or Reuse Logical Facet: when new facet instance is created and its ports are exposed.
  • Remap Symbol using Exposed Ports: when new facet instance is created and its ports are exposed.

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

Input Objects

Input objects must be of the following types:

  • ThisObject: PLM Instance
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
Fact object (input) PLM Instance Read Logical instance of 2D facet
CommandArg (input) Integer Read The operation ID corresponding to the command that is calling the rule:

1: calls the rule from Create ITEMS From Selection .

2: calls the rule from Create or Reuse an Item Facet.

ItemObject (input) PLM Instance Read architecture component logical instance object linked to the input facet logical instance.
Note: NULL if there is no linked architecture component object
ListOfPorts (Input) List Read List of all the ports on the logical instance, applicable for exposition.
BoolListToExpose (Output) List Write List of Boolean indicating the corresponding port to be exposed or not.

It must be mapped with ListOfPorts.

Note: The opening ID can be define to exclude some type of ports If the opening ID is not attached to theRule to Filter Logical Ports to Be Exposed resource, all ports are exposed by default. If the opening ID is defined but fails, no ports are exposed.

Exposing Ports

the following rule exposes only the ports that contains Port 1 as a substring in the port name:

let ListOfPorts (List)
set ListOfPorts  = Parameters.GetAttributeObject("ListOfPorts")
let op_BoolListToExpose(List)
let LogicalPort(RFLVPMLogicalPort)
let strPortName(String)
let i = 1
let isize = 0
let index(Integer)
set index = -1
set isize = ListOfPorts->Size()
for i while i<=isize
{		
	set LogicalPort = ListOfPorts->GetItem(i)
	set strPortName = LogicalPort.Name
	set index = strPortName->Search("Port 1")
	if(-1 == index)
	{
		op_BoolListToExpose.Append(false)
	}
	else
	{
		op_BoolListToExpose.Append(true)
	}
	i = i+1	
}

Parameters.SetAttributeObject("BoolListToExpose", op_BoolListToExpose)