CableInstanceCollection

A collection of cable instances.

Example

app = cf.GetApplication()
project = app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/Cables.cfx]])

    -- Get 'CableCrossSection' and 'CableHarness'

twistedPair = project.Cables.CrossSections["TwistedPair1"]
cableHarness = project.Cables.Harnesses["CableHarness1"]

    -- Get cable connectors

startConnector = cableHarness.Connectors["CableConnector1"]
endConnector = cableHarness.Connectors["CableConnector2"]

    -- Create new 'CableInstance'

cableInstance = cableHarness.CableInstances:Add(twistedPair, startConnector, endConnector)

Usage locations (collections)

The following objects contain the CableInstanceCollection collection:

Property List

Count
The number of CableInstance items in the collection. (Read only number)
Type
The object type string. (Read only string)

Method List

Add (crosssection CableCrossSection, startconnector CableConnector, endconnector CableConnector)
Adds a new cable instance to the harness. (Returns a CableInstance object.)
Add (properties table)
Adds a new cable instance to the harness using table of properties. (Returns a CableInstance object.)
Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
Item (index number)
Returns the CableInstance at the given index. (Returns a CableInstance object.)
Item (label string)
Returns the CableInstance with the given label. (Returns a CableInstance object.)
Items ()
Returns a table of CableInstance. (Returns a List of CableInstance object.)
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)

Index List

[number]
Returns the CableInstance at the given index in the collection. (Read CableInstance)
[string]
Returns the CableInstance with the given name in the collection. (Read CableInstance)

Property Details

Count
The number of CableInstance items in the collection.
Type
number
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Method Details

Add (crosssection CableCrossSection, startconnector CableConnector, endconnector CableConnector)
Adds a new cable instance to the harness.
Input Parameters
crosssection(CableCrossSection)
The cross section for the cable instance.
startconnector(CableConnector)
The start connector.
endconnector(CableConnector)
The end connector.
Return
CableInstance
The cable instance.
Add (properties table)
Adds a new cable instance to the harness using table of properties.
Input Parameters
properties(table)
The table of properties defining the cable instance.
Return
CableInstance
The cable instance.
Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the CableInstance.
Return
boolean
The success of the check.
Item (index number)
Returns the CableInstance at the given index.
Input Parameters
index(number)
The index of the CableInstance.
Return
CableInstance
The CableInstance at the given index.
Item (label string)
Returns the CableInstance with the given label.
Input Parameters
label(string)
The label of the CableInstance.
Return
CableInstance
The CableInstance with the given label.
Items ()
Returns a table of CableInstance.
Return
List of CableInstance
A table of CableInstance.
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
boolean
The generated unique name label for CableInstance.