Introduction
Usage :openings to expose port during Create Item & Create/Reuse Item facet command
Datasetup Resource Set :
- Diagram Resource
Datasetup Resource : Schematic_FilterLogicalPortsToExpose / Rule to Filter the logical Ports that are allowed to be connected
Rule Example 1
Description
The opening ID is invoked in following commands:
- Create Item Command in cases when “business rule” option selected to expose port after itemization. CommandArg will be 1
- Create and reuse Item facet from diagram when new facet instance is created and its ports are exposed. CommandArg will be 2
- Enhance Remap using exposed port function with ITEM and facet management when new facet instance is created and its ports are exposed. CommandArg will be 2
For example, the following rule will expose only those ports that contains “Port 1” as a substring in port name:
Rule
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)
