Electrical Logical Functions and Methods

This document describes the functions and methods you can use to create Knowledgeware checks or rules for electrical logical objects.

These functions are available since you select the ElectricalLogicalFunction package from Me > Preferences > Parameters and Measure > Knowledge Environment tab.

Important: An RFLPVPMLogicalInstance is a logical instance of a PLMElecLogicalNet/NetGroup/Wire/Cable.

This page discusses:

AddToElecGroup

This function adds the second instance from the structure of the first one.

Signature

AddToElecGroup(OwnerInstance : RFLVPMLogicalInstance, InstanceToAdd : RFLVPMLogicalInstance) : Boolean

Arguments

Name Input / Output Required? Type Comment
OwnerInstance In Yes RFLVPMLogicalInstance None
InstanceToAdd In Yes RFLVPMLogicalInstance None

ReturnType

Boolean

The function returns TRUE if it succeeds and FALSE if a problem occurred.

AddToHarness

This function adds a component to the harness through an occurrence. In the case of Logical Disconnects, you can add a specific connector port.

Signature

AddToHarness(HarnessOcc : LogicalOccurrence, ComponentOcc : LogicalOccurrence, Target : RFLVPMLogicalPort) : Boolean

Arguments

Name Input/Output Required? Type Comment
HarnessOcc In LogicalOccurrence -
ComponentOcc In LogicalOccurrence -
Target In RFLVPMLogicalPort -

ReturnType

Boolean

Example

let Port (RFLVPMLogicalPort)

AssociateRoutable

This function associates a wire/cable with a net/net group.

Signature

AssociateRoutable(NetOccurrence : LogicalOccurrence, WireOccurrence : LogicalOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
NetOccurrence In Yes LogicalOccurrence None
WireOccurrence In Yes LogicalOccurrence None

ReturnType

Boolean

The function is TRUE if it succeeds, FALSE if a problem occurred.

DisassociateRoutable

This function dissociates a wire/cable with a net/net group.

Signature

DisassociateRoutable(NetOccurrence : LogicalOccurrence, WireOccurrence : LogicalOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
NetOccurrence In Yes LogicalOccurrence None
WireOccurrence In Yes LogicalOccurrence None

ReturnType

Boolean

The function is TRUE if it succeeds, FALSE if a problem occurred.

GetElecEnds

This function retrieves the logical ports and the logical instances the input is connected to, through logical connections.

Signature

GetElecEnds(ElectricalConductor : RFLVPMLogicalInstance, ListOfPorts : List, ListOfComponents : List) : Boolean

Arguments

Name Input / Output Required? Type Comment
ElectricalConductor In Yes RFLVPMLogicalInstance None
ListOfPorts Out Yes List None
ListOfComponents Out Yes List None

ReturnType

Boolean

The function is TRUE if it succeeds, FALSE if a problem occurred.

GetElecGroupOwner

This function retrieves the net group/cable of a net/net group or wire/cable.

Signature

GetElecGroupOwner(GroupedInstance : RFLVPMLogicalInstance) : RFLVPMLogicalInstance

Arguments

Name Input / Output Required? Type Comment
GroupedInstance In Yes RFLVPMLogicalInstance None

ReturnType

RFLVPMLogicalInstance

RFLVPMLogicalInstance of the PLMElecLogical NetGroup/Cable under which the input object is grouped.

GetElecGroupedObjects

This function retrieves the content of a net group/cable.

Signature

GetElecGroupedObjects(OwnerInstance : RFLVPMLogicalInstance) : List

Arguments

Name Input / Output Required? Type Comment
OwnerInstance In Yes RFLVPMLogicalInstance None

ReturnType

List

List (RFLVPMLogicalInstance): all the instances of PLMElecLogicalNet/NetGroup/Wire/Cable grouped into the input object.

GetElectricalConnectedEnds

This function navigates through a list of ports to retrieve the electrical objects and the ports connected to the input component.

Signature

GetElectricalConnectedEnds(Component : LogicalOccurrence, ListOfComponentPortToNavigateThrough : List, ListOfComponentTargetFound : List, ListOfComponentPortTargetFound : List) : Boolean

Arguments

Name Input / Output Required? Type Comment
Component In Yes LogicalOccurrence None
ListOfComponentPortToNavigateThrough In Yes List None
ListOfComponentTargetFound Out Yes List None
ListOfComponentPortTargetFound Out Yes List None

ReturnType

Boolean

The function is TRUE if it succeeds, FALSE if a problem occurred.

GetElectricalConnectedEndsWithFilters

This function retrieves the ends of a given component occurence.

Signature

GetElectricalConnectedEndsWithFilters(Component : LogicalOccurrence, ComponentTypeFilter : String, PortTypeFilter : String, ListOfComponentPortToNavigateThrough : List, ListOfComponentTargetFound : List, ListOfComponentPortTargetFound : List) : Boolean

Arguments

Name Input/Output Required? Type Comment
Component In Yes LogicalOccurrence Input component
ComponentTypeFilter In Yes String

Name of the component type to be retrieved. (connected to the input component).

PortTypeFilter In Yes String -Type of port to be retrieved
ListOfComponentPortToNavigateThrough In Yes List input ports
ListOfComponentTargetFound Out Yes List Lists the components to be retrieved.
ListOfComponentPortTargetFound Out Yes List Lists the corresponding ports.

ReturnType

Boolean

GetHarness

This function retrieves the harness group occurrence.

Signature

GetHarness(ElecLogicalOccurrence : LogicalOccurrence) : EleLogicalHarnessOcc

Arguments

Name Input / Output Required? Type Comment
ElecLogicalOccurrence In Yes LogicalOccurrence The electrical logical object occurrence: wire, cable, connector…

ReturnType

ElecLogicalHarness

The harness occurrence groups the input object.

GetHarnessContent

This function retrieves the harness content.

Signature

GetHarnessContent(OwnerInstance : RFLVPMLogicalInstance, ListOfContent : List) : Boolean

Arguments

Name Input / Output Required? Type Comment
OwnerInstance In Yes RFLVPMLogicalInstance None
ListOfContent Out Yes List None

ReturnType

Boolean

List (RFLVPMLogicalInstance): all the instances PLMElecLogical wires, cables and connectors.

GetPhysicalRoutedLength

This function retrieves physical routed lengths for logical conductor occurrence.

Signature

LogicalOccurrence->GetPhysicalRoutedLength (PhysicalRoutedLength: out Length) : Boolean

Arguments

Name Input / Output Required? Type Comment
LogicalOccurrence In Yes ElecLogicalOccurrence The electrical logical conductor occurrence: conductor, wire, cable, cable group
LENGTH Out Yes Length Length of the physical conductor linked to the logical conductor occurrence

ReturnType

Boolean

The function returns TRUE if it succeeds and FALSE if a problem occurred.

Example

let length(LENGTH)
let value(String)
this->GetPhysicalRoutedLength(length )
value=ToString(length)
Message(value)

GetNominalPower

This method retrieves the nominal power for logical equipment reference.

Signature

LogicalOccurence ->GetNominalPower(NominalPower:out Real) : Boolean

Arguments

Name Input / Output Required? Type Comment
LogicalReference In Yes EnsLogicalEquipment None
Nominal Power Out Yes Real None

ReturnType

Boolean

Example

Let value(Real)
Let svalue(String)
thisObject->GetNominalPower(value)
svalue=ToString(value)

Message(svalue)

SetNominalPower

This method allows you to set the nominal power for logical equipment reference.

Signature

LogicalOccurence ->SetNominalPower(NominalPower:Real) : Boolean

Arguments

Name Input / Output Required? Type Comment
LogicalReferce In Yes EnsLogicalEquipment None
Nominal Power In Yes Real None

ReturnType

Boolean

Example

Let value(Real)
Let svalue(String)
thisObject->SetNominalPower(2.2)

IsPinReserved

This function retrieves the status of pin of a component and a list of reservation attributes.

Signature

IsPinReserved(Pin : RFLVPMLogicalPort, ElectricalComponent : RFLVPMLogicalInstance, Status : Boolean, ListOfResservationValues : List) : Boolean

Arguments

Name Input / Output Required? Type Comment
Pin In Yes RFLVPMLogicalPort None
ElectricalComponent In Yes RFLVPMLogicalInstance None
Status Out Yes Boolean None
ListOfResservationValues Out Yes List None

ReturnType

Boolean

The function is TRUE if it succeeds, FALSE if a problem occurred.

ListAssociatedRoutables

This function retrieves a net allocated to a wire or a net group allocated to a cable.

Signature

ListAssociatedRoutables(OwnerOccurrence : LogicalOccurrence) : List

Arguments

Name Input / Output Required? Type Comment
OwnerOccurrence In Yes LogicalOccurrence None

ReturnType

List

List: lists the associated routables for the net/net group.

RemoveFromElecGroup

This function removes the second instance from the structure of the first one.

Signature

RemoveFromElecGroup(OwnerInstance : RFLVPMLogicalInstance, InstanceToRemove : RFLVPMLogicalInstance) : Boolean

Arguments

Name Input / Output Required? Type Comment
OwnerInstance In Yes RFLVPMLogicalInstance None
InstanceToRemove In Yes RFLVPMLogicalInstance None

ReturnType

Boolean

The function is TRUE if it succeeds, FALSE if a problem occurred.

RemoveFromHarness

This function removes a component to the harness through an occurrence.

Signature

RemoveFromHarness(HarnessOcc : LogicalOccurrence, ComponentOcc : LogicalOccurrence, Target : RFLVPMLogicalPort) : Boolean

Arguments

Name Input/Output Required? Type Comment
HarnessOcc In LogicalOccurrence -
ComponentOcc In LogicalOccurrence -
Target In RFLVPMLogicalPort -

ReturnType

Boolean

Example

let Port (RFLVPMLogicalPort)

GetTerminalBlock

This function retrieves the terminal block object from a terminal block grouping structure (the topmost grouping object).

Signature

GetTerminalBlock(Component : LogicalOccurrence, TerminalBlock : LogicalOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
Component In Yes LogicalOccurrence None
TerminalBlock Out Yes LogicalOccurrence None

ReturnType

Boolean

The function is TRUE if it succeeds. FALSE if a problem occurred. If no terminal block is found, the output logical occurrence will be NULL.

GetTerminalGroup

This function retrieves the terminal group object of a terminal block grouping structure (the second topmost grouping object).

Signature

GetTerminalGroup(Component : LogicalOccurrence, TerminalGroup : LogicalOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
Component In Yes LogicalOccurrence None
TerminalGroup Out Yes LogicalOccurrence None

ReturnType

Boolean

The function is TRUE if it succeeds. FALSE if a problem occurred. If no terminal group is found, the output logical occurrence will be NULL.

CreateNetGroupExtremity

This function creates a net group extremity and a net group port. This function only works on simple scenarios where every net is connected to one of the pins of the equipment only once.

Signature

CreateNetGroupExtremity(EquipmentOcc : LogicalOccurrence, NetgroupOcc : LogicalOccurrence, ExtremityTypeString : String, PortNetGroupCreated : Port) : Boolean

Arguments

Name Input / Output Required? Type Comment
EquipmentOcc In Yes LogicalOccurrence Describes the equipment’s side of the net group extremity.
NetgroupOcc In Yes LogicalOccurrence Describes the current net group on which you want to create the net group extremity.
ExtremityTypeString In Yes String The type of the net group extremity: EleLogicalShieldedGroupExtremity, EleLogicalTwistedGroupExtremity , or EleLogicalTwistedShieldedGroupExtremity.
PortNetgroupCreate Out Yes RFLVPMLogicalPort Creates a net group port.

ReturnType

Boolean

The function is TRUE if it succeeds. It is FALSE if a problem occurs.

Example

let sTypeExtremity(String)
let NetGroupPort(RFLVPMLogicalPort)
let sResult (Boolean)
sTypeExtremity="EleLogicalShieldedGroupExtremity"
sResult=CreateNetGroupExtremity(Eqpt,NetGroup,sTypeExtremity,NetGroupPort)

CreateNetGroupExtremityForPins

This function creates a net group extremity and a net group port concerning certain pins on certain equipments. The input list of equipment pins must have an equipment pin connected to each one of the nets inside the net group.

Signature

CreateNetGroupExtremityForPins(ListEquipmentOcc : List, ListEquipmentPins : List, NetgroupOcc : LogicalOccurrence, ExtremityTypeString : String, PortNetGroupCreated : Port) : Boolean

Arguments

Name Input / Output Required? Type Comment
ListEquipmentOcc In Yes LogicalOccurrence Describes the equipment’s side of the net group extremity. One occurrence by pin exists in ListEquipmentPins.
ListEquipmentPins In Yes List Describes the equipment’s occurrences list side of the net group extremity. One pin by occurrence exists in ListEquipmentOcurrences.
NetgroupOcc In Yes LogicalOccurrence Describes the current net group on which you want to create the net group extremity.
ExtremityTypeString In Yes String The type of the net group extremity: EleLogicalShieldedGroupExtremity, EleLogicalTwistedGroupExtremity , or EleLogicalTwistedShieldedGroupExtremity.
PortNetgroupCreate Out Yes RFLVPMLogicalPort Creates a net group port.

ReturnType

Boolean

The function is TRUE if it succeeds. It is FALSE if a problem occurs.

Example

let EquipmentList(List)
let EquipmentPinList(List)
let sTypeExtremity(String)
let NetGroupPort(RFLVPMLogicalPort)
let NetGroupPort2(RFLVPMLogicalPort)
let EquipmentInstance(RFLVPMLogicalInstance)
let sResult (Boolean)
set EquipmentInstance = Eqpt.Instance
EquipmentPinList = EquipmentInstance.Query("EleLogicalPin","x.Name==\"A\" OR x.Name==\"B\" OR x.Name==\"C\"" )
EquipmentList.Append(Eqpt)
EquipmentList.Append(Eqpt)
EquipmentList.Append(Eqpt)
sTypeExtremity="EleLogicalShieldedGroupExtremity"
sResult=CreateNetGroupExtremityForPins(EquipmentList,EquipmentPinList,NetGroup,sTypeExtremity,NetGroupPort)

GetHarnessOccurrenceContent

This function lists the harness content through an occurrence.

Signature

GetHarnessOccurrenceContent(HarnessOcc : LogicalOccurrence, ListOfOccurencePortContent : List) : Boolean

Arguments

Name Input/Output Required? Type Comment
HarnessOcc In LogicalOccurrence -
ListOfOccurencePortContent Out List -

ReturnType

Boolean

Example

let ListContent(List)
let ListContentTarget(List)
let ListOccTarget(List)
let ContentOcc(LogicalOccurrence)
let ContentPort(RFLVPMLogicalPort)


GetHarnessOccurrenceContent(HarnessOcc,ListContent)

for ListOccTarget inside ListContent{
	ContentOcc = ListOccTarget.GetItem(1)
	Notify(ContentOcc.Name)
	if ListOccTarget.Size()==2{
		ContentPort  = ListOccTarget.GetItem(2)
		Notify(ContentPort.Name)
	}
}

GetNetGroupExtremity

This function retrieves net group extremities and the associated net group ports. This function only works on simple scenarios where every net is connected to one of the pins of the equipment only once.

Signature

GetNetGroupExtremity(EquipmentOcc : LogicalOccurrence, NetgroupOcc : LogicalOccurrence), ExtremityTypeString : String, PortNetgroupCreated : Port) : Boolean

Arguments

Name Input / Output Required? Type Comment
EquipmentOcc In Yes LogicalOccurrence Describes the equipment’s side of the net group extremity.
NetgroupOcc In Yes LogicalOccurrence Describes the current net group on which you want to create the net group extremity.
ExtremityTypeString Out Yes String The type of the net group extremity.
Note: It shoud be empty when the function is called.
PortNetgroupCreate Out Yes RFLVPMLogicalPort Creates the net group port of the retrieved net group extremity.

ReturnType

Boolean

The function is TRUE if it succeeds. It is FALSE if a problem occurs.

Example

let sTypeExtremity(String)
let NetGroupPort(RFLVPMLogicalPort)
let sResult (Boolean)
sTypeExtremity=""
sResult=GetNetGroupExtremity(Eqpt,NetGroup,sTypeExtremity,NetGroupPort)

GetNetGroupExtremityFromPins

This function retrieves net group extremities and the associated net group ports described by certain pins of certain equipments. The input list of equipment pins must have an equipment pin connected to each one of the nets inside the net group to allow creation.

Signature

GetNetGroupExtremityFromPins(ListEquipmentOcc : List, ListEquipmentPins : List, NetgroupOcc : LogicalOccurrence), ExtremityTypeString : String, PortNetgroupCreated : Port) : Boolean

Arguments

Name Input / Output Required? Type Comment
ListEquipmentOcc In Yes LogicalOccurence Describes the equipment’s occurrences list side of the net group extremity. One occurrence by pin exists in ListEquipmentPins.
ListEquipmentPins In Yes List Describes the equipment’s pins list side of the net group extremity. One pin by occurrence exists in ListEquipmentOcurrences.
NetgroupOCC In Yes LogicalOccurence Describes the current net group on which you want to create the net group extremity.
ExtremityTypeString Out Yes String The type of the net group extremity.
Note: It shoud be empty when the function is called.
PortNetgroupCreate Out Yes RFLVPMLogicalPort Creates a net group port of the retrieved net group extremity.

ReturnType

Boolean

The function is TRUE if it succeeds. FALSE if a problem occurred.

Example

let EquipmentList(List)
let EquipmentPinList(List)
let sTypeExtremity(String)
let sTypeExtremity2(String)
let NetGroupPort(RFLVPMLogicalPort)
let NetGroupPort2(RFLVPMLogicalPort)
let EquipmentInstance(RFLVPMLogicalInstance)
let sResult (Boolean)
set EquipmentInstance = Eqpt.Instance
sTypeExtremity=""
EquipmentPinList = EquipmentInstance.Query("EleLogicalPin","x.Name==\"A\" OR x.Name==\"B\" OR x.Name==\"C\"" )
EquipmentList.Append(Eqpt)
EquipmentList.Append(Eqpt)
EquipmentList.Append(Eqpt)
sResult= GetNetGroupExtremityFromPins (EquipmentList,EquipmentPinList,NetGroup,sTypeExtremity,NetGroupPort)

DeleteNetGroupExtremity

This function deletes a net group extremity and the associated net group port. This function only works on simple scenarios where every net is connected to one of the pins of the equipment only once.

Signature

DeleteNetGroupExtremity(EquipmentOcc : LogicalOccurrence, NetgroupOcc : LogicalOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
EquipmentOcc In Yes LogicalOccurrence Describes the equipment’s side of the net group extremity.
NetgroupOcc In Yes LogicalOccurrence Describes the current net group on which you want to create the net group extremity.

ReturnType

Boolean

The function is TRUE if it succeeds. FALSE if a problem occurred.

Example

let sResult (Boolean)
sResult=DeleteNetGroupExtremity(Eqpt,NetGroup)

DeleteNetGroupExtremityFromPins

This function deletes a net group extremity and the associated net group described by certain pins of certain equipments. The input list of equipment pins must have an equipment pin connected to each one of the nets inside the net group to allow creation.

Signature

DeleteNetGroupExtremityFromPins(ListEquipmentOcc : List, ListEquipmentPins : List, NetgroupOcc : LogicalOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
ListEquipmentOcc In Yes LogicalOccurrence Describes the equipment’s occurrences list side of the net group extremity. One occurrence by pin exists in ListEquipmentPins.
ListEquipmentPins In Yes List Describes the equipment’s pins list side of the net group extremity. One pin by occurrence exists in ListEquipmentOcurrences.
NetgroupOcc In Yes LogicalOccurrence Describes the current net group on which you want to create the net group extremity.

ReturnType

Boolean

The function is TRUE if it succeeds. FALSE if a problem occurred.

Example

let EquipmentList(List)
let EquipmentPinList(List)
let EquipmentInstance(RFLVPMLogicalInstance)
let sResult (Boolean)
set EquipmentInstance = Eqpt.Instance
EquipmentPinList = EquipmentInstance.Query("EleLogicalPin","x.Name==\"A\" OR x.Name==\"B\" OR x.Name==\"C\"" )
EquipmentList.Append(Eqpt)
EquipmentList.Append(Eqpt)
EquipmentList.Append(Eqpt)
sResult= DeleteNetGroupExtremityFromPins (EquipmentList,EquipmentPinList,NetGroup)