Modify Relay Pin Attribute at Creation or Renaming

An opening ID is an entry point used to customize business logic. The Relay Pin Attribute at Creation or Renaming opening ID is available in the Electrical Logical Resources resource set and is used to define the name of the pins in a relay.

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 content under a relay is added.

This opening ID is used to customize the name of the pins.

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject: the pin.
  • Parameters: corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
ContentPort RFLVPMLogicalPort Read Component port from the contact or coil to be added under a relay.
ContentInstance RFLVPMLogicalInstanceRead Instance of the contact or coil to be added under a relay.

Sample

The following sample shows how to define the pins names of a relay.

let ContentPort (RFLVPMLogicalPort)
let ContentInst (RFLVPMLogicalInstance)
let RelayPin (RFLVPMLogicalPort)
let PinName (String)

set ContentPort = Parameters->GetAttributeObject("ContentPort")
set ContentInst = Parameters->GetAttributeObject("ContentInstance")
set RelayPin = ThisObject//Parameters->GetAttributeObject("RelayPin")

if (ContentInst <> NULL)
{
	if (ContentInst.IsASortOf("EleLogicalOperatingDeviceInst"))
	{		
		if (RelayPin <> NULL)
		{
			PinName = RelayPin.GetAttributeString("PLM_ExternalID")
			RelayPin.SetAttributeString("PLM_ExternalID", "A" + PinName)	
		}
	}
}