Modify Entities after Creating Links between Cable/Wires and between Net Group/Nets (ELE_ModifyGroupConductor)

An opening ID is an entry point used to customize business logic. The Modify Entities after Creating Links between Cable\Wires and between Net Group\Nets opening ID is available in the Electrical Logical Resources resource set and it is used to modify the entities' properties after the creation or deletion of the grouping links between a cable and wires or between a net group and nets.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when grouping link is created or removed between electrical route lines.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: ELE_ModifyGroupConductor
Customization intent: Execution
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: instance of cable or net group in which wires or nets are grouped or ungrouped.
  • Parameters: corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
ModeString ReadAdd when a link is created and Remove when a link is deleted.
ActionListListRead List of content on which Add or Remove are applied on.
ExistingListListRead List of existing content already linked to help the user defining his business rule.

Sample

The following sample illustrates how to modify the properties of entities after the creation or the deletion of links between cable/wires and net group/nets.

/* Rule : ELE_ModifyGroupConductor */
/*
ThisObject : #In RFLVPMLogicalInstance
Parameters : #In RuleContext
*/
 
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 ActionEnd (RFLVPMLogicalInstance)
let ExistingEnd (RFLVPMLogicalInstance)
 
let i (Integer)
 
let ObjID=""
let description=""
 
set sMode = Parameters->GetAttributeString("Mode")
set ActionList = Parameters->GetAttributeObject("ActionList")
set ExistingList = Parameters->GetAttributeObject("ExistingList")
 
 
nbActionEnds = ActionList->Size()
nbExistingEnds = ExistingList->Size()
 
set i = 1
if (sMode == "Add")
{
	description = "Add: "
	for i while i <= nbActionEnds 
	{
		ActionEnd  = ActionList.GetItem (i)
		if ActionEnd <> NULL
		{
			ObjID = ActionEnd->GetAttributeString("PLM_ExternalID")
			description = description + " -" + ObjID
 
		}
	}
	ThisObject->SetAttributeString("V_description", description)
}
 
if (sMode == "Remove")
{
	description = "Remove: "
	for i while i <= nbActionEnds 
	{
		ActionEnd  = ActionList.GetItem (i)
		if ActionEnd <> NULL
		{
			ObjID = ActionEnd->GetAttributeString("PLM_ExternalID")
			description = description + " -" + ObjID
		}
	}
	ThisObject->SetAttributeString("V_description", description)
}