WirePort

A wire port is created on a wire edge, i.e. a free edge that does not form a face boundary.

Example

application = cf.Application.getInstance()
project = application:NewProject()

    -- Create a line

line = project.Contents.Geometry:AddLine(cf.Point(0,0,0),cf.Point(1,1,0))

    -- Create a wire port on the line

port = project.Contents.Ports:AddWirePort(line.Wires[1])

Inheritance

The WirePort object is derived from the Port object.

Usage locations

The WirePort object can be accessed from the following locations:

Property List

BoundingBox
A box indicating the bounding box of this entity. (Read only Box). (Read only Box)
DefinitionMethod
The wire port type definition. (Read/Write WirePortDefinitionMethodEnum)
Label
The object 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 ParametricExpression)
Schematic
The schematic associated with this item. (Read only Schematic)
SchematicLocation
The location of the item on the schematic. (Read only GridLocation)
SchematicRotation
The rotation of the item on the schematic. (Read only SymbolRotationEnum)
Terminals
The schematic terminals on this item. (Read only List of Terminal)
Type
The object type string. (Read only string)
Visible
Specifies whether the geometry must be shown or hidden. (Read/Write boolean)
Wire
The free wire to which the port is connected. (Read/Write Edge)

Method List

Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity. (Returns a Object object.)
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.)
RotateSchematicSymbol ()
Rotates the item on the schematic.
SetProperties (properties Object)
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.
SetSchematicLocation (location GridLocation)
Sets the location of the item on the schematic.
SetSchematicRotation (rotation SymbolRotationEnum)
Sets the rotation of the item on the schematic.

Static Function List

GetDefaultProperties ()
Creates a table containing the default settings to create an object. (Returns a table object.)

Property Details

BoundingBox
A box indicating the bounding box of this entity. (Read only Box).
Type
Box
Access
Read only
DefinitionMethod
The wire port type definition.
Type
WirePortDefinitionMethodEnum
Access
Read/Write
Label
The object 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
ParametricExpression
Access
Read/Write
Schematic
The schematic associated with this item.
Type
Schematic
Access
Read only
SchematicLocation
The location of the item on the schematic.
Type
GridLocation
Access
Read only
SchematicRotation
The rotation of the item on the schematic.
Type
SymbolRotationEnum
Access
Read only
Terminals
The schematic terminals on this item.
Access
Read only
Type
The object type string.
Type
string
Access
Read only
Visible
Specifies whether the geometry 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 ()
Deletes the entity.
Duplicate ()
Duplicates the entity.
Return
Object
The new (duplicated) entity.
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 table defining the properties.
RotateSchematicSymbol ()
Rotates the item on the schematic.
SetProperties (properties Object)
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(Object)
A table of properties defining the new state of the object.
SetSchematicLocation (location GridLocation)
Sets the location of the item on the schematic.
Input Parameters
location(GridLocation)
The schematic location the item should be moved to.
SetSchematicRotation (rotation SymbolRotationEnum)
Sets the rotation of the item on the schematic.
Input Parameters
rotation(SymbolRotationEnum)
The rotation setting.

Static Function Details

GetDefaultProperties ()
Creates a table containing the default settings to create an object.
Return
table
A table containing the default properties.