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
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
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.
- 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.