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 or accepts an SPArray of DWAttribute objects
Property: bundle
Get the bundle pin that this pin is contained in, if any.
DWPin = bundle
Returns a DWPin object reprenting the bundle pin containing this pin, or null if the pin is not in a bundle.
Method: bundlePins
Returns an list of the pins contained in this bundle pin
SPArray = bundlePins
Returns NULL if this pin is not a bundle, otherwise returns an SPArray of DWPin objects representing the pins in the bundle.
Property: childPin
Get the port connector pin in the attached subcircuit that corresponds to this pin, which is presumed to be a pin on the parent device. This cannot be set. If this pin's device is not a subcircuit type, there is no attached subcircuit or there is no matching child pin, this will return null.
DWPin = childPin
Property: circuit
Gets the circuit containing this object. Read-only
DWCircuit circuit();
Method: connectTo
Connects this pin to a specified pin, including optionally adding visible lines. This will result in the signal associated with this pin being merged with the other signal.
DWSignal = connectTo(pin);
DWSignal = connectTo(pin, visible);
DWSignal = connectTo(signal);
DWSignal = connectTo(signal, visible);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
signal | DWSignal | the signal to connect to. |
pin | DWPin | the pin to connect to. |
visible | bool | true to add visible lines as needed to show the connection on the diagram. |
Returns true if the connection succeeded, false if not. This can fail if the source and destination are not compatible (e.g. are in different busses) or if visible is specified and the pins are not on the same page.
If visible is not specified, the source and destination will be logically connected (i.e. for simulation and netlisting purposes) but will not appear connected on the diagram. This may be more efficient for example if creating a circuit only for internal use and not for future editing.
Property: device
Get the device that this pin is associated with. This cannot be set.
DWDevice = device
Property: direction
Get the pin's visible direction on the symbol (north, south, east, west). This is also used to get invisible and bus internal pins.
char = direction
A pin's direction is determined by a single character, which must be one of the following:
NORTH | N |
SOUTH | S |
EAST | E |
WEST | W |
INVISIBLE | I |
BUS INTERNAL | B |
Method: disconnect
Disconnects this pin from its attached signal, effectively creating a new signal with only this single pin attached.
void disconnect();
IMPORTANT: This call does not necessarily result in any visible change in the diagram. No lines are removed from the orignal parent signal, so the pin will still appear to touch any existing lines but will not be logically connected. If the original parent signal had no other pins or lines attached other than this pin, it will be destroyed by this call.
Property: emtpPhase
Get or set the phase of the attached signal, if any.
String = emtpPhase
emtpPhase = String
Returns a string which may be one of "0", "1", "3", "a", "b", "c".
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 1 | Sets the line to "general" which will adapt to the attached devices, normally 1-phase for power pins |
3 or B | Set the pin to 3-phase |
a | Sets the pin to phase A |
b | Sets the pin to phase B |
c | Sets the pin to phase C |
Property: func
Gets the pin's function (i.e. power, input, output, etc.). Read only.
char = func
A pin's function is designated by a single character, which will be one of the following:
IN | I |
OUT | O |
3STATE | 3 |
BIDIR | B |
PULLUP | U |
OC | C |
UNDEFINED | X |
BUS | S |
LOW | L |
HIGH | H |
LTCHIN | W |
LTCHOUT | Y |
CLKIN | K |
CLKOUT | Q |
CLOCK | R |
OE | E |
NC | N |
POWER | P |
DRIVER | D |
ANALOG | A |
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 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 true if the field is displayed on the schematic, false otherwise
Method: getMidPathPoint
Returns a point on a line segment on the path that connects this pin to the given other pin, as close as possible to mid point between the two.
void getMidPathPoint(otherPin);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
otherPin | DWPin | The pin at the far end of the path in question |
Returns a DWPoint object containing the x and y coordinates of the desired point, or null if there is no path between the given points.
Property: isBundle
Returns true if this pin is a bundle.
bool = isBundle
This property is read-only.
Property: isSelected
Gets or sets the "selected" status of the pin
bool isSelected();
isSelected = bool
Setting this value to true is equivalent to calling select(false, false);
Property: locator
Gets the locator string of the pin
String locator();
The locator string identifies an object within a hierarchical circuit structure and provides a unique way of identifying this object despite duplicate or non-existant names.
Property: name
Gets the name of the pin
String name();
This is a read-only property.
Property: objType
Returns a string with the name of this object class "DWPin".
String = objType
Property: ordNum
Returns the pin ordinal number (i.e. it's sequential position on its parent device), from 1 to N
int = ordNum
This property is read-only.
Property: pinNum
Get or set the pin's pin number.
String = pinNum
pinNum = String
Pin numbers can be any characters, but are limited to 8 characters length.
Property: pos
Get the pin's position, that is, the position of the connection point of the pin.
DWPoint = pos
Positions are measured in 1/1000"
Property: posX
Get the pin's X position, that is, the X position of the connection point of the pin.
int = posX
Positions are measured in 1/1000"
Property: posY
Get the pin's Y position, that is, the Y position of the connection point of the pin.
int = posY
Positions are measured in 1/1000"
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 |
Method: select
Sets the associated signal to be selected, as if the user had clicked on it.
void select();
void select(show);
void select(show, deselOthers);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
deselOthers | bool | Pass true to deselect all other circuit objects before selecting this one. Defaults to false. |
show | bool | Pass true to have the page containing the object opened and scrolled as needed to display it. Defaults to false. |
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. |
Null.
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