General InformationThis opening ID is invoked during the Connector Port Links command. This opening ID is used to validate:
The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample checks whether or not the connector port groups only unique named pins. If not, linking is interrupted and a message issued. /* Rule : ELE_ValidateGroupConnector */
/*
ThisObject : #In RFLVPMLogicalPort
Parameters : #In RuleContext
Validation : #Out Boolean
*/
let sMode (String) /* "Add" or "Remove" modes */
let ActionList (List) /* Ends to validate action on */
let ExistingList (List) /* Existing ends */
let nbActionEnds (Integer)
let nbExistingEnds (Integer)
let Owner (RFLVPMLogicalReference)
let ActionEnd (RFLVPMLogicalPort)
let ExistingEnd (RFLVPMLogicalPort)
let i (Integer)
let j (integer)
set Owner = Parameters->GetAttributeObject("Owner")
set sMode = Parameters->GetAttributeString("Mode")
set ActionList = Parameters->GetAttributeObject("ActionList")
set ExistingList = Parameters->GetAttributeObject("ExistingList")
Validation=true
nbActionEnds = ActionList->Size()
nbExistingEnds = ExistingList->Size()
set i = 1
if (sMode == "Add")
{
for i while i <= nbActionEnds AND Validation == true
{
ActionEnd = ActionList.GetItem (i)
set j= 1
for j while j <= nbExistingEnds AND Validation == true
{
ExistingEnd = ExistingList.GetItem (j)
if (ActionEnd.PLM_ExternalID == ExistingEnd.PLM_ExternalID)
{
Validation = false
Parameters.Message = "Pin " + ActionEnd.PLM_ExternalID + " already exists"
Parameters.Severity = 1
}
}
}
}
| |||||||||||||||||||||||||||||