UL_SCHEMATIC
Data members
alwaysvectorfont | int (ALWAYS_VECTOR_FONT_..., see note) |
checked | int (see note) |
description | string |
grid | UL_GRID |
headline | string |
name | string (see note) |
verticaltext | int (VERTICAL_TEXT_...) |
xreflabel | string |
xrefpart | string |
Loop members
allnets() | UL_NET (see note) |
allparts() | UL_PART (see note) |
attributes() | UL_ATTRIBUTE (see note) |
classes() | UL_CLASS |
errors() | UL_ERROR |
layers() | UL_LAYER |
libraries() | UL_LIBRARY |
modules() | UL_MODULE |
nets() | UL_NET |
parts() | UL_PART |
sheets() | UL_SHEET |
variantdefs() | UL_VARIANTDEF |
See also UL_BOARD, UL_LIBRARY, variant()
Constants
ALWAYS_VECTOR_FONT_GUI | alwaysvectorfont is set in the user interface dialog |
ALWAYS_VECTOR_FONT_PERSISTENT | alwaysvectorfont is set persistent in this schematic |
VERTICAL_TEXT_UP | reading direction for vertical texts: up |
VERTICAL_TEXT_DOWN | reading direction for vertical texts: down |
Note
The value returned by alwaysvectorfont can be used in boolean context or can be masked with the ALWAYS_VECTOR_FONT_... constants to determine the source of this setting, as in
if (sch.alwaysvectorfont) {
// alwaysvectorfont is set in general
}
if (sch.alwaysvectorfont & ALWAYS_VECTOR_FONT_GUI) {
// alwaysvectorfont is set in the user interface
}
The value returned by checked can be used in boolean context and is set only after a recent 'Electrical Rule Check' (ERC).
The name member returns the full file name, including the directory.
The xreflabel and xrefpart members return the format strings used to display cross-reference labels and part cross-references.
The attributes() loop member loops through the global attributes.
Virtual nets, allnets() loop
The allnets() loop member loops through the nets() of the schematic itself and through all the virtual nets, generated by module instances.
Virtual parts, allparts() loop
Hierarchical parts are generated by module instances and actually do not exist in the schematic, only corresponding parts in the modules. For this we sometimes call them 'Virtual parts'. One module part can be used by several virtual parts via several module instances. As each virtual part corresponds to a (real existing) element in the board, the User Language supplies those parts as well, e.g. for BOM generation.
The allparts() loop member loops through the parts() of the schematic itself and through all the virtual parts.
Example
schematic(S) {
S.parts(P) printf("Part: %s\n", P.name);
}