Keyword Index

Object: DWLineSegment

The DWLineSegment object represents a single line segment in a signal object. The DWLineSegment object gives you access to information associated with the line segment, such as line attributes and line styles.

A DWLineSegment object is not created directly, but is returned by methods of DWDevice and DWSignal, such as DWSignal.lines.

  • attributeList - Gets or sets the attribute list (i.e. the collection of all attribute values) associated with this object.
  • circuit - Gets the circuit containing this object. Read-only
  • direction - Gets or sets the drawing direction for this line, either A-to-B or B-to-A.
  • emtpPhase - Get or set the phase of the attached signal, if any.
  • endA - Returns a point object representing end A of the line
  • endB - Returns a point object representing end B of the line
  • getAttribute - Gets an attribute value from this object
  • getAttributeVis - Gets the visibility of an attribute on this object
  • getConnections - Get a list of the pin connections at either end of this line
  • isPin - Returns true if this line is a device pin
  • lineStyle - Gets or sets the line style for this signal.
  • name - Gets the name of the pin
  • objType - Returns a string with the name of this object class "DWLineSegment".
  • readOnly - Returns true if the circuit containing this object is marked "read only". Note that this status primarily affects the user interface and does not prevent script methods from making changes to the circuit.
  • rotateAttribute - Rotates the attribute text on the diagram
  • setAttribute - Sets an attribute value in this object
  • setAttributeVis - Sets the visibility of an attribute value in this object
  • signal - Get the signal that this pin is attached to. This cannot be set.
  • Property: attributeList

    Gets or sets the attribute list (i.e. the collection of all attribute values) associated with this object.

    SPArray attributeList();

    attributeList = SPArray

    Returns:

    Returns or accepts an SPArray of DWAttribute objects

    Property: circuit

    Gets the circuit containing this object. Read-only

    DWCircuit circuit();

    Property: direction

    Gets or sets the drawing direction for this line, either A-to-B or B-to-A.

    bool = direction

    direction = bool

    Remarks:

    Setting this property affects the visual appearance of the line only if an assymetrical line style has been applied. There is no other operational effect of changing the drawing direction

    Property: emtpPhase

    Get or set the phase of the attached signal, if any.

    String = emtpPhase

    emtpPhase = String

    Returns:

    Returns a string which may be one of "0", "1", "3", "a", "b", "c".

    Remarks:

    The values allowed when when setting the phase are slightly different than the possible values when getting an existing phase. The value can be one of the following.
    0 or 1Sets the line to "general" which will adapt to the attached devices, normally 1-phase for power pins
    3 or BSet the pin to 3-phase
    aSets the pin to phase A
    bSets the pin to phase B
    cSets the pin to phase C
    Any setting that is invalid or can't be made because it would cause a line type conflict is ignored with no warnings.

    Property: endA

    Returns a point object representing end A of the line

    SFPoint = endA

    Remarks:

    Positions are measured in 1/1000"

    Property: endB

    Returns a point object representing end B of the line

    SFPoint = endB

    Remarks:

    Positions are measured in 1/1000"

    Method: getAttribute

    Gets an attribute value from this object

    String getAttribute(fieldName);

    Parameters
    Name Expected Type Description
    fieldName String The name of the field to retrieve

    Returns:

    Returns a string representing the value of the specified attribute field. This string will be empty (zero length) if the field does not exist.

    Method: getAttributeVis

    Gets the visibility of an attribute on this object

    bool getAttributeVis(fieldName);

    Parameters
    Name Expected Type Description
    fieldName String The name of the field to retrieve

    Returns:

    Returns true if the field is displayed on the schematic, false otherwise

    Method: getConnections

    Get a list of the pin connections at either end of this line

    SPArray = getConnections(doEndB);

    SPArray = getConnections(doEndB, parentLocator);

    Parameters
    Name Expected Type Description
    parentLocator String The instance locator of the circuit containing this line or its parent device. If this is not provided, then the function will use the current instance settings in the design to determine which instance of a subcircuit (if in a subcircuit) this line represents
    doEndB bool True to get connections at end B of the line, otherwise get end A

    Returns:

    Returns an array of strings, each one being the pin instance locator of a connection at the requested end of the line

    Property: isPin

    Returns true if this line is a device pin

    bool = isPin

    Remarks:

    This is read-only

    Property: lineStyle

    Gets or sets the line style for this signal.

    DWLineStyle lineStyle();

    lineStyle = DWLineStyle

    lineStyle = String

    Returns:

    Returns a DWLineStyle object or null if none is set on this signal

    Remarks:

    If assigning a string value to this property, the string can be a style name or a GUID (Globally Unique Identifier) which specifies a style. If a name is used, line style definitions in the design will be checked first, then other locally-defined or hardwired styles.

    Property: name

    Gets the name of the pin

    String name();

    Remarks:

    This is a read-only property.

    Property: objType

    Returns a string with the name of this object class "DWLineSegment".

    String = objType

    Property: readOnly

    Returns true if the circuit containing this object is marked "read only". Note that this status primarily affects the user interface and does not prevent script methods from making changes to the circuit.

    bool = readOnly

    Method: rotateAttribute

    Rotates the attribute text on the diagram

    void rotateAttribute(fieldName, rotation);

    Parameters
    Name Expected Type Description
    fieldName String The name of the field to rotate
    rotation int The absolute orientation or relative rotation desired, in degrees, see comments below. This parameter is optional and defaults to -90 (rotate left 90) if not specified

    Remarks:

    Method: setAttribute

    Sets an attribute value in this object

    void setAttribute(fieldName, value);

    void setAttribute(fieldName, value, visibility);

    Parameters
    Name Expected Type Description
    value String The new value for the specified field
    fieldName String The name of the field to set
    visibility int How to set visibility of resulting attribute text. 0 (false) = hide, 1 (true) = show, 2 = use default setting in design's attribute table, -1 = leave current visibility If this parameter is not supplied, 2 is assumed.

    Returns:

    Null.

    Remarks:

    If the given field name is not defined in the design's attribute table, it is added automatically. It is preferable to ensure that any fields used are already defined in the target design to make sure the settings are appropriate.

    Method: setAttributeVis

    Sets the visibility of an attribute value in this object

    void setAttributeVis(fieldName, visibility);

    Parameters
    Name Expected Type Description
    fieldName String The name of the field to set
    visibility bool true to make the attribute visible, false to hide it

    Property: signal

    Get the signal that this pin is attached to. This cannot be set.

    DWSignal = signal