WirePort
A wire port is created on a wire edge, i.e. a free edge that does not form a face boundary.
Example
app = cf.GetApplication() project = app:NewProject() -- Create a line line = project.Geometry:AddLine(cf.Point(0,0,0),cf.Point(1,1,0)) -- Create a wire port on the line port = project.Ports:AddWirePort(line.Wires[1])
Inheritance
Property List
- DefinitionMethod
- The wire port type definition. (Read/Write WirePortDefinitionMethodEnum)
- Faulty
- True if the port is faulty. (Read only boolean)
- Label
- The port label. (Read/Write string)
- Location
- The port location on the wire. (Read/Write WirePortLocationEnum)
- PolarityReversed
- The option to reverse polarity of the port. (Read/Write boolean)
- PositionPercentage
- The port position on the wire specified as a percentage (Range 0-100). Location must be set to SpecifiedManually for this property to take effect. (Read/Write Expression)
- Suspect
- True if the port is suspect. (Read only boolean)
- Terminal
- The port terminal. (Read only Terminal)
- Type
- The object type string. (Read only string)
- Visible
- Specifies whether the port must be shown or hidden. (Read/Write boolean)
- Wire
- The free wire to which the port is connected. (Read/Write Edge)
Method List
- Delete ()
- Delete the port.
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
- SetProperties (properties table)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Static Function List
- GetDefaultProperties ()
- Creates a table containing the default settings to create an object. (Returns a table object.)
Property Details
- DefinitionMethod
- The wire port type definition.
- Type
- WirePortDefinitionMethodEnum
- Access
- Read/Write
- Faulty
- True if the port is faulty.
- Type
- boolean
- Access
- Read only
- Label
- The port label.
- Type
- string
- Access
- Read/Write
- Location
- The port location on the wire.
- Type
- WirePortLocationEnum
- Access
- Read/Write
- PolarityReversed
- The option to reverse polarity of the port.
- Type
- boolean
- Access
- Read/Write
- PositionPercentage
- The port position on the wire specified as a percentage (Range 0-100). Location must be set to SpecifiedManually for this property to take effect.
- Type
- Expression
- Access
- Read/Write
- Suspect
- True if the port is suspect.
- Type
- boolean
- Access
- Read only
- Terminal
- The port terminal.
- Type
- Terminal
- Access
- Read only
- Type
- The object type string.
- Type
- string
- Access
- Read only
- Visible
- Specifies whether the port must be shown or hidden.
- Type
- boolean
- Access
- Read/Write
- Wire
- The free wire to which the port is connected.
- Type
- Edge
- Access
- Read/Write
Method Details
- Delete ()
- Delete the port.
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
- Return
- table
- A properties table.
- SetProperties (properties table)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- Input Parameters
- properties(table)
- A table of properties defining the new state of the object.
Static Function Details
- GetDefaultProperties ()
- Creates a table containing the default settings to create an object.
- Return
- table
- The default properties table.