Keyword Index

Object: DWTypePin

  • attributeList - Gets or sets the attribute list (i.e. the collection of all attribute values) associated with this object.
  • direction - Get or set the pin's visible direction on the symbol (north, south, east, west). This is also used to set invisible and bus internal pins.
  • func - Get or set the pin's function (i.e. input, output, etc.).
  • getAttribute - Gets an attribute value from this object
  • getAttributeVis - Gets the visibility of an attribute on this object
  • isBundle - Returns true if this pin is a bundle.
  • name - Get or set the pin's name.
  • objType - Returns a string with the name of this object class "DWTypePin".
  • pinLength - Get or set the pin's length.
  • pinNum - Get or set the pin's default pin number.
  • posX - Get or set the pin's X position on the symbol.
  • posY - Get or set the pin's Y position on the symbol.
  • readOnly - Returns true if the type containing this pin is in use in a circuit. No changes can be made to a type definition that is in use.
  • setAttribute - Sets an attribute value in this object
  • setAttributeVis - Sets the visibility of an attribute value in this object
  • 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

    Remarks:

    You can always get this property, but you cannot set it on a type that is already instantiated in a circuit, or was loaded from a library. This can only be set for a DWTypePin object that was created within the script.

    Property: direction

    Get or set the pin's visible direction on the symbol (north, south, east, west). This is also used to set invisible and bus internal pins.

    char = direction

    direction = char

    Remarks:

    A pin's direction is determined by a single character, which must be one of the following:
    NORTHN
    SOUTHS
    EASTE
    WESTW
    INVISIBLEI
    BUS INTERNALB

    See the example under func

    Property: func

    Get or set the pin's function (i.e. input, output, etc.).

    char = func

    func = char

    Remarks:

    A pin's function is determined by a single character, which must be one of the following:
    INI
    OUTO
    3STATE3
    BIDIRB
    PULLUPU
    OCC
    UNDEFINEDX
    BUSS
    LOWL
    HIGHH
    LTCHINW
    LTCHOUTY
    CLKINK
    CLKOUTQ
    CLOCKR
    OEE
    NCN
    POWERP
    DRIVERD
    ANALOGA

    Example:

    // Creating a bus/bundle pin
    
    t = DWType();
    numInternalPins = 4;
    t.numPins = numInternalPins +1;        // Extra pin for the bus/bundle pin itself
    
    pins = t.pins;    // Get the pin list so we can set info on each pin
    
    // Run through input pins and set position and name.
    // The crucial issue for bus/bundle pins is order.
    // The visible bus pin, must be first and its "func" must be "S".
    // The internal pins must follow and have a "direction" of "B".
    // Once any pin is added with a "direction" other than "B", that's
    // the end of the internal pins for this bus pin.
    
    x = 0; y = 140;
    pins[0].posX = x;
    pins[0].posY = y;
    pins[0].name = "P";
    pins[0].func = 'S';           // S for buS
    pins[0].direction = 'W';  // W for West
    
    // The x/y position for the bus internal pins doesn't matter, never used
    
    for (p = 1; p <= numInternalPins; p++)
    {
        pins[p].name = "P"+(p-1);     // Make a nice name, can be anything you want,
                                        // as long as there are no duplicates
        pins[p].func = 'P';               // I for Input, can be whatever you want
        pins[p].direction = 'B';      // B for Bus internal pin
    }
    

    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

    Property: isBundle

    Returns true if this pin is a bundle.

    bool = isBundle

    Remarks:

    This property is read-only.

    Property: name

    Get or set the pin's name.

    String = name

    name = String

    Remarks:

    A pin name is limited to 16 characters. No changes can be made to a type that is instantiated in a circuit.

    Property: objType

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

    String = objType

    Property: pinLength

    Get or set the pin's length.

    int = pinLength

    pinLength = int

    Remarks:

    Length is measured in 1/1000" and must be a multiple of the grid size of 70 units.

    Property: pinNum

    Get or set the pin's default pin number.

    String = pinNum

    pinNum = String

    Remarks:

    Pin numbers can be any characters, but are limited to 8 characters length.

    Property: posX

    Get or set the pin's X position on the symbol.

    int = posX

    posX = int

    Remarks:

    Positions are measured in 1/1000"

    See the example under func

    Property: posY

    Get or set the pin's Y position on the symbol.

    int = posY

    posY = int

    Remarks:

    Positions are measured in 1/1000"

    See the example under func

    Property: readOnly

    Returns true if the type containing this pin is in use in a circuit. No changes can be made to a type definition that is in use.

    bool = readOnly

    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.

    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