Getter methods to access design related values.
- Note
- GET must be used inside a ForEach loop
GET Attributes
| Description |
| Object= |
ALL Gets all object information.
TYPE Gets Object type.
DCODE Gets Aperture Dcode number: 10-20000
SHAPE Gets Aperture shape
APERTURE Gets Aperture description
PACKAGE Gets component package name
REFDES Gets component reference designator
PARTNUMBER Gets component part number
MPN Gets Manfacturing Part Number
MPN1 Gets Alternate Part Number (MPN1)
MPN2 Gets Alternate Part Number (MPN2)
MPN3 Gets Alternate Part Number (MPN3)
CPN Gets Customer Part Number (CPN)
IPN Gets Internal Part Number (IPN)
COMPONENT_ROTATE Gets component rotation (in 0.01 degrees accuracy)
COMPONENT_MIRROR Gets component mirror (true or false)
COMPONENT_HEIGHT Gets component height
COMPONENT_SIDE Gets component side (top or bottom)
COMPONENT_TYPE Gets component type
COMPONENT_X Gets component x insert location
COMPONENT_Y Gets component y insert location
COMPONENT_TYPE Gets component type
COMPONENT_VND Gets component Manufacturer (VND)
COMPONENT_DSC Gets component Description (DSC)
LAYER Gets layer name
LAYER_NUMBER Gets layer number (0-10000)
LAYER_TYPE Gets layer type
LAYER_SUBTYPE Gets layer subtype
LAYER_DESC Gets layer description
PURPOSE Gets a purpose number (0-10000)
COMPOSITE Gets the composite level
TOOL Gets the NC tool description
TOOL_NUMBER Gets the NC tool Number
NET Gets the net
WIDTH Gets object bounding-box width
HEIGHT Gets object bounding-box height
CENTER_PT Gets the object center (X, Y values)
CENTER_X Calculates the object center (X value)
CENTER_Y Gets the object center (Y value)
INSERT_PT Gets the object reference point (X, Y value).
X Gets the object reference point (X value). Objects without a reference point (i.e polygons) the center point will be returned
Y Gets the object reference point (Y value). Objects without a reference point (i.e polygons) the center point will be returned
ATTRIBUTE Gets the attribute value. Requires attribute "name"
PROPERTY Gets the property value. Requires property "name"
ATTRIBUTES Returns all object attributes.
PROPERTIES Returns all object properties.
|
| Layer= | Select the Type (of object property) to get.
Example:
<get object="attribute" name=".smd" result="@my_result" />
Object - Get Values:
ALL Gets all object information.
TYPE Gets Object type.
|
| ExternalNet= |
ALL Gets all object information.
NAME External net name.
REFDES Reference Designator
PIN Pin
SIDE Side
COMMENTS Comments
MIDDLEOFNET Middle of Net
ROTATION Rotation
HOLEDIAMETER Hole Diameter
|
| Job= |
ALL Gets all Job information.
NAME Job name.
|
| Name= | Used for type="attribute" and type="property"
Example:
<get object="attribute" name=".smd" result="@my_result" /> |
| result= | Assigns the string result to the matrix variable. Returns an empty string if not available
- Note
- If empty or missing, results can be accessed from the intrinsic result variable: __<Get Property Type>
-
Intrinsic variables always begin with two underscores
-
__OBJECT, __SHAPE, __WIDTH, __* @note__index = Intrinsic index count within the ForEach loop @note__count = Total count of array within the ForEach loop
<get object="type" result="@my_obj" />
|
Using Intrinsic result:
<get object="all" />
<MESSAGE>Pad #{{__index+1}} RADIUS: {{__width/2.0}} Center Pt: ({{__x}}, {{__y}}) </MESSAGE>
More Examples:
<get object="type" result="@my_result" />
<get object="refdes" result="@myrefdes" />
<get object="attribute" name=".comp_height" result="@cmpheight" />
OBJECT Intrinsic Variables
Object
| __object | Object Type |
| __net | Object Net |
| __width | Object Width |
| __height | Object Height |
| __center_x | Object Center (X) |
| __center_y | Object Center (Y) |
| __center_pt | Object Center Pt (X,Y) |
| __x | Object Insert Ref Pt (X) |
| __y | Object Insert Ref Pt (Y) |
| __insert_pt | Object Insert Ref Pt (X,Y) |
| __composite | Object Composite Number |
NC Tools
| __tool_desc | NC Tool description |
| __tool_number | NC Tool number |
Layers
| __layer_name | Layer Name |
| __layer_num | Layer Number |
| __layer_desc | Layer Description |
| __layer_purpose | Layer Purpose Number |
| __layer_type | Layer Type |
| __layer_subtype | Layer Subtype |
| __layer_thickness | Layer Thickness |
| __layer_zbase | Layer Z-Base |
Component
| __component_refdes | Reference Designator |
| __component_partnumber | component partnumber |
| __component_package | component package |
| __component_mpn | component mpn |
| __component_mpn1 | component mpn1 |
| __component_mpn2 | component mpn2 |
| __component_mpn3 | component mpn3 |
| __component_cpn | component cpn |
| __component_ipn | component ipn |
| __component_rotate | component rotate |
| __component_type | component type |
| __component_mirror | component mirror |
| __component_height | component height |
| __component_side | component side |
| __component_x | component insert x |
| __component_y | component insert y |
| __component_dsc | component dsc |
| __component_vnd | component vnd |
Apertures / Dcode
| __dcode | Aperture Dcode |
| __shape | Aperture Shape |
| __aperture | Aperture Description |