Query: advanced search, command line: function calls available

Functions listed below can be called from a query expression.

List manipulation

llen(lst)

Determine length of a list.

Arguments:

Return value: integer length of the list.

mklist(args...)

Create a list of the objects passed.

Arguments:

Variable number of objects.

Return value: the list.

Math & abstract geometry

distance(x1, y1, x2, y2)

Calculate the distance of two points.

Arguments:

Return value: floating point distance value in nanometers.

abs(number)

Returns the absolute value of a number

int(arg)

Returns the argument converted to an integer (truncating floating point numbers)

double(arg)

Returns the argument converted to a double precision number.

Object accessors

obj_by_idpath(idpath)

Returns the object addressed by idpath.

Arguments:

Return value: the addressed object or void.

text_invalid_chars(obj)

Returns the number of invalid characters of a text object. An invalid character is not rendering with the current font of the text (it is out of range or the font does not have a symbol for the character).

Arguments:

Return value: a positive integer; 0 means all characters would render properly

Misc

action(args...)

Execute a pcb-rnd action.

Arguments: variable nunmber of objects and constants.

Return value: invalid on error, or the return value of the action.

coord(str)

Converts str to coordinates. Useful when using attribute values.

Arguments:

Return value: integer length of the list.

isvoid(value)

Checks whether value is void (invalid).

Arguments:

Return value: 1 if value is void (invalid), 0 otherwise.

getconf(path)

Fetch the value of a config node

Arguments:

Return value: invalid if the config node doesn't exist, else the value of the config node (converted to the most appropriate data type).

violation(i1, v1, ..., iN, vN)

Build a DRC violation report (a list object).

Arguments (a variable number of pairs of instruction and value):

Instruction is one of the following constants:

Return value: a list suitable for the drc_query to process.