Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions :: PCB Design System Functions |
Bartels User Language - Programmer's GuideC.4 PCB Design System Functions |
![]() |
This section describes (in alphabetical order) the PCB design system functions of the Bartels User Language. See Appendix C.1 for function description notations.
The following User Language system functions are assigned to caller type LAY; i.e., they can be called from the Layout Editor, the Autorouter and the CAM Processor interpreter environment of the Bartels AutoEngineer:
string lay_defelemname( // Returns default layout element name );
The lay_defelemname function returns the default layout element name defined in the BAE setup file.
string lay_deflibname( // Returns default library name );
The lay_deflibname function returns the default layout library name defined in the BAE setup file.
int lay_defusrunit( // Returns default user units (STD7) );
The lay_defusrunit function returns the default user units mode defined in the BAE setup file (1=Inch, 0=mm).
int lay_doclayindex( // Documentary layer display index int [0,99]; // Documentary layer number );
The lay_doclayindex function returns the documentary layer display index for the specified documentary layer, or (-1) if an invalid documentary layer number was specified.
Functions lay_doclayname, lay_doclayside, lay_doclaytext.
string lay_doclayname( // Returns documentary layer name int [0,99]; // Documentary layer number );
The lay_doclayname function returns the documentary layer name defined in the BAE setup file for the specified documentary layer number.
Functions lay_doclayindex, lay_doclayside, lay_doclaytext.
int lay_doclayside( // Returns documentary layer side mode: // (-2) = invalid layer number // (-1) = none // ( 0) = side 1 // ( 1) = side 2 // ( 2) = both sides int [0,99]; // Documentary layer number );
The lay_doclayside function returns the documentary layer side mode defined in the BAE setup file for the specified documentary layer number. Documentary layer side mode (-1) refers to None (i.e., Side 1, Side 2 and Both Sides are selectable), mode 0 refers to Side 1, mode 1 refers to Side 2, mode 3 refers to Both Sides. The function returns (-2) if an invalid layer number has been specified.
Functions lay_doclayindex, lay_doclayname, lay_doclaytext.
int lay_doclaytext( // Returns doc. layer text mode (LAY2) int [0,99]; // Documentary layer number );
The lay_doclaytext function returns the documentary layer text mode (LAY2) defined in the BAE setup file for the specified documentary layer. The function returns (-1) if an invalid layer number has been specified.
Functions lay_doclayindex, lay_doclayname, lay_doclayside.
int lay_figboxtest( // Returns status & index L_FIGURE; // Element double; // Rectangle left border (STD2) double; // Rectangle lower border (STD2) double; // Rectangle right border (STD2) double; // Rectangle upper border (STD2) );
The lay_figboxtest function checks if the given figure list element crosses the given rectangle. The function return nonzero if the element boundaries cross the given rectangle.
int lay_findconpart( // Returns status string; // Part name & index L_CPART; // Returns part index );
The lay_findconpart function searches the layout connection list part index with the specified part name. The function returns zero if the part has been found or nonzero otherwise.
Functions lay_findconpartpin, lay_findcontree.
int lay_findconpartpin( // Returns status string; // Pin name index L_CPART; // Net list part index & index L_CPIN; // Returns net list part pin index );
The lay_findconpartpin function searches a layout connection list part for the part pin index with the specified pin name. The function returns zero if the part pin has been found or nonzero otherwise.
Functions lay_findconpart, lay_findcontree.
int lay_findcontree( // Returns status string; // Net name & index L_CNET; // Returns net index );
The lay_findcontree function searches the layout connection list net index with the specified net name. The function returns zero if the net has been found or nonzero otherwise.
Functions lay_findconpart, lay_findconpartpin.
void lay_getplanchkparam(
& double; // Returns distance trace - trace (STD2)
& double; // Returns distance trace - copper (STD2)
& double; // Returns distance copper - copper (STD2)
& double; // Trace default width (STD2)
& string; // Block name
int [-6,99]; // Signal layer code (LAY1)
// (layer!=(-1) only allowed for BAE HighEnd)
int [0,0[; // DRC block number
);
The lay_getplanchkparam function is used to retrieve minimum clearance parameter settings for the design rule check (DRC). The DRC parameter values are returned with the corresponding function parameters. BAE Professional, BAE Economy and BAE Light allow only for the query of global parameters for layer code -1 (All Layers) and DRC parameter block 0. BAE HighEnd also allows for querying DRC parameter blocks with layer-specific clearance distance values being assigned to any signal layer (layer codes 0 to 99), the top signal layer (layer code -5) and inside signal layers (layer code -5). The DRC block 0 is always defined and contains the global DRC parameters, and there is always a DRC parameter preference defined for layer code -1 (All Layers).
Function lay_setplanchkparam.
int lay_getpowplanetree( // Returns net tree number or (-1) double; // X coordinate (STD2) double; // Y coordinate (STD2) int; // Power layer number (LAY1) double; // Drill diameter (STD2) );
The lay_getpowplanetree function returns the net tree number of the signal connected via the specified power layer coordinate. lay_getpowplanetree checks the given power layer. The specified drill diameter is taken under consideration for distance calculations. This function can be utilized for designating power layer net connections when using split power planes. The function returns (-1) if no signal is connected at the given power layer coordinate or if an invalid power layer number was specified.
The coordinate values passed to lay_getpowplanetree are interpreted as absolute coordinates on the currently loaded element. This means that scan offsets must be considered on coordinate checks when calling lay_getpowplanetree indirectly via lay_scan* functions.
int lay_getpowpolystat( // Returns status index L_FIGURE; // Figure list element - power layer polygon & int; // Returns flag: // polgyon crosses/touches board outline & int; // Returns flag: // polygon crosses other power layer polygon(s) );
The lay_getpowpolystat checks the status of the specified power layer polygon (split power plane). The return flags indicate whether the power layer polygon touches or crosses the board outline and/or any other power layer polygon. The function returns zero if the query was successful, (-1) for invalid parameters/environment or (-2) if the specified figure list element is not a power layer polygon.
int lay_getrulecnt( // Returns rule count or (-1) on error int; // Object class code int; // Object ident code (int or index type) );
The
lay_getrulecnt function is used for determining the number of rules attached to a specific object. The object can be the currently loaded element (object class code 0 with
int
value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid
L_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid
L_POOL index type value passed for the object ident code). The function returns a (non-negative) rule count or (-1) on error. The rule count determines the valid range for rule list indices to be passed to the
lay_getrulename function for getting object-specific rule names. The
lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the
lay_getrulecnt function.
Functions lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_getrulename( // Returns nonzero on error int; // Object class code int; // Object ident code (int or index type) int [0,[; // Rule name list index & string; // Rule name result );
The
lay_getrulename function is used to get the name of an index-specified rule assigned to the specified object. The object can be the currently loaded element (object class code 0 with
int
value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid
L_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid
L_POOL index type value passed for the object ident code). The rule name list index to be specified can be determined using the
lay_getrulecnt function. The rule name is returned with the last function parameter. The function returns zero on success or nonzero on error. The
lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the
lay_getrulename function.
Functions lay_getrulecnt, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_getscclass( // Returns layout element class: // 0 = Layout // 1 = Part // 2 = Padstack // 3 = Pad // (-1) otherwise );
The lay_getscclass function returns the currently scanned layout element class. lay_getscclass is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool only. The function returns (-1) if no scan function is active or if no layout element is currently scanned.
Functions lay_scanall, lay_scanfelem, lay_scanpool.
index L_NREF lay_getscpartrpidx // Returns layout part index or (-1) );
The lay_getscpartrpidx function returns the named reference index of the currently scanned layout part. This allows for designating the layout part to which the currently scanned trace, polygon, text, pin, etc. belongs to. lay_getscpartrpidx is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool only. The function returns (-1) if no scan function is active or if no part is currently scanned.
Functions lay_scanall, lay_scanfelem, lay_scanpool.
index L_POOL lay_getscrefpidx // Returns pool index or (-1) if outside macro );
The lay_getscrefpidx function returns the currently scanned macro reference pool index. This allows for designating the layout library element to which the currently scanned trace, polygon, text, etc. belongs to. lay_getscrefpidx is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool only. The function returns (-1) if no scan function is active or if no macro is currently scanned.
Functions lay_scanall, lay_scanfelem, lay_scanpool.
int lay_getscstkcnt( // Returns scan stack depth );
The lay_getscstkcnt function returns the current layout scan function stack depth. I.e., lay_getscstkcnt can be used for control purposes in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool.
Functions lay_scanall, lay_scanfelem, lay_scanpool.
int lay_getsctextdest( // Returns status & double; // Returns text line destination X coordinate (STD2) & double; // Returns text line destination Y coordinate (STD2) );
The lay_getsctextdest retrieves the text base line destination/end point coordinates of the currently scanned text. lay_getsctextdest is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool. The function returns 1 for successful queries or zero otherwise.
Functions lay_scanall, lay_scanfelem, lay_scanpool.
int lay_gettreeidx( // Returns status int; // Net tree number & index L_CNET; // Returns net index );
The lay_gettreeidx function searches the layout connection list net index with the specified net tree number. The function returns zero if the net has been found or nonzero otherwise.
int lay_grpdisplay( // Returns documentary layer number );
The lay_grpdisplay function returns the group display documentary layer number defined in the BAE setup file.
int lay_lastfigelem( // Returns status & index L_FIGURE; // Returns figure list index );
The lay_lastfigelem function gets the last created and/or modified layout figure list element and returns the corresponding figure list index with the return parameter. The function returns zero if such an element exists or nonzero else.
void lay_maccoords( & double; // Macro X coordinate (STD2) & double; // Macro Y coordinate (STD2) & double; // Macro rotation angle (STD3) & int; // Macro mirror mode (STD14) & int; // Macro layer (LAY1 for Pad on Padstack) );
The lay_maccoords function returns with its parameters the placement data of the currently scanned macro. This function is intended for use in the macro callback function of lay_scanall, lay_scanfelem or lay_scanpool only (otherwise zero/default values are returned).
Functions lay_scanall, lay_scanfelem, lay_scanpool.
int lay_macload( // Returns status & index L_POOL; // Macro pool element index string; // DDB file name string; // Element name int [100,[; // Element DDB class (STD1) );
The lay_macload function loads the specified layout library symbol to memory and returns the macro pool element index with the corresponding parameter. The function returns zero if the element was successfully loaded, (-1) on file access errors, (-2) on missing and/or invalid parameters or 1 if referenced macros (library elements) are missing. lay_macload is intended to be applied by features such as layout symbol browsers for examining library file contents. The lay_macrelease function can be used to unload and/or release macro elements from memory.
Function lay_macrelease.
void lay_macrelease( // Returns status index L_POOL; // Macro pool element index );
The lay_macrelease function unloads and/or releases the layout library symbol specified with the macro pool index parameter from memory. lay_macrelease is intended to be used together with the lay_macload function.
Function lay_macload.
int lay_menulaylinecnt( // Returns number of menu layer lines );
The lay_menulaylinecnt function returns the number of menu lines currently defined with the layout signal layer menu. The layout signal layer menu can be customized using the bsetup utility program which allows for the definition of up to 12 signal layer entries with layer number and layer name.
Functions lay_menulaylinelay, lay_menulaylinename.
int lay_menulaylinelay( // Returns menu layer line layer number int [0,11]; // Menu line number );
The lay_menulaylinelay function returns the layer number assigned to the specified menu line of the layout signal layer menu. The layout signal layer menu can be customized using the bsetup utility program which allows for the definition of up to 12 signal layer entries with layer number and layer name.
Functions lay_menulaylinecnt, lay_menulaylinename.
string lay_menulaylinename( // Returns menu layer line name int [0,11]; // Menu line number );
The lay_menulaylinename function returns the layer name assigned to the specified menu line of the layout signal layer menu. The layout signal layer menu can be customized using the bsetup utility program which allows for the definition of up to 12 signal layer entries with layer number and layer name.
Functions lay_menulaylinecnt, lay_menulaylinelay.
int lay_nrefsearch( // Returns status string; // Reference name & index L_FIGURE; // Returns figure list index );
The lay_nrefsearch function searches for the specified named reference on the currently loaded layout element. The figure list index is set accordingly if the named reference is found. The function returns zero if the named reference has been found or nonzero otherwise.
int lay_planmidlaycnt( // Returns layout inside layer count );
The lay_planmidlaycnt function returns the inside layer count of the currently loaded layout.
Function lay_plantoplay.
int lay_plantoplay( // Returns layout top layer (LAY1) );
The lay_plantoplay function returns the top layer setting of the currently loaded layout element or signal layer 2 if no layout element is currently loaded.
Function lay_planmidlaycnt.
int lay_pltmarklay( // Returns documentary layer number );
The lay_pltmarklay function returns the plot marker documentary layer number defined in the BAE setup file.
void lay_ruleerr( & int; // Error item code & string; // Error item string );
The lay_ruleerr function provides information on the current Rule System error state, and thus can be used to determine the error reason after an unsuccessful call to one of the Rule System management functions.
The Rule System error state can be determined by evaluating the parameters returned with the lay_ruleerr function. The returned error item string identifies the error-causing element if needed. The possible error code values correspond with Rule System error conditions according to the following table:
Error Code Meaning 0 Rule System operation completed without errors 1 Rule System out of memory 2 Rule System internal error <e>
3 Rule System function parameter invalid 128 Rule System DB file create error 129 Rule System DB file read/write error 130 Rule System DB file wrong type 131 Rule System DB file structure bad 132 Rule System DB file not found 133 Rule System DB file other error (internal error) 134 Rule System rule <r>
not found in rule database135 Rule System rule bad DB format (internal error <e>
)136 Rule System object not found 137 Rule System object double defined (internal error) 138 Rule System incompatible variable <v>
definition139 Rule System Rule <r>
compiled with incompatible RULECOMP versionDepending on the error condition the error item string can describe a rule
<r>
, a variable<v>
or an (internal) error status<e>
. DB file errors refer to problems accessing the Rule System database filebrules.vdb
in the BAE programs directory. Internal errors usually refer to Rule System implementation gaps and should be reported to Bartels.
Functions lay_getrulecnt, lay_getrulename, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_rulefigatt( // Returns nonzero on error index L_FIGURE; // Figure list element index void; // Rule name string or rule name list array );
The lay_rulefigatt function is used to attach a new set of name-specified rules to the figure list element specified with the first function parameter. Either a single rule name (i.e., a value of typestring
) or a set of rule names (i.e., an array of typestring
) can be specified with the second function parameter. Note that any rules previously attached to the figure list element are detached before attaching the new rule set. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulefigatt function.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_rulefigdet( // Returns nonzero on error index L_FIGURE; // Figure list element index );
The lay_rulefigdet function detaches all currently attached rules from the figure list element specified with the function parameter. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulefigdet function.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt. lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_rulelaysatt( // Returns nonzero on error int [0,111]; // Layer stackup index void; // Rule name string or rule name list array );
The lay_rulelaysatt function is used to attach a new set of name-specified rules to the layer stackup specified by the layer stackup index. Either a single rule name (i.e., a value of typestring
) or a set of rule names (i.e., an array of typestring
) can be specified with the rule name function parameter. Note that any rules previously attached to the layer stackup will be detached before attaching the new rule set. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulelaysatt function.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_rulelaysdet( // Returns nonzero on error int [0,111]; // Layer stackup index );
The lay_rulelaysdet function detaches all attached rules from the layer stackup specified by the layer stackup index. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulelaysdet function.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_ruleplanatt( // Returns nonzero on error void; // Rule name string or rule name list array );
The lay_ruleplanatt function is used to attach a new set of name-specified rules to the currently loaded element. Either a single rule name (i.e., a value of typestring
) or a set of rule names (i.e., an array of typestring
) can be specified with the function parameter. Note that any rules previously attached to the current element will be detached before attaching the new rule set. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_ruleplanatt function.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet; lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_ruleplandet( // Returns nonzero on error );
The lay_ruleplandet function detaches all currently attached rules from the currently loaded element. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_ruleplandet function.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet; lay_ruleplanatt, lay_rulequery; Neural Rule System and Rule System Compiler.
int lay_rulequery( // Returns hit count or (-1) on error int; // Object class code int; // Object ident code (int or index type) string; // Subject name string; // Predicate name string; // Query command string & void; // Query result [] // Optional query parameters of requested type );
The lay_rulequery function is used to perform a rule query on a specific object. The object can be the currently loaded element (object class code 0 withint
value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid L_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid L_POOL index type value passed for the object ident code). The rule query function requires a rule subject, a rule predicate and a query command string to be specified with the corresponding function parameters. The query command string can contain one query operator and a series of value definition operators. The following query operators are implemented:
?d
for querying int
values?f
for querying double
values?s
for querying string
valuesThe query operator can optionally be preceded with one of the following selection operators:
+
for selecting the maximum of all matching values -
for selecting the minimum of all matching values The
+
operator is used on default (e.g., when omitting the selection operator). The rule query resulting value is passed back to the caller with the query result parameter. This means that the query result parameter data type must comply with the query operator (int
for?d
,double
for?f
,string
for?s
). The query command string can also contain a series of value definition operators such as:
%d
for specifying int
values%f
for specifying double
values%s
for specifying string
valuesEach value definition parameter is considered a placeholder for specific data to be passed with optional parameters. Note that these optional parameters must comply with the query command in terms of specified sequence and data types. The lay_rulequery function returns a (non-negative) hit count denoting the number of value set entries matched by the query. The function return value is (-1) on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulequery function.
With the rulerule somerule { subject subj { pred := ("A", 2); pred := ("A", 4); pred := ("B", 1); pred := ("C", 3); pred := ("B", 6); pred := ("D", 5); pred := ("D", 6); pred := ("A", 3); } }defined and attached to the currently loaded element, the lay_rulequery call
hitcount = lay_rulequery(0,0,"subj","pred","%s ?d",intresult,"A") ;sets the
int
variablehitcount
to 3, and theint
variableintresult
to 4, whilst a call such ashitcount = lay_rulequery(0,0,"subj","pred","-?s %d",strresult,6) ;sets
hitcount
to 2 and thestring
variablestrresult
toB
.
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet; Neural Rule System and Rule System Compiler.
int lay_scanall( // Returns scan status double; // Scan X offset (STD2) double; // Scan Y offset (STD2) double; // Scan rotation angle (STD3) int [0,1]; // Element in workspace flag (STD10) int [0,1]; // Connectivity scan allowed flag: // 0 = no scan allowed // 1 = scan allowed * int; // Macro callback function * int; // Polygon callback function * int; // Path callback function * int; // Text callback function * int; // Drill callback function * int; // Layer check function * int; // Level check function );
The lay_scanall function scans all figure list elements placed on the currently loaded layout element with all hierarchy levels. User-defined scan functions are automatically activated depending on the currently scanned element type. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keywordNULL
. The function returns nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status.Macro callback function
int macrofuncname( index L_MACRO macro, // Macro index index L_POOL pool, // Pool element index int macinws, // Macro in workspace flag (STD10) string refname, // Macro Reference name index L_LEVEL level // Macro signal level ) { // Macro callback function statements : return(contscan); }The lay_maccoords function can be used for determining the macro placement coordinates. The return value of the macro callback function must be 1 for continue scan, 0 for stop scan or (-1) on error.
Polygon callback function
int polyfuncname( index L_POLY poly, // Polygon index int layer, // Polygon layer (LAY1) int polyinws, // Polygon in workspace flag (STD10) int tree, // Polygon tree number or (-1) index L_LEVEL level // Polygon signal level ) { // Polygon callback function statements : return(errstat); }The return value of the polygon callback function must be zero if scan ok or nonzero on error.
Path callback function
int pathfuncname( index L_LINE path, // Path index int layer, // Path layer (LAY1) int pathinws, // Path in workspace flag (STD10) index L_LEVEL level // Path signal level ) { // Path callback function statements : return(errstat); }The return value of the path callback function must be zero if scan ok or nonzero on error.
Text callback function
int textfuncname( index L_TEXT text, // Text index double x, // Text X coordinate (STD2) double y, // Text Y coordinate (STD2) double angle, // Text rotation angle (STD3) int mirr, // Text mirror mode (STD14) int layer, // Text layer (LAY1) double size, // Text size (STD2) string textstr, // Text string int textinws // Text in workspace flag (STD10) ) { // Text callback function statements : return(errstat); }The return value of the text callback function must be zero if scan ok or nonzero on error.
Drill callback function
int drillfuncname( index L_DRILL drill, // Drill index double x, // Drill X coordinate (STD2) double y, // Drill Y coordinate (STD2) int drillinws, // Drill in workspace flag (STD10) int tree, // Drill tree number or (-1) index L_LEVEL level // Drill signal level ) { // Drill callback function statements : return(errstat); }The return value of the drill callback function must be zero if scan ok or nonzero on error.
Layer check function
int laycheckfuncname( int layer // Scanned layer (LAY1) ) { // Layer check function statements : return(contscan); }The return value of the layer check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to the interesting layers with this function.
Level check function
int levcheckfuncname( index L_LEVEL level // Scanned signal level ) { // Level check function statements : return(contscan); }The return value of the level check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to interesting signal levels with this function.
Functions lay_maccoords, lay_scanfelem, lay_scanpool.
int lay_scanfelem( // Returns scan status index L_FIGURE; // Figure list element index double; // Scan X offset (STD2) double; // Scan Y offset (STD2) double; // Scan rotation angle (STD3) int [0,1]; // Element in workspace flag (STD10) int [0,1]; // Connectivity scan allowed flag: // 0 = no scan allowed // 1 = scan allowed * int; // Macro callback function * int; // Polygon callback function * int; // Path callback function * int; // Text callback function * int; // Drill callback function * int; // Layer check function * int; // Level check function );
The
lay_scanfelem function scans the specified layout figure list element with all hierarchy levels. User-defined callback functions for the currently scanned element type are automatically activated. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword
NULL
. The return value of
lay_scanfelem is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See
lay_scanall for the scan function definitions.
Functions lay_maccoords, lay_scanall, lay_scanpool.
int lay_scanpool( // Returns scan status void; // Pool element index double; // Scan X offset (STD2) double; // Scan Y offset (STD2) double; // Scan rotation angle (STD3) int [0,1]; // Element in workspace flag (STD10) int [0,1]; // Connectivity scan allowed flag: // 0 = no scan allowed // 1 = scan allowed * int; // Macro callback function * int; // Polygon callback function * int; // Path callback function * int; // Text callback function * int; // Drill callback function * int; // Layer check function * int; // Level check function );
The
lay_scanpool function scans the specified layout pool element with all hierarchy levels. User-defined callback functions for the currently scanned element type are automatically activated. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword
NULL
. The return value of
lay_scanpool is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See
lay_scanall for the callback function definitions.
Functions lay_maccoords, lay_scanall, lay_scanfelem.
void lay_setfigcache( );
The lay_setfigcache function fills the layout cache for fast figure list element access.
int lay_setplanchkparam( // Returns status
double ]0.0,[; // Distance trace - trace (STD2)
double ]0.0,[; // Distance trace - copper (STD2)
double ]0.0,[; // Distance copper - copper (STD2)
double; // Trace default width (STD2)
string; // Block name
int [-6,99]; // Signal layer code (LAY1)
// (layer!=(-1) only allowed for BAE HighEnd)
int [0,0[; // DRC block number
);
The lay_setplanchkparam function sets Layout Editor clearance distance values for the design rule check (DRC). The function returns nonzero if invalid distance parameters are specified. BAE Professional, BAE Economy and BAE Light allow only for the specification of global parameters for layer code -1 (All Layers) and DRC parameter block 0. BAE HighEnd also allows for specifying DRC parameter blocks with layer-specific clearance distance values to be assigned to any signal layer (layer codes 0 to 99), the top signal layer (layer code -5) and inside signal layers (layer code -5). The DRC block 0 is always defined and contains the global DRC parameters, and there is always a DRC parameter preference defined for layer code -1 (All Layers).
Function lay_getplanchkparam.
string lay_toplayname( // Returns top layer name );
The lay_toplayname function returns the top signal layer name defined in the BAE setup file.
int lay_vecttext( // Returns status double; // Text X coordinate (STD2) double; // Text Y coordinate (STD2) double; // Text rotation angle (STD3) int [0,1]; // Text mirror mode (STD14) double ]0.0,[; // Text size (STD2) int [0,1]; // Text physical flag: // 0 = logical // 1 = physical int [0,2]; // Layer mirror mode: // 0 = mirror off // 1 = mirror X // 2 = mirror Y int [0,[; // Text style (LAY14) string; // Text string * int; // Text vectorize function );
The lay_vecttext function vectorizes the specified text using the currently loaded text font. The referenced text vectorize user function is automatically called for each text segment. The function returns nonzero if invalid parameters have been specified or if the referenced user function returns nonzero.
Text vectorize function
int vecfuncname( double x1, // Start point X coordinate (STD2) double y1, // Start point Y coordinate (STD2) double x2, // End point X coordinate (STD2) double y2 // End point Y coordinate (STD2) ) { // Text vectorize function statements : return(errstat); }The return value of the text vectorize function must be zero if scan ok or nonzero on error.
The following User Language system functions are assigned to caller type GED; i.e., they can be called from the Layout Editor interpreter environment of the Bartels AutoEngineer:
int ged_asklayer( // Returns status & int; // Returns selected layer (LAY1|LAY9) int [0,7]; // Layer query type: // 0 = Documentary layers and signal layers // 1 = Signal layers // 2 = Signal layers // (including and ) // 3 = Documentary layers // 4 = Signal and power layers // 5 = arbitrary display element types // 6 = Power layers // 7 = Documentary, signal and power layers );
The ged_asklayer function activates a Layout Editor layer selection menu. The layer query type designates the type of layers and/or display element types provided for selection. The function returns zero if a valid layer has been selected or (-1) if the layer selection was aborted.
int ged_askrefname( // Returns status & string; // Returns reference name & index L_CPART; // Returns connection list part index // (on layout level only) int [0,2]; // Part selection mode: // 0 = All parts // 1 = Parts inside part group // 2 = Parts outside part group int [0,1]; // Flag - unplaced part selection );
The ged_askrefname function activates a dialog for selecting a reference, i.e., a part on layout level or a pin on part level. The part selection mode and the unplaced part flag can be used to restrict the list of selectable parts and/or pins. The functions returns zero if a reference was successfully selected or non-zero otherwise.
int ged_asktreeidx( // Returns status & string; // Returns tree name (on layout level only) & index L_CNET; // Returns net index (on layout level only) int [0,5]; // Net selection mode: // 0 = All trees, including // 1 = Visible trees // 2 = Invisible trees // button3 = All trees // 4 = Directly skip to net pick // 5 = All trees, pattern input allowed );
The ged_asktreeidx function activates a dialog for selecting a net. The net selection mode can be used to restrict the list of selectable nets. The functions returns zero if a net was successfully selected, 1 if a net delete operation (without net assignment) was performed, 2 if a net name pattern was specified, 3 if a net name was selected through net pick, or non-zero on invalid paramaters or if the selection was aborted.
int ged_attachtextpos( // Returns status index L_FIGURE; // Layout figure list element string; // Text string int; // Text layer (LAY1|LAY9) double; // Text X coordinate (STD2) double; // Text Y coordinate (STD2) double; // Text rotation angle (STD3) double; // Text size (STD2; negative for text base line) int [0,1]; // Text mirror mode (STD14) );
The ged_attachtextpos function assigns a text position modifier with the specified properties for layer, position, rotation, size and mirroring to the text string of the specified layout figure list element. The function returns zero if the assignment was successful, (-1) for invalid parameters or (-2) if the layout element provides no text position modifier for the specified text string.
Function ged_storetext.
int ged_delelem( // Returns status & index L_FIGURE; // Element );
The ged_delelem function deletes the given figure list element from the figure list. The function returns zero if the element was successfully deleted or nonzero on error.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
Function ged_drawelem.
void ged_drawelem( index L_FIGURE; // Element int [0, 4]; // Drawing mode (STD19) );
The ged_drawelem function updates the display of the given figure list element using the specified drawing mode.
Function ged_delelem.
int ged_drcerrorhide( // Returns status string; // Error Id string int; // Error hide flag );
The ged_drcerrorhide function sets the display mode for the DRC error specified by the error id. The function returns zero if the display mode was successfully set or non-zero on error.
int ged_drcpath( // Returns status int [0,99]; // Path signal layer number (LAY1) double ]0.0,[; // Path width (STD2) index L_LEVEL; // Path connectivity level index int [0,3]; // Path connectivity checking mode: // 0 = Show violations for all non-level elements // 1 = Ignore violations against own tree // 2 = Show violations against any tree // 3 = Show violations against any tree beside pick element );
The ged_drcpath function performs a design rule check for a trace placement with the given parameters without actually placing the trace. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace can be successfully placed without DRC errors, a value greater or equal (1) if the trace placement would cause a DRC error or (-1) on missing/invalid environment/parameters.
Functions bae_storepoint, ged_storepath.
int ged_drcpoly( // Returns status int; // Polygon layer (LAY1) int [1,9]; // Polygon type (LAY4) string; // Polygon net name (for LAY4 types 4, 6 and 9) index L_LEVEL; // Polygon connectivity level index int [0,3]; // Polygon connectivity checking mode: // 0 = Show violations for all non-level elements // 1 = Ignore violations against own tree // 2 = Show violations against any tree // 3 = Show violations against any tree beside pick element );
The ged_drcpoly function performs a design rule check for a polygon placement with the given parameters without actually placing the polygon. The polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the polygon can be successfully placed without DRC errors, a value greater or equal (1) if the polygon placement would cause a DRC error or (-1) on missing/invalid environment/parameters.
Functions bae_storepoint, ged_storepoly.
int ged_drcvia( // Returns status string; // Via padstack library name double; // Via X coordinate (STD2) double; // Via Y coordinate (STD2) index L_LEVEL; // Via connectivity level index int [0,3]; // Via connectivity checking mode: // 0 = Show violations for all non-level elements // 1 = Ignore violations against own tree // 2 = Show violations against any tree // 3 = Show violations against any tree beside pick element );
The ged_drcvia function performs a design rule check for a via placement with the given parameters without actually placing the via. The function returns zero if the via can be successfully placed without DRC errors, a value greater or equal (1) if the via placement would cause a DRC error, (-1) on missing/invalid environment/parameters or (-2) if the requested via padstack is not available.
Function ged_storeuref.
int ged_elemangchg( // Returns status & index L_FIGURE; // Element double; // New rotation angle (STD3) );
The ged_elemangchg function changes the rotation angle of the given figure list element. The rotation angle must be in radians. The function returns zero if the element has been successfully rotated, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be rotated.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_elemfixchg( // Returns status & index L_FIGURE; // Element int [0,1]; // New fixed flag (STD11) );
The ged_elemfixchg function changes the fixed flag of the given figure list element. The fixed flag value 0 unfixes the element, the fixed flag value 1 fixes the element. The function returns zero if the element fixed flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be fixed.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_elemgrpchg( // Returns status
index L_FIGURE; // Element
int [0,6]; // New group selection status (STD13|0x4)
);
The ged_elemgrpchg function changes the group flag of the given figure list element. Setting bit 3 (0x4) of the group status parameter activates a status line message about the selected/deselected element and the total number of group-selected elements. The function returns zero if the element group flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be selected to a group.
int ged_elemlaychg( // Returns status & index L_FIGURE; // Element int; // New layer (LAY1) );
The ged_elemlaychg function changes the layer of the given figure list element. The layer can be set for polygons, traces, texts, pads (on padstack level), and drill holes. For drill holes the layer input parameter specifies the drill class code. The function returns zero if the element layer has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element layer cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_elemmirrchg( // Returns status & index L_FIGURE; // Element int [0,18]; // New mirror mode (STD14|LAY3) );
The ged_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for polygons, texts and references. The function returns zero if the element mirror mode has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element mirror mode cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_elemposchg( // Returns status & index L_FIGURE; // Element double; // New X coordinate (STD2) double; // New Y coordinate (STD2) );
The ged_elemposchg function changes the position of the given figure list element. Polygons and/or traces are replaced to set the first point of the polygon/trace to the specified position. The function returns zero if the element has been successfully repositioned, (-1) if the figure list element is invalid or (-2) if the figure list element position cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_elemsizechg( // Returns status & index L_FIGURE; // Element double; // New size (STD2) );
The ged_elemsizechg function changes the size of the given figure list element. The size can be changed for texts, drill holes, traces and areas. For traces, a trace width change is performed. For areas, the size parameter is interpreted as area expansion distance. The function returns zero if the element size has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element size cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_getautocornins( // Returns mode: // 0 = Auto Corner Insert disabled // 1 = Auto Corner Insert Traces // 2 = Auto Corner Insert Areas // 3 = Auto Corner Insert Traces & Areas );
The ged_getautocornins function returns the Layout Editor input mode for automatically inserting corners when generating traces and/or polygons. The auto corner insert mode is selected with either option or option from the function.
int ged_getdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Last group placement x coordinate (STD2) // 1 = Last group placement y coordinate (STD2) // 2 = Default part placement angle (STD3) // 3 = Copper fill isolation distance (STD2) // 4 = Copper fill min. area size (STD2) // 5 = Copper fill heat trap width (STD2) // 6 = Copper fill heat trap isolation (STD2) // 7 = Hatch line spacing (STD2) // 8 = Hatch line width (STD2) // 9 = Hatch line angle (STD3) // 10 = Net visibility dialog net name list control element width // 11 = Default text size (STD2) // 12 = DRC distance violation text size (STD2) // 13 = Autoplacement Part Expansion (STD2) // 14 = Autoplacement Part Pin Factor [0, 1.0] // 15 = Autoplacement Segment Fit [0, 1.0] // 16 = Autoplacement Part Outline Offset (STD2) // 17 = Default text placement angle (STD3) // 18 = Autorouter Border to copper LE distance (STD2) // 19 = Autorouter Heat trap to drill LE distance (STD2) // 20 = Autorouter Isolation to drill LE distance (STD2) // 21 = Autorouter Power plane connection LE run length (STD2) // 22 = Autorouter Requested special routing grid (STD2) // 23 = Autorouter Split power plane guard range (STD2) // 24 = Autorouter BGA grid tolerance distance (STD2) // 25 = Autorouter SMD power plane connection LE run length (STD2) // 26 = Autorouter Pin to via distance (STD2) // 27 = CAM Gerber standard line width (STD2) // 28 = CAM Minimum distance heat trap to drilling (STD2) // 29 = CAM Minimum distance isolation to drilling (STD2) // 30 = CAM Heat trap to drilling distance tolerance (STD2) // 31 = CAM Isolation to drilling distance tolerance (STD2) // 32 = CAM Power layer border width (STD2) // 33 = CAM Split power plane isolation width (STD2) // 34 = Bus trace width (STD2) // 35 = Bus trace spacing (STD2) & double; // Returns parameter value );
The ged_getdblpar function is used to query Layout Editor double parameters previously set with ged_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions ged_getintpar, ged_getstrpar, ged_setdblpar, ged_setintpar, ged_setstrpar.
int ged_getdrcmarkmode( // DRC error display mode );
The ged_getdrcmarkmode function returns the currently selected Layout Editor DRC error display mode. The function returns zero for error color error marker display and 1 for highlight error marker display.
Function ged_setdrcmarkmode.
int ged_getdrcstatus( // DRC completion status );
The ged_getdrcstatus function return the current Layout Editor design rule check completion status. The function returns zero if only the design changes of the current program session are checked, or nonzero if a full design rule check for complete DRC error display has been applied to the currently loaded element.
int ged_getgroupdata( // Status & double; // Group base X coordinate (STD2) & double; // Group base Y coordinate (STD2) & double; // Group rotation angle (STD3) & double; // Group scale factor & int; // Group mirror mode & double; // Group quadrant X coordinate (STD2) & double; // Group quadrant Y coordinate (STD2) & int; // Group quadrant mode & int; // Group area mode );
ged_getgroupdata function can be used to retrieve the current Layout Editor group placement interaction input data. The function returns nonzero if no group placement interaction is activated.
Function ged_getinputdata.
int ged_gethighlnet( // Returns status
int [-1,[; // Net tree number or -1 for highlight focus modus query
& int; // Highlight mode
& int; // Highlight color (bit 1 to 6, STD18) and pattern (bit 7 to 12)
);
The ged_gethighlnet function can be used to get the highlight mode and the highlight color and pattern for the specified net. The highlight mode parameter is set to nonzero if the net highlight is activated or zero if the net highlight is deactivated. The second parameter returns the highlight color (bit 1 to 6) and the highlight pattern (bit 7 to 12). The function returns nonzero if the query was successful or zero on error (net not found, invalid parameters).
Function ged_highlnet.
int ged_getinputdata( // Status & double; // Initial X coordinate (STD2) & double; // Initial Y coordinate (STD2) & double; // Initial width (STD2) & int; // Initial layer (LAY1) & double; // Current X coordinate (STD2) & double; // Current Y coordinate (STD2) & double; // Current width (STD2) & int; // Current layer (LAY1) & void; // Input mode/element (LAY11) & void; // Input path level index (optional) & double; // Input first segment start X coordinate (STD2) */ & double; // Input first segment start Y coordinate (STD2) */ & double; // Input first arc center X coordinate (STD2) */ & double; // Input first arc center Y coordinate (STD2) */ & int; // Input first arc center type (STD15) */ & double; // Input last segment start X coordinate (STD2) */ & double; // Input last segment start Y coordinate (STD2) */ & double; // Input last arc center X coordinate (STD2) */ & double; // Input last arc center Y coordinate (STD2) */ & int; // Input last arc center type (STD15) */ );
The ged_getinputdata function can be used to retrieve the current Layout Editor placement interaction input data. The placement data has to be interpreted according to the input interaction type and/or placement element function parameter. The function returns nonzero if no placement interaction is activated.
Function ged_getgroupdata.
int ged_getintpar( // Returns status int [0,[; // Parameter type/number: // 0 = Pick point display mode: // 0 = No pick point display // 1 = Pick point display // 2 = Pick point wide display // 3 = Pick point edit display // 1 = Automatic DRC on layout load mode: // 0 = no automatic DRC // 1 = automatic DRC with verification // 2 = automatic DRC without verification // 2 = Top layer color code // 3 = Info display flag: // 0 = No automatic info display // 1 = Automatic info display // 4 = Info display mode: // 0 = No info display // 1 = Complete info display // 2 = Copper info only display // 5 = Angle edit direction // 6 = Part level element DRC mode: // 0 = Complete DRC // 1 = Consider part macros checked // 7 = Grid corner scan mode: // 0 = No grid corner scan // 1 = Complete grid corner scan // 2 = Current window corner scan // 3 = Dynamic window corner scan // 8 = Mincon update mode // 9 = DRC polygon sub-type exclude bits // 10 = Warning output mode: // Bit 0: Supress SCM changed warnings // Bit 1: Supress copper fill problem polygon group selection wanrnings // Bit 2: Supress variant mismatch warnings // Bit 3: Supress autorouter mode termination warnings // 11 = Layer usage scan mode // 12 = Area polygon edit mode: // 0 = don't close polylines // 1 = always close polylines // 2 = polyline close prompt // 13 = DRC distance display pattern // 14 = Trace edit pick mode: // 0 = snap to input grid // 1 = pin/trace snap at first trace corner // 15 = Area mirror visibility mode: // 0 = Normal area mirror visibility // 1 = Disable area mirror visibility // 16 = Trace net deletion query limit // 17 = Plot preview mode: // 0 = none // 1 = plotter pen width // 18 = DRC distance display mode: // 0 = none // 1 = trace distance line // 2 = area distance line // 3 = trace distance pattern // 4 = area distance pattern // 19 = Text layer mirroring mode: // 0 = no layer mirroring // 1 = documentary layer mirroring // 2 = signal and documentary layer mirroring // 20 = Default part mirroring mode // 21 = Autosave interval // 22 = Part airline display mode: // 0 = No airlines // 1 = Static airlines // 2 = Dynamic airlines // 23 = Angle lock toggle mode: // 0 = Pick side default // 1 = Grid toggle // 2 = Shorter side toggle // 3 = Edit direction // 24 = Copper fill heat trap mode: // 0 = Direct Connect // 1 = Pin & Via Heat Traps // 2 = Pin Heat Traps // 3 = Via Heat Traps // |4 = No Neighbour Pins Flag // |8 = Heat Trap Trace Flag // |16 = Only Unconnected Layers // 25 = Copper fill trace mode: // 0 = Round Corners // 1 = Octagonal Corners // 2 = Octagonal Circles // 3 = Octagonal Corners & Circles // 26 = Copper fill island mode: // 0 = Keep Islands // 1 = Delete Islands // 2 = Select Islands // 27 = Copper fill inside area mode: // 0 = Inner Fill Area Fill // 1 = Inner Fill Area Keepout // |2 = Keepout Areas without Distance // 28 = Copper fill max. heat trap junctions // 29 = Copper fill acute angle mode: // 0 = Acute Angles flat // 1 = Acute Angles round // 30 = Copper fill hatch mode: // 0 = Line Hatching // 1 = Grid Hatching // |2 = Create Editable Paths // 31 = Net visibility dialog box mode: // 0 = Single column net name list display // 1 = Multi-column net name list display // 32 = Group move display mode: // 0 = Moving Picture Off // 1 = Display Group Layer Only // 2 = Moving Picture On // 3 = Moving Picture All // 33 = Group trace selection mode: // 0 = Select Traces & Vias // 1 = Select Traces Only // 2 = Select Vias Only // 34 = Pick preference layer selection (LAY1) // 35 = Clipboard text placement request flag // 36 = Edit direction // 37 = Mincon Area Mode (Bit Patterns): // 0 = No Area Mincon // |1 = Copper Area Mincon // |2 = Connected Copper Area Mincon // 38 = Group angle lock mode: // 0 = Keep group angle lock // 1 = Automatically release group angle lock // 39 = Autoplacement Optimizer Passes // 40 = Autoplacement Part Swap On/Off Flag // 41 = Autoplacement Pin/Gate Swap On/Off Flag // 42 = Autoplacement Mirroring Mode: // 0 = No SMD mirroring // 1 = SMD Mirroring // 2 = SMD 2-Pin Mirroring // 3 = Only SMD Mirroring // 43 = Autoplacement Rotation Mode: // 0 = 0-90 Degree Rotation // 1 = 0-270 Degree Rotation // 2 = 0 Degree Rotation // 3 = 90 Degree Rotation // 4 = 0 XOR 90 Degree Rotation // 44 = Autoplacement Retry Passes // 45 = Autoplacement SMD Rotation Mode: // 0 = 0-90 Degree Rotation // 1 = 0-270 Degree Rotation // 2 = 0 Degree Rotation // 3 = 90 Degree Rotation // 4 = 0 XOR 90 Degree Rotation // 46 = Autoplacement Part Outline Layer (LAY1) // 47 = Group visibility mode: // 0 = Select all elements // 1 = Select visible elements only // 48 = Default text mirror mode and text mode (STD14|LAY14) // 49 = Autorouter Number of optimization runs // 50 = Autorouter Optimizer characteristic // 51 = Autorouter Max. number of vias per connection // 52 = Autorouter Router via delay at 1/10" // 53 = Autorouter Router pin channel delay // 54 = Autorouter Cross direction delay // 55 = Autorouter Direction change delay // 56 = Autorouter Path packing delay // 57 = Autorouter Statistical delay base // 58 = Autorouter Max. rip-ups per con. // 59 = Autorouter Max. rip-up level // 60 = Autorouter Max. number of rip-up retries // 61 = Autorouter Router via grid index // 62 = Autorouter Bus structure delay // 63 = Autorouter Re-route area 1 delay // 64 = Autorouter Re-route area 2 delay // 65 = Autorouter Skip existing path delay // 66 = Autorouter Router cleaning run enable // 67 = Autorouter Optim. cleaning run enable // 68 = Autorouter Power connection vector unroutes // 69 = Autorouter Automatic save enable // 70 = Autorouter Corner connection output enable // 71 = Autorouter Unroute output sort mode // 72 = Autorouter Corner mitring mode // 73 = Autorouter Existing traces orientation mode // 74 = Autorouter Standard connection layer delay // 75 = Autorouter Bus connection layer delay // 76 = Autorouter Wave limitation offset // 77 = Autorouter Gridless via check mode // 78 = Autorouter Input error checking mode // 79 = Autorouter Trace to pin entry mode // 80 = Autorouter Requested subgrid factor // 81 = Autorouter Router off-grid delay // 82 = Autorouter Bus recognition and routing mode // 83 = Autorouter SMD pin-via pass enable // 84 = Autorouter Pin/gate swap mode // 85 = Autorouter Requested gridless routing mode // 86 = Autorouter Incremental output mode // 87 = Autorouter Router prefered grid shift // 88 = Autorouter Router prefered grid delay // 89 = Autorouter Outside net area delay // 90 = Autorouter Last optimization par. change mode // 91 = Autorouter Auto rip-up parameter mode // 92 = Autorouter Prefered routing direction mode // 93 = Autorouter Optimizer order mode // 94 = Autorouter Via rip-up flag // 95 = Autorouter Routing window border size // 96 = Autorouter BGA fan out enable flag // 97 = Autorouter Fan out gridded check mode // 98 = Autorouter Alternate via shift mode // 99 = Autorouter Full via evaluation mode // 100 = Autorouter Micro via mode // 101 = Autorouter Forced dir. max. derivation // 102 = Autorouter Routing frame window flag // 103 = Autorouter Requested pad entry subgrid // 104 = Autorouter Power layer via mode // 105 = Autorouter Via check mode // 106 = Autorouter Large net connection count // 107 = Autorouter Autorouting active flag // 108 = CAM Heat trap base angle // 109 = Single corner edit flag // 110 = Resize with round corners flag // 111 = Hidden DRC errors display flag // 112 = DRC violation elements scan flag // 113 = Part placement trace move mode // 0 = No trace move // 1 = Trace end move // 2 = Trace segment move // 114 = Polygon edit autocomplete flag // 115 = Board Outline alternative documentary layer (LAY1) // 116 = Trace join query mode: // 0 = Never join traces // 1 = Always join traces // 2 = Query for trace join // 117 = Trace display class bits (LAY15) // 118 = Text display class bits (LAY15) // 119 = Copper polygon display class bits (LAY15) // 120 = Forbidden area polygon display class bits (LAY15) // 121 = Border polygon display class bits (LAY15) // 122 = Connected copper polygon display class bits (LAY15) // 123 = Documentary line display class bits (LAY15) // 124 = Documentary area display class bits (LAY15) // 125 = Copper fill with cutout polygon display class bits (LAY15) // 126 = Hatched copper polygon display class bits (LAY15) // 127 = Split power plane polygon display class bits (LAY15) // 128 = Flag - Color table saved // 129 = Airline color mode: // 0 = Use unroutes color // 1 = Use layer color // 130 = Airline clipping mode: // 0 = No unroutes clipping // 1 = Clip unroutes without workspace target // 131 = Trace collision mode: // -1 = Query for operation // 0 = Ignore collisions // 1 = Delete colliding traces // 2 = Delete colliding segments // 3 = Cut colliding segments // 132 = Layout trace merge query mode: // 0 = Never merge layout traces // 1 = Always merge layout traces // 2 = Query merge mode // 133 = Part trace merge query mode: // 0 = Never merge part traces // 1 = Always merge part traces // 2 = Query merge mode // 135 = Element move polygon display mode: // 0 = Display outline // 1 = Display filled // 136 = Group move airline display mode: // 0 = Airline Display Off // 1 = Display Group Part Pin Airlines // 137 = Trace collision distance check mode: // 0 = Use DRC distance for collision check // 1 = Consider only crossings as collision // 138 = Trace segment bundle pick mode: // 0 = Continuous segment pick // 1 = Pick first and last bundle segment // 139 = Trace segment insert pick mode: // 0 = 3 click selection // 1 = 2 click selection // 140 = Part edit DRC: // 0 = no part edit online DRC // 1 = part edit online DRC // 141 = Drill tool table optimization flag // 142 = Bus trace count // 143 = Edit bus trace count // 144 = Bus trace creation mode: // 0 = Create trace bundle // 1 = Create seperate traces // 145 = Bus trace corner mode: // 0 = Create angle corners // 1 = Create arc corners // 146 = Silk screen layer (LAY1) // 147 = Macro outline display mode: // 0 = No macro outline display // 1 = Display macro outline at moved references // 2 = Display macro outlines & int; // Returns parameter value );
The ged_getintpar function is used to query Layout Editor integer parameters previously set with ged_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions ged_getdblpar, ged_setintpar, ged_getstrpar, ged_setdblpar. ged_setstrpar.
int ged_getlaydefmode( // Default layer mode: // 0 = automatic layer default disabled // 1 = used edit layer as layer default // 2 = last used layer as layer default );
The ged_getlaydefmode function returns the current Layout Editor default layer mode.
Functions ged_getlayerdefault, ged_setlaydefmode, ged_setlayerdefault.
int ged_getlayerdefault( // Layer (LAY1) );
The ged_getlayerdefault function returns the current Layout Editor default layer.
Functions ged_getlaydefmode, ged_setlaydefmode, ged_setlayerdefault.
int ged_getmincon( // Returns
function type (LAY10)
);
The ged_getmincon function returns the currently selected Layout Editor function type, i.e., the airline display mode (LAY10).
void ged_getpathwidth( & double; // Returns small standard width (STD2) & double; // Returns wide standard width (STD2) );
The ged_getpathwidth function parameters return the Layout Editor standard widths for small and wide traces.
int ged_getpickmode( // Element pick mode:
// 0 = Pick preference layer pick
// 1 = Pick with element selection
// 2 = Exclusive pick preference layer pick
);
ged_getpickmode function returns the currently selected Layout Editor element pick mode.
Funktion ged_setpickmode.
int ged_getpickpreflay( // Returns pick preference layer (LAY1) );
The ged_getpickpreflay function returns the currently active Layout Editor pick preference layer for element selection (LAY1).
int ged_getpowlayerrcnt( // Powe layer error count );
The ged_getpowlayerrcnt function returns the current Layout Editor power layer error count.
int ged_getsegmovmode( // Returns trace segment move mode: // 0 = Move without neighbours // 1 = Move with neighbours // 2 = Adjust neighbours // 3 = Adjust neighbours without vias // 8 = Adjust next neighbours only // |4 = Open trace ends follow segment movement );
The ged_getsegmovmode function returns the current Layout Editor trace segment move mode.
Function ged_setsegmovmode.
int ged_getstrpar( // Returns status int [0,[; // Parameter type/number: // 0 = Last placed named reference name // 1 = Last placed named reference macro name // 2 = Last placed text string // 3 = Default library name // 4 = Next free name // 5 = Drill naming base // 6 = Drill part macro name pattern // 7 = Drill padstack macro name pattern // 8 = Input prompt override string // 9 = Last placed macro library // 10 = Autosave path name & string; // Returns parameter value );
The ged_getstrpar function is used to query Layout Editor string parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
Functions ged_getdblpar, ged_getintpar, ged_setdblpar, ged_setintpar, ged_setstrpar.
int ged_getviaoptmode( // Returns trace via optimization mode: // 0 = Via optimization // 1 = Keep vias );
The ged_getviaoptmode function returns the current Layout Editor trace via optimization mode.
Function ged_setviaoptmode.
double ged_getwidedraw( // Returns width value (STD2) );
The ged_getwidedraw function returns the current Layout Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.
int ged_groupselect( // Number of changes or (-1) on error int [0,9]; // Element selection type: // 0 = select by element type // 1 = select by element layer // 2 = select by element fixed flag // 3 = select by element visibility // 4 = select by element not on layer // 5 = select by element tree/net number // 6 = select by element negated tree/net number // 7 = select elements connected to tree number // 8 = select elements not connected to tree // 9 = select by element polygon type // 10 = select by element glued mode int; // Element selection value according to type: // 0 - element type (0|LAY6) // 1,4 - element layer (LAY1) // 2 - element fixed flag (STD11) // 3 - element visible flag (0|1) // 5,6 - element tree/net number // 7, 8 - tree/net number // 9 - element polygon type (LAY4) // 10 - element glued mode (STD11 | STD12) int [0,2]; // New group selection status (STD13) );
The ged_groupselect function changes the group flag of all elements of the specified type and/or value. The function returns the number of elements (de)selected or (-1) on error (i.e., on invalid and/or incompatible parameter specifications). Element selection value zero for element type selection is used for selecting elements of any type.
Internal layout element types such as the standard via definition(s) are excluded from group (de)selections with ged_groupselect to prevent from unintentionally modifying and/or deleting such elements and/or definitions when subsequently using other group functions.
int ged_highlnet( // Returns status
int [-1,[; // Net tree number
int [0,[; // Highlight off/on flag || (color/patterndef << 1)
);
The ged_highlnet function sets the highlight mode of the net specified by the given net tree number. The least significant bit of the highlight parameter designates whether the net should be highlighted (value 1) or not (value 0). The other bits the highlight parameter can be used to specify a highlight color code (bit 2 to 6) and/or a highlight display pattern (bit 7 to 12). The function returns nonzero if an invalid net tree number and/or highlight mode value has been specified.
Function ged_gethighlnet.
int ged_layergrpchg( // Number of elements int [0,[; // Layer number (LAY1) int [0,1]; // New group selection status (STD13) );
The ged_layergrpchg function changes the group flag of all elements placed on the specified layer. The function returns the number of elements (de)selected or (-1) on error.
int ged_partaltmacro( // Returns status string; // Part name string; // New part package type name );
The ged_partaltmacro function changes the package type of the given net list part. The function returns nonzero if the part package type has been successfully changed, (-1) for invalid input parameters, (-2) if the specified package does not contain all pins referenced by the part in the net list (package is changed anyway), (-3) if the specified part does not exist in the net list, (-4) if the new package type isn't allowed for this part, (-5) if the new package couldn't be loaded, (-6) if the new package couldn't be copied to the job file or (-7) for multiple package change requests (e.g.,a
tob
and thenb
toc
) in one program run.
It is strongly recommended not to use this function in L_CPART index loops since the current L_CPART index variables are invalid after calling ged_partaltmacro.
int ged_partnamechg( // Returns status string; // Old name string; // New name );
The ged_partnamechg function changes the name of part. The function returns nonzero if the part name has been successfully changed, (-1) for invalid input parameters, (-2) if the specified part is not yet placed, (-4) if the new name exists already or (-5) for multiple name change requests (e.g.,a
tob
and thenb
toc
) in one program run. On layout part macro level, ged_partnamechg can be used for the renaming of pins.
This function might change the net list in which case a L_CPART index loops since the current L_CPART index variables are invalid after calling ged_partnamechg.is subsequently required. It is strongly recommended not to use this function in
int ged_pickanyelem( // Returns status & index L_FIGURE; // Returns picked element int; // Pick element type set ((LAY6 except 7)<<1 or'ed) );
The ged_pickanyelem function activates a mouse interaction for selecting a figure list element from the specified pick element type set. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element was found at the pick position.
Function ged_pickelem.
int ged_pickelem( // Returns status
& index L_FIGURE; // Returns picked element
int [1,10]; // Pick element type (LAY6 except 7)
);
The ged_pickelem function activates an interactive figure list element pick request (with mouse). The required pick element type is specified with the second parameter. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element of the required type has been found at the pick position.
Functions ged_pickanyelem, ged_setpickelem.
int ged_setautocornins( // Returns status int [0,3]; // Auto corner insert mode: // 0 = Auto Corner Insert disabled // 1 = Auto Corner Insert Traces // 2 = Auto Corner Insert Areas // 3 = Auto Corner Insert Traces & Areas );
The ged_setautocornins function sets the Layout Editor input mode for automatically inserting corners when generating traces and/or polygons. Usually, the auto corner insert mode is selected with either option or option from the function. The function returs nonzero if an invalid octagon input mode has been specified.
int ged_setdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Last group placement x coordinate (STD2) // 1 = Last group placement y coordinate (STD2) // 2 = Default part placement angle // 3 = Copper fill isolation distance (STD2) // 4 = Copper fill min. area size (STD2) // 5 = Copper fill heat trap width (STD2) // 6 = Copper fill heat trap isolation (STD2) // 7 = Hatch line spacing (STD2) // 8 = Hatch line width (STD2) // 9 = Hatch line angle (STD3) // 10 = Net visibility dialog net name list control element width // 11 = Default text size (STD2) // 12 = DRC distance violation text size (STD2) // 13 = Autoplacement Part Expansion (STD2) // 14 = Autoplacement Part Pin Factor [0, 1.0] // 15 = Autoplacement Segment Fit [0, 1.0] // 16 = Autoplacement Part Outline Offset (STD2) // 17 = Default text placement angle (STD3) // 18 = Autorouter Border to copper LE distance (STD2) // 19 = Autorouter Heat trap to drill LE distance (STD2) // 20 = Autorouter Isolation to drill LE distance (STD2) // 21 = Autorouter Power plane connection LE run length (STD2) // 22 = Autorouter Requested special routing grid (STD2) // 23 = Autorouter Split power plane guard range (STD2) // 24 = Autorouter BGA grid tolerance distance (STD2) // 25 = Autorouter SMD power plane connection LE run length (STD2) // 26 = Autorouter Pin to via distance (STD2) // 27 = CAM Gerber standard line width (STD2) // 28 = CAM Minimum distance heat trap to drilling (STD2) // 29 = CAM Minimum distance isolation to drilling (STD2) // 30 = CAM Heat trap to drilling distance tolerance (STD2) // 31 = CAM Isolation to drilling distance tolerance (STD2) // 32 = CAM Power layer border width (STD2) // 33 = CAM Split power plane isolation width (STD2) // 34 = Bus trace width (STD2) // 35 = Bus trace spacing (STD2) double; // Parameter value );
The ged_setdblpar function is used to set Layout Editor double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ged_getdblpar function can be used to query parameter values set with ged_setdblpar.
Functions ged_getdblpar, ged_getintpar, ged_getstrpar, ged_setintpar, ged_setstrpar.
int ged_setdrcmarkmode( // Returns status int [0,1]; // DRC error display mode: // 0 = Error color error marker display // 1 = Highlight color error marker display );
The ged_setdrcmarkmode function sets the DRC error marker display mode. The functions returns nonzero for invalid display mode specifications.
Function ged_getdrcmarkmode.
int ged_setintpar( // Returns status int [0,[; // Parameter type/number: // 0 = Pickpunktanzeigemodus: // 0 = keine Pickpunktanzeige // 1 = Pickpunktanzeige // 2 = Pick point wide display // 3 = Pick point edit display // 1 = Automatic DRC on layout load mode: // 0 = no automatic DRC // 1 = automatic DRC with verification // 2 = automatic DRC without verification // [ 2 = use bae_setcolor instead ] // 3 = Info display flag: // 0 = No automatic info display // 1 = Automatic info display // 4 = Info display mode: // 0 = No info display // 1 = Complete info display // 2 = Copper info only display // 5 = Angle edit direction // 6 = Part level element DRC mode: // 0 = Complete DRC // 1 = Consider part macros checked // 7 = Grid corner scan mode: // 0 = No grid corner scan // 1 = Complete grid corner scan // 2 = Current window corner scan // 3 = Dynamic window corner scan // updated window // 8 = Mincon update mode // 9 = DRC polygon sub-type exclude bits // 10 = Warning output mode: // Bit 0: Supress SCM changed warnings // Bit 1: Supress copper fill problem polygon group selection wanrnings // Bit 2: Supress variant mismatch warnings // Bit 3: Supress autorouter mode termination warnings // 11 = Layer usage scan mode // 12 = Area polygon edit mode: // 0 = don't close polylines // 1 = always close polylines // 2 = polyline close prompt // 13 = DRC distance display pattern // 14 = Trace edit pick mode: // 0 = snap to input grid // 1 = pin/trace snap at first trace corner // [ 15 = System parameter - no write access ] // 16 = Trace net deletion query limit // 17 = Plot preview mode: // 0 = none // 1 = plotter pen width // 18 = DRC distance display mode: // 0 = none // 1 = trace distance line // 2 = area distance line // 3 = trace distance pattern // 4 = area distance pattern // 19 = Text layer mirroring mode: // 0 = no layer mirroring // 1 = documentary layer mirroring // 2 = signal and documentary layer mirroring // 20 = Default part mirroring mode // 21 = Autosave interval // 22 = Part airline display mode: // 0 = No airlines // 1 = Static airlines // 2 = Dynamic airlines // 23 = Angle lock toggle mode: // 0 = Pick side default // 1 = Grid toggle // 2 = Shorter side toggle // 3 = Edit direction // 24 = Copper fill heat trap mode: // 0 = Direct Connect // 1 = Pin & Via Heat Traps // 2 = Pin Heat Traps // 3 = Via Heat Traps // |4 = No Neighbour Pins Flag // |8 = Heat Trap Trace Flag // |16 = Only Unconnected Layers // 25 = Copper fill trace mode: // 0 = Round Corners // 1 = Octagonal Corners // 2 = Octagonal Circles // 3 = Octagonal Corners & Circles // 26 = Copper fill island mode: // 0 = Keep Islands // 1 = Delete Islands // 2 = Select Islands // 27 = Copper fill inside area mode: // 0 = Inner Fill Area Fill // 1 = Inner Fill Area Keepout // |2 = Keepout Areas without Distance // 28 = Copper fill max. heat trap junctions // 29 = Copper fill acute angle mode: // 0 = Acute Angles flat // 1 = Acute Angles round // 30 = Copper fill hatch mode: // 0 = Line Hatching // 1 = Grid Hatching // |2 = Create Editable Paths // 31 = Net visibility dialog box mode: // 0 = Single column net name list display // 1 = Multi-column net name list display // 32 = Group move display mode: // 0 = Moving Picture Off // 1 = Display Group Layer Only // 2 = Moving Picture On // 3 = Moving Picture All // 33 = Group trace selection mode: // 0 = Select Traces & Vias // 1 = Select Traces Only // 2 = Select Vias Only // 34 = Pick prefered layer (LAY1) without actions // 35 = Clipboard text placement request flag // 36 = Edit direction // 37 = Mincon Area Mode (Bit Patterns): // 0 = No Area Mincon // |1 = Copper Area Mincon // |2 = Connected Copper Area Mincon // 38 = Group angle lock mode: // 0 = Keep group angle lock // 1 = Automatically release group angle lock // 39 = Autoplacement Optimizer Passes // 40 = Autoplacement Part Swap On/Off Flag // 41 = Autoplacement Pin/Gate Swap On/Off Flag // 42 = Autoplacement Mirroring Mode: // 0 = No SMD mirroring // 1 = SMD Mirroring // 2 = SMD 2-Pin Mirroring // 3 = Only SMD Mirroring // 43 = Autoplacement Rotation Mode: // 0 = 0-90 Degree Rotation // 1 = 0-270 Degree Rotation // 2 = 0 Degree Rotation // 3 = 90 Degree Rotation // 4 = 0 XOR 90 Degree Rotation // 44 = Autoplacement Retry Passes // 45 = Autoplacement SMD Rotation Mode: // 0 = 0-90 Degree Rotation // 1 = 0-270 Degree Rotation // 2 = 0 Degree Rotation // 3 = 90 Degree Rotation // 4 = 0 XOR 90 Degree Rotation // 46 = Autoplacement Part Outline Layer (LAY1) // 47 = Group visibility mode: // 0 = Select all elements // 1 = Select visible elements only // 48 = Default text mirror mode and text mode (STD14|LAY14) // 49 = Autorouter Number of optimization runs // 50 = Autorouter Optimizer characteristic // 51 = Autorouter Max. number of vias per connection // 52 = Autorouter Router via delay at 1/10" // 53 = Autorouter Router pin channel delay // 54 = Autorouter Cross direction delay // 55 = Autorouter Direction change delay // 56 = Autorouter Path packing delay // 57 = Autorouter Statistical delay base // 58 = Autorouter Max. rip-ups per con. // 59 = Autorouter Max. rip-up level // 60 = Autorouter Max. number of rip-up retries // 61 = Autorouter Router via grid index // 62 = Autorouter Bus structure delay // 63 = Autorouter Re-route area 1 delay // 64 = Autorouter Re-route area 2 delay // 65 = Autorouter Skip existing path delay // 66 = Autorouter Router cleaning run enable // 67 = Autorouter Optim. cleaning run enable // 68 = Autorouter Power connection vector unroutes // 69 = Autorouter Automatic save enable // 70 = Autorouter Corner connection output enable // 71 = Autorouter Unroute output sort mode // 72 = Autorouter Corner mitring mode // 73 = Autorouter Existing traces orientation mode // 74 = Autorouter Standard connection layer delay // 75 = Autorouter Bus connection layer delay // 76 = Autorouter Wave limitation offset // 77 = Autorouter Gridless via check mode // 78 = Autorouter Input error checking mode // 79 = Autorouter Trace to pin entry mode // 80 = Autorouter Requested subgrid factor // 81 = Autorouter Router off-grid delay // 82 = Autorouter Bus recognition and routing mode // 83 = Autorouter SMD pin-via pass enable // 84 = Autorouter Pin/gate swap mode // 85 = Autorouter Requested gridless routing mode // 86 = Autorouter Incremental output mode // 87 = Autorouter Router prefered grid shift // 88 = Autorouter Router prefered grid delay // 89 = Autorouter Outside net area delay // 90 = Autorouter Last optimization par. change mode // 91 = Autorouter Auto rip-up parameter mode // 92 = Autorouter Prefered routing direction mode // 93 = Autorouter Optimizer order mode // 94 = Autorouter Via rip-up flag // 95 = Autorouter Routing window border size // 96 = Autorouter BGA fan out enable flag // 97 = Autorouter Fan out gridded check mode // 98 = Autorouter Alternate via shift mode // 99 = Autorouter Full via evaluation mode // 100 = Autorouter Micro via mode // 101 = Autorouter Forced dir. max. derivation // 102 = Autorouter Routing frame window flag // 103 = Autorouter Requested pad entry subgrid // 104 = Autorouter Power layer via mode // 105 = Autorouter Via check mode // 106 = Autorouter Large net connection count // 107 = Autorouter Autorouting active flag // 108 = CAM Heat trap base angle // 109 = Single corner edit flag // 110 = Resize with round corners flag // 111 = Hidden DRC errors display flag // 112 = DRC violation elements scan flag // 113 = Part placement trace move mode // 0 = No trace move // 1 = Trace end move // 2 = Trace segment move // 114 = Polygon edit autocomplete flag // 115 = Board Outline alternative documentary layer (LAY1) // 116 = Trace join query mode: // 0 = Never join traces // 1 = Always join traces // 2 = Query for trace join // 117 = Trace display class bits (LAY15) // 118 = Text display class bits (LAY15) // 119 = Copper polygon display class bits (LAY15) // 120 = Forbidden area polygon display class bits (LAY15) // 121 = Border polygon display class bits (LAY15) // 122 = Connected copper polygon display class bits (LAY15) // 123 = Documentary line display class bits (LAY15) // 124 = Documentary area display class bits (LAY15) // 125 = Copper fill with cutout polygon display class bits (LAY15) // 126 = Hatched copper polygon display class bits (LAY15) // 127 = Split power plane polygon display class bits (LAY15) // 128 = Flag - Color table saved // 129 = Airline color mode: // 0 = Use unroutes color // 1 = Use layer color // 130 = Airline clipping mode: // 0 = No unroutes clipping // 1 = Clip unroutes without workspace target // 131 = Trace collision mode: // -1 = Query for operation // 0 = Ignore collisions // 1 = Delete colliding traces // 2 = Delete colliding segments // 3 = Cut colliding segments // 132 = Layout trace merge query mode: // 0 = Never merge layout traces // 1 = Always merge layout traces // 2 = Query merge mode // 133 = Part trace merge query mode: // 0 = Never merge part traces // 1 = Always merge part traces // 2 = Query merge mode // 135 = Element move polygon display mode: // 0 = Display outline // 1 = Display filled // 136 = Group move airline display mode: // 0 = Airline Display Off // 1 = Display Group Part Pin Airlines // 137 = Trace collision distance check mode: // 0 = Use DRC distance for collision check // 1 = Consider only crossings as collision // 138 = Trace segment bundle pick mode: // 0 = Continuous segment pick // 1 = Pick first and last bundle segment // 139 = Trace segment insert pick mode: // 0 = 3 click selection // 1 = 2 click selection // 140 = Part edit DRC: // 0 = no part edit online DRC // 1 = part edit online DRC // 141 = Drill tool table optimization flag // 142 = Bus trace count // 143 = Edit bus trace count // 144 = Bus trace creation mode: // 0 = Create trace bundle // 1 = Create seperate traces // 145 = Bus trace corner mode: // 0 = Create angle corners // 1 = Create arc corners // 146 = Silk screen layer (LAY1) // 147 = Macro outline display mode: // 0 = No macro outline display // 1 = Display macro outline at moved references // 2 = Display macro outlines int; // Parameter value );
The ged_setintpar function is used to set Layout Editor integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ged_getintpar function can be used to query parameter values set with ged_setintpar.
Functions ged_getdblpar, ged_getintpar, ged_getstrpar, ged_setdblpar, ged_setstrpar.
int ged_setlaydefmode( // Returns status int [0,2]; // Default layer mode: // 0 = automatic layer default disabled // 1 = used edit layer as layer default // 2 = last used layer as layer default );
The ged_setlaydefmode function sets the Layout Editor default layer mode. The function returns zero if the assignment was successful or non-zero on error.
Functions ged_getlaydefmode, ged_getlayerdefault, ged_setlayerdefault.
int ged_setlayerdefault( // Returns status int; // Layer (LAY1) );
The ged_setlayerdefault function sets the Layout Editor default layer. The function returns zero if the assignment was successful or non-zero on error.
Functions ged_getlaydefmode, ged_getlayerdefault, ged_setlaydefmode.
int ged_setmincon( // Returns status
int [0,8]; // Required
function type (LAY10)
);
The ged_setmincon function sets the currently active Layout Editor function type, i.e., the airline display mode (LAY10). The function returns nonzero if an invalid function type value has been specified.
int ged_setnetattrib( // Returns status string; // Net name string; // Attribute name string; // Attribute value );
The ged_setnetattrib function assigns a value to the given attribute of the name-specified net. Attribute values with a maximum length of up to 40 characters can be stored. The function returns zero on successful attribute value assignment, (-1) if no valid element is loaded, (-2) on missing and/or invalid parameters, (-3) if the net has not been found or (-4) if the attribute with the given name is not defined on the specified net.
int ged_setpathwidth( // Returns status double ]0.0,[; // Required small path width (STD2) double ]0.0,[; // Required wide path width (STD2) );
The ged_setpathwidth function sets the currently active Layout Editor standard widths for small and wide traces. The function returns nonzero if invalid an invalid width value has been specified.
int ged_setpickelem( // Returns status index L_FIGURE; // Default pick element );
The ged_setpickelem function sets a default element for subsequent Layout Editor pick operations. The function returns zero if done or nonzero on error.
Function ged_pickelem.
int ged_setpickmode( // Returns status
int [0,2]; // Element pick mode:
// 0 = Pick peference layer pick
// 1 = Pick with element selection
// 2 = Exclusive pick preference layer pick
);
The ged_setpickmode function sets the Layout Editor element pick mode. The function returns nonzero for invalid pick mode specifications.
Function ged_getpickmode.
int ged_setpickpreflay( // Returns status int; // Required pick preference layer (LAY1) );
The ged_setpickpreflay function sets the currently active Layout Editor pick preference layer for element selection (LAY1). The function returns nonzero if an invalid pick preference layer has been specified.
int ged_setplantoplay( // Returns status int [0,99]; // Required layout top layer (LAY1) );
The ged_setplantoplay function defines the Layout Editor and/or layout element top layer setting. The function returns nonzero if an invalid signal layer has been specified.
int ged_setsegmovmode( // Returns status int [0,12]; // Trace segment move mode: // 0 = Move without neighbours // 1 = Move with neighbours // 2 = Adjust neighbours // 3 = Adjust neighbours without vias // 8 = Adjust next neighbours only // |4 = Open trace ends follow segment movement );
The ged_setsegmovmode function sets the Layout Editor trace segment move mode. The function returns zero if the assignment was successful or non-zero on error.
Function ged_getsegmovmode.
int ged_setstrpar( // Returns status int [0,[; // Parameter type/number: // [ 0 = System parameter - no write access ] // [ 1 = System parameter - no write access ] // 2 = Last placed text string // 3 = Standard library name // [ 4 = System parameter - no write access ] // 5 = Drill naming base // 6 = Drill part macro name pattern // 7 = Drill padstack macro name pattern // 8 = Input prompt override string // [ 9 = System parameter - no write access ] // 10 = Autosave path name string; // Parameter value );
The ged_setstrpar function is used to set Layout Editor string system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ged_getstrpar function can be used to query parameter values set with ged_setstrpar.
Functions ged_getdblpar, ged_getintpar, ged_getstrpar, ged_setdblpar, ged_setintpar.
int ged_setviaoptmode( // Returns status int [0,1]; // Trace via optimization mode: // 0 = Via optimization // 1 = Keep vias );
The ged_setviaoptmode function sets the Layout Editor trace via optimization mode. The function returns zero if the assignment was successful or non-zero on error.
Function ged_getviaoptmode.
int ged_setwidedraw( // Returns status double ]0.0,[; // Required width value (STD2) );
The ged_setwidedraw function sets the current Layout Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value is specified.
int ged_storedrill( // Returns status double; // Drill X coordinate (STD2) double; // Drill Y coordinate (STD2) double ]0.0,[; // Drill radius (STD2) int [0,[; // Drill class (LAY5) );
The ged_storedrill function stores a drill hole with the given placement parameters to the currently loaded layout element. The function returns nonzero on wrong environment or missing/invalid parameters.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_storepart( // Returns status string; // Reference name string; // Library symbol name double; // X coordinate (STD2) double; // Y coordinate (STD2) double; // Rotation angle (STD3) int [0,1]; // Mirror mode (STD14) );
The ged_storepart function stores a part (or padstack) with the given placement parameters to the currently loaded layout (or part) element. The next unplaced net list part is used if an empty string is passed for the reference name. The function returns zero if the part has been successfully placed, (1) if the part pins do not match the net list specifications, (-1) on wrong environment or missing/invalid parameters, (-2) if all parts are placed already, (-3) if the specified part is placed already, (-4) if the part cannot be loaded or (-6) if the part data could not be copied to the current job file.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ged_storepath( // Returns status int [0,99]; // Path layer (LAY1) double ]0.0,[; // Path width (STD2) );
The ged_storepath function generates a trace on the currently loaded layout and/or part using the specified placement parameters. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is invalid.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
Functions bae_storepoint, ged_drcpath.
int ged_storepoly( // Returns status int; // Polygon layer (LAY1) int [1,9]; // Polygon type (LAY4) string; // Polygon net name (for LAY4 types 4, 6 and 9) int [0,18]; // Polygon mirror mode (LAY3) );
The ged_storepoly function generates a polygon on the currently loaded layout element using the specified placement parameters. The polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the polygon has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is not valid for the specified polygon type.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
Functions bae_storepoint, ged_drcpoly.
int ged_storetext( // Returns status
string; // Text string
double; // Text X coordinate (STD2)
double; // Text Y coordinate (STD2)
double; // Text rotation angle (STD3)
double ]0.0,[; // Text size (STD2)
int; // Text layer (LAY1)
int; // Text mirror mode and style (STD14|LAY14)
);
The ged_storetext function generates a text on the currently loaded layout element using the specified placement parameters. The function return value is nonzero on wrong environment or missing/invalid parameters.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops. The input text string can be stored to a maximum of up to 40 characters; longer strings cause the function to return with an invalid parameter error code.
Function ged_attachtextpos.
int ged_storeuref( // Returns status string; // Library symbol name double; // Reference X coordinate (STD2) double; // Reference Y coordinate (STD2) double; // Reference rotation angle (STD3) int; // Reference layer (LAY1) int [0,1]; // Reference mirror (STD14) );
The ged_storeuref function stores an unnamed reference (via or pad) with the given placement parameters to the currently loaded layout element (layout, part or padstack). For vias, the reference mirror mode, the reference layer and the rotation angle are ignored. The function returns zero if the reference has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if the reference cannot be loaded or (-3) if the reference data could not be copied to the current job file.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
The following User Language system functions are assigned to caller type AR; i.e., they can be called from the Autorouter interpreter environment of the Bartels AutoEngineer:
int ar_asklayer( // Returns status & int; // Returns selected layer (LAY1|LAY9) int [0,5]; // Layer query type: // 0 = Documentary layers and signal layers // 1 = Signal layers // 2 = Signal layers // (includingand ) // 3 = Documentary layers // 4 = Signal and power layers // 5 = arbitrary display element types );
The ar_asklayer function activates an Autorouter layer selection menu. The layer query type designates the type of layers and/or display element types provided for selection. The function returns zero if a valid layer has been selected or (-1) if the layer selection was aborted.
int ar_delelem( // Returns status & index L_FIGURE; // Element );
The ar_delelem function deletes the given figure list element from the figure list. The function returns zero if the element was successfully deleted or nonzero on error.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
Function ar_drawelem.
void ar_drawelem( index L_FIGURE; // Element int [0, 4]; // Drawing mode (STD19) );
The ar_drawelem function updates the display of the given figure list element using the specified drawing mode.
Function ar_delelem.
int ar_elemangchg( // Returns status & index L_FIGURE; // Element double; // New rotation angle (STD3) );
The ar_elemangchg function changes the rotation angle of the given figure list element. The rotation angle must be in radians. The function returns zero if the element has been successfully rotated, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be rotated.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_elemfixchg( // Returns status & index L_FIGURE; // Element int [0,1]; // New fixed flag (STD11) );
The ar_elemfixchg function changes the fixed flag of the given figure list element. The fixed flag value 0 unfixes the element, the fixed flag value 1 fixes the element. The function returns zero if the element fixed flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be fixed.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_elemlaychg( // Returns status & index L_FIGURE; // Element int; // New layer (LAY1) );
The ar_elemlaychg function changes the layer of the given figure list element. The layer can be set for polygons, traces, texts, pads (on padstack level) and drill holes. For drill holes the layer input parameter specifies the drill class code. The function returns zero if the element layer has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element layer cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_elemmirrchg( // Returns status & index L_FIGURE; // Element int [0,18]; // New mirror mode (STD14|LAY3) );
The ar_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for polygons, texts and references. The function returns zero if the element mirror mode has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element mirror mode cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_elemposchg( // Returns status & index L_FIGURE; // Element double; // New X coordinate (STD2) double; // New Y coordinate (STD2) );
The ar_elemposchg function changes the position of the given figure list element. Polygons and/or traces are replaced to set the first point of the polygon/trace to the specified position. The function returns zero if the element has been successfully repositioned, (-1) if the figure list element is invalid or (-2) if the figure list element position cannot be set.
This function changes the current figure list and should be used carefully in forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_elemsizechg( // Returns status & index L_FIGURE; // Element double; // New size (STD2) );
The ar_elemsizechg function changes the size of the given figure list element. The size can be changed for texts, drill holes and traces. For traces, a trace width change is performed. The functions value is zero if the element size has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element size cannot be set.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_getdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Net visibility dialog net name list control element width // 1 = User-defined routing grid & double; // Returns parameter value );
The ar_getdblpar function is used to query Autorouter double parameters previously set with ar_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions ar_getintpar, ar_getstrpar, ar_setdblpar, ar_setintpar, ar_setstrpar.
int ar_getintpar( // Returns status int [0,[; // Parameter type/number: // 0 = Top layer color code // 1 = Mincon update mode // 2 = Warning output mode: // Bit 0: Supress SCM changed warnings // Bit 1: not used in Autorouter // Bit 2: Suppress variant mismatch warnings // 3 = Autosave interval // 4 = Net visibility dialog box mode: // 0 = Single column net name list display // 1 = Multi-column net name list display // 5 = Routing layer count // 6 = Routing grid code: // 0 = 1/20 Inch (1.27 mm) Standard // 1 = 1/40 Inch (0.635 mm) Standard // 2 = 1/50 Inch (0.508 mm) Standard // 3 = 1/60 Inch (0.4233 mm) Standard // 4 = 1/80 Inch (0.3175 mm) Standard // 5 = 1/100 Inch (0.254 mm) Standard // 6 = 1/40 Inch (0.635 mm) no Offset // 7 = 1/60 Inch (0.4233 mm) no Offset // 8 = 1/80 Inch (0.3175 mm) no Offset // 9 = 1/100 Inch (0.254 mm) with Offset // -1 = Other Grid // -2 = Other Grid with Offset // 7 = Mincon-Flächenmodus (Bitmuster): // 0 = Kein Flächen-Mincon // |1 = Kupferflächen-Mincon // |2 = Potentialflächen-Mincon // 8 = Flag - Color table saved // 9 = Airline color mode: // 0 = Use unroutes color // 1 = Use layer color // 10 = Drill tool table optimization flag & int; // Returns parameter value );
The ar_getintpar function is used to query Autorouter integer parameters previously set with ar_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions ar_getdblpar, ar_getstrpar, ar_setdblpar, ar_setintpar, ar_setstrpar.
int ar_getmincon( // Returns
function type (LAY10)
);
The ar_getmincon function returns the currently active Autorouter function type, i.e., the airline display mode (LAY10).
int ar_getpickpreflay( // Returns pick preference layer (LAY1) );
The ar_getpickpreflay function returns the currently active Autorouter pick preference layer for element selection (LAY1).
int ar_getstrpar( // Returns status int [0,[; // Parameter type/number: // 0 = Autosave path name & string; // Returns parameter value );
The ar_getstrpar function is used to query Autorouter string parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
Functions ar_getdblpar, ar_getintpar, ar_setdblpar, ar_setintpar, ar_setstrpar.
double ar_getwidedraw( // Returns width value (STD2) );
The ar_getwidedraw function returns the current Autorouter wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.
int ar_highlnet( // Returns status int [0,[; // Net tree number int [0,1]; // Highlight mode (0 = off, 1 = on) );
The ar_highlnet function sets the highlight mode of the net specified by the given net tree number. A highlight mode value of 1 highlights the net, a highlight mode value of 0 de-highlight the net. The function returns nonzero if an invalid net tree number and/or highlight mode value has been specified.
int ar_partnamechg( // Returns status string; // Old part name string; // New part name );
The ar_partnamechg function changes the name of a net list part. The function returns nonzero if the part name has been successfully changed, (-1) for invalid input parameters, (-2) if the specified part is not yet placed, (-3) if the specified part does not exist in the net list, (-4) if the new name exists already and (-5) on multiple name change requests (e.g.,a
tob
and thenb
toc
) in one program run.
This function changes the net list and therefore requires a Backannotation. It is strongly recommended not to use this function in L_CPART index loops since the current L_CPART index variables are invalid after calling ar_partnamechg.
int ar_pickelem( // Returns status & index L_FIGURE; // Returns picked element int [1,9]; // Pick element type (LAY6 except 7) );
The ar_pickelem function activates an interactive figure list element pick request (with mouse). The required pick element type is specified with the second parameter. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element of the required type has been found at the pick position.
int ar_setdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Net visibility dialog net name list control element width // [ 1 = System parameter - no write access ] double; // Parameter value );
The ar_setdblpar function is used to set Autorouter double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ar_getdblpar function can be used to query parameter values set with ar_setdblpar.
Functions ar_getdblpar, ar_getintpar, ar_getstrpar, ar_setintpar, ar_setstrpar.
int ar_setintpar( // Returns status int [0,[; // Parameter type/number: // [ 0 = use bae_setcolor instead ] // 1 = Mincon update mode // 2 = Warning output mode: // Bit 0: Supress SCM changed warnings // Bit 1: not used in Autorouter // Bit 2: Supress variant mismatch warnings // 3 = Autosave interval // 4 = Net visibility dialog box mode: // 0 = Single column net name list display // 1 = Multi-column net name list display // [ 5 = System parameter - no write access ] // [ 6 = System parameter - no write access ] // 7 = Mincon Area Mode (Bit Patterns): // 0 = No Area Mincon // |1 = Copper Area Mincon // |2 = Connected Copper Area Mincon // 8 = Flag - Color table saved // 9 = Airline color mode: // 0 = Use unroutes color // 1 = Use layer color // 10 = Drill tool table optimization flag int; // Parameter value );
The ar_setintpar function is used to set Autorouter integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ar_getintpar function can be used to query parameter values set with ar_setintpar.
Functions ar_getdblpar, ar_getintpar, ar_getstrpar, ar_setdblpar, ar_setstrpar.
int ar_setmincon( // Returns status
int [0,8]; // Required
function type (LAY10)
);
The ar_setmincon function sets the currently active Autorouter function type, i.e., the airline display mode (LAY10). The function returns nonzero if an invalid function type value has been specified.
int ar_setnetattrib( // Returns status string; // Net name string; // Attribute name string; // Attribute value );
The ar_setnetattrib function assigns a value to the given attribute of the name-specified net. Attribute values with a maximum length of up to 40 characters can be stored. The function returns zero if the attribute value assignment was successful, (-1) if no valid element is loaded, (-2) on missing and/or invalid parameters, (-3) if the net has not been found or (-4) if the attribute with the given name is not defined on the specified net.
int ar_setpickpreflay( // Returns status int; // Required pick preference layer (LAY1) );
The ar_setpickpreflay function sets the currently active Autorouter pick preference layer for element selection (LAY1). The function returns nonzero if an invalid pick preference layer has been specified.
int ar_setplantoplay( // Returns status int [0,99]; // Required layout top layer (LAY1) );
The ar_setplantoplay function defines the Autorouter and/or layout element top layer setting. The function returns nonzero if an invalid signal layer has been specified.
int ar_setstrpar( // Returns status int [0,[; // Parameter type/number: // 0 = Autosave path name string; // Parameter value );
The ar_setstrpar function is used to set Autorouter string system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ar_getstrpar function can be used to query parameter values set with ar_setstrpar.
Functions ar_getdblpar, ar_getintpar, ar_getstrpar, ar_setdblpar, ar_setintpar.
int ar_setwidedraw( // Returns status double ]0.0,[; // Required width value (STD2) );
The ar_setwidedraw function sets the current Autorouter wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value has been specified.
int ar_storepart( // Returns status string; // Reference name string; // Library symbol name double; // X coordinate (STD2) double; // Y coordinate (STD2) double; // Rotation angle (STD3) int [0,1]; // Mirror mode (STD14) );
The ar_storepart function stores a part (or padstack) with the given placement parameters to the currently loaded layout (or part) element. The next unplaced and selected net list part is used if an empty string is passed for the reference name. The function returns zero if the part has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if all parts are already placed, (-3) if the specified part is already placed, (-4) if the part cannot be loaded, (-5) if the part pins do not match the net list specifications or (-6) if the part data could not be copied to the current job file.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_storepath( // Returns status int [0,99]; // Path layer (LAY1) double ]0.0,[; // Path width (STD2) );
The ar_storepath function generates a trace on the currently loaded layout or part using the specified placement parameters. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is invalid.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
int ar_storeuref( // Returns status string; // Library symbol name double; // Reference X coordinate (STD2) double; // Reference Y coordinate (STD2) double; // Reference rotation angle (STD3) int; // Reference layer (LAY1) int [0,1]; // Reference mirror (STD14) );
The ar_storeuref function stores an unnamed reference (via or pad) with the given placement parameters to the currently loaded layout element (layout, part or padstack). For vias, the reference mirror mode, the reference layer and the rotation angle are ignored. The function returns zero if the reference has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if the reference cannot be loaded or (-3) if the reference data could not be copied to the current job file.
This function changes the current figure list and should be used carefully in
forall
loops for iterating
L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
The following User Language system functions are assigned to caller type CAM; i.e., they can be called from the CAM Processor interpreter environment of the Bartels AutoEngineer:
int cam_askplotlayer( // Returns status & int; // Returns selected layer (LAY1) );
The cam_askplotlayer function activates a CAM Processor layer selection menu. The function returns zero if a valid layer has been selected or (-1) if the layer selection has been aborted.
int cam_getdblpar( // Returns status int [0,[; // Parameter type/number: // [ 0 = System parameter; write-only access ] // 1 = Pixel bitmap resolution (STD2) // 2 = Last bitmap plot pixel ratio & double; // Returns parameter value );
The
cam_getdblpar function is used to query
CAM Processor double
parameters previously set with
cam_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions cam_getintpar, cam_setdblpar, cam_setintpar.
double cam_getdrlaccuracy( // Drill tool tolerance (STD2) );
The cam_getdrlaccuracy function returns the CAM Processor drill tool tolerance.
Function cam_setdrlaccuracy.
void cam_getgenpltparam( & int; // Plot all layers off/on (1=on, 0=off) & int; // Plot border off/on flag (1=on, 0=off) & int; // Plot rotate off/on flag: // 0 = rotate 0 degree // 1 = rotate 90 degree left & int; // Plot mirror mode (CAM1) & int; // Plot markers off/on flag: // 0 = off // 1 = on & double; // Plot accuracy (STD2) & double; // Plot origin X coordinate (STD2) & double; // Plot origin Y coordinate (STD2) );
The cam_getgenpltparam function returns the CAM Processor general plot parameters.
int cam_getgerberapt( // Returns status int [1,900]; // Aperture table index & int; // Aperture D-code: // 10..999 = valid D-codes // (-1) = aperture not defined & int; // Aperture type: // 0 = special aperture // 1 = round aperture // 2 = square aperture // 3 = thermal aperture (heat trap) // 4 = rectangular aperture & int; // Aperture drawing mode: // 0 = aperture for all drawing modes // 1 = aperture for flash structures // 2 = aperture for line structures & double; // Aperture dimension/X size (STD2) & double; // Aperture dimension/Y size (STD2) );
The cam_getgerberapt function gets the definition of the Gerber aperture stored at the given table index of the aperture table currently loaded to the CAM Processor. A D-code of (-1) is returned if there is no aperture defined at the specified table position. The function returns nonzero on missing or invalid parameters.
void cam_getgerberparam( & string; // Gerber plot file name & double; // Gerber standard line width (STD2) & int; // Gerber format (CAM4) & int; // Optimized Gerber output mode: // 0 = Optimization off // 1 = Optimization on & int; // Gerber fill mode: // 0 = line fill // 1 = multi-aperture fill // 2 = G36/G37 fill & int; // Gerber arc output mode: // 0 = use arc interpolation // 1 = use Gerber I/J arc commands & int; // Extended Gerber (RS-274-X) mode: // 0 = no Extended Gerber // 1 = Extended Gerber with // standard aperture table // 2 = Extended Gerber with // dynamic aperture table );
The cam_getgerberparam function returns the CAM Processor Gerber plot parameters.
void cam_gethpglparam( & string; // HP-GL plot file name & double; // HP-GL plot scaling factor & double; // HP-GL plotter speed (-1.0=full speed) & double; // HP-GL plotter pen width (STD2) & int; // HP-GL plot area fill mode: // 0 = fill off // 1 = fill on );
The cam_gethpglparam function returns the CAM Processor HP-GL plot parameters.
int cam_getintpar( // Returns status int [0,[; // Parameter type/number: // 0 = Top layer color code // 1 = Heat trap base angle // 2 = Warning output mode: // Bit 0: Supress SCM changed warnings // Bit 1: not used in CAM Processor // Bit 2: Suppress variant mismatch warnings // 3 = Area mirror visibility mode: // 0 = Normal area mirror visibility // 1 = Disable area mirror visibility // 4 = Last pixel plot result type: // -1 = No pixel plot yet // 0 = Board outline pixel ratio // 1 = Element borders pixel ratio // 5 = Last pixel plot total pixel count // 6 = Last pixel plot copper pixel count // 7 = Generic printer scale mode: // 0 = Fixed scale factor // 1 = Scale to paper size // 8 = Flag - Color table saved // 9 = Airline color mode: // 0 = Use unroutes color // 1 = Use layer color // 10 = Bitmap outline milling mode: // 0 = No Milling // 1 = Draw filled outline with millings // 11 = Generic printer drawing mode: // 0 = Set Color // 1 = Merge Color // 12 = Batch output flag // 13 = Drill tool table optimization flag // 14 = Plot preview mode: // 0 = 0 = None // 1 = 1 = Plotter pen width & int; // Returns parameter value );
The cam_getintpar function is used to query CAM Processor integer parameters previously set with cam_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions cam_getdblpar, cam_setdblpar, cam_setintpar.
int cam_getplotlaycode( // Returns HP-GL plot pen number (CAM4) int; // Layer number (LAY1) );
The cam_getplotlaycode function returns the layer-specific HP-GL plot pen number currently selected for multilayer plots. The layer-specific HP-GL pen number is also used for non-HP-GL multilayer plots where positive pen numbers denote layers currently selected for output and negative pen numbers denote layers not selected for output.
Function cam_setplotlaycode.
void cam_getpowpltparam( & double; // Min. distance heat-trap to drill (STD2) & double; // Min. distance isolation to drill (STD2) & double; // Tolerance heat-trap to drill (STD2) & double; // Tolerance isolation to drill (STD2) & double; // Power layer border width (STD2) & double; // Power plane isolation width (STD2) );
The cam_getpowpltparam function returns the CAM Processor power layer plot parameters.
double cam_getwidedraw( // Returns width value (STD2) );
The cam_getwidedraw function returns the CAM Processor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.
int cam_plotgerber( // Returns status int; // Gerber plot layer (LAY1) string; // Gerber plot file name double [0.00001,0.01]; // Gerber standard line width (STD2) double ]0.00000000053,[;// Gerber plotter unit length (CAM2) int [0,1]; // Optimized Gerber output mode: // 0 = Optimization off // 1 = Optimization on int [0,2]; // Gerber fill mode: // 0 = line fill // 1 = multi-aperture fill // 2 = G36/G37 fill int [0,1]; // Gerber arc output mode: // 0 = use arc interpolation // 1 = use Gerber I/J arc commands int [0,2]; // Extended Gerber (RS-274-X) mode: // 0 = no Extended Gerber // 1 = Extended Gerber with // standard aperture table // 2 = Extended Gerber with // dynamic aperture table int [0,1]; // Error highlight reset flag: // 0 = keep error highlight // 1 = de-highlight errors & int; // Returns flashed structure count & int; // Returns rect. filled structure count & int; // Returns circle filled structure count & int; // Returns multi filled structure count & int; // Returns line filled structure count & int; // Returns line drawn heat-traps count & int; // Returns overdraw error count );
The cam_plotgerber function generates the Gerber photo plot data for the specified layer and writes it to a file. The function only sets the specified Gerber standard line width, fill mode, and arc output mode plot parameters and reset the error highlight, if no output file name is specified (empty string). The function returns zero for successfully generated plots, 1 for invalid plot parameter specifications (i.e., parameter out of range, no aperture for standard line width, etc.) or (-1) on plot errors. Plot overdraw errors are automatically highlighted.
int cam_plothpgl( // Returns status int; // HP-GL plot layer (LAY1) int [1,99]; // HP-GL pen number string; // HP-GL plot file name double [0.1,100]; // HP-GL scaling factor double [-1.0,99]; // HP-GL speed ([centimetres/second]) or: // -1.0 = full speed double [0.00001,0.01]; // HP-GL pen width (STD2) int [0,1]; // HP-GL area fill mode: // 0 = fill off // 1 = fill on int [0,1]; // Error highlight reset flag: // 0 = keep error highlight // 1 = de-highlight errors & int; // Returns overdraw error count );
The cam_plothpgl function generates the HP-GL pen plot data for the specified layer and writes it to a file. The function only sets the specified HP-GL plot parameters if no output file name is specified (empty string). The function returns zero for successfully generated plots or (-1) on plot errors or invalid plot parameter specifications. Plot overdraw errors are automatically highlighted.
int cam_setdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Add extra dynamic aperture width, 0.0 clear list (STD2) // 1 = Pixel bitmap resolution (STD2) // 2 = Last bitmap plot pixel ratio double; // Parameter value );
The
cam_setdblpar function is used to set
CAM Processor double
system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The
cam_getdblpar function can be used to query parameter values set with
cam_setdblpar.
Functions cam_getdblpar, cam_getintpar, cam_setintpar.
int cam_setdrlaccuracy( // Returns status double [0.0,0.01]; // Drill tool tolerance (STD2) );
The cam_getdrlaccuracy function sets the CAM Processor drill tool tolerance. The function returns nonzero if invalid parameters are specified.
Function cam_getdrlaccuracy.
int cam_setgenpltparam( // Returns status int [0,4]; // Plot all layers off/on: // 0 = all layer plot mode off // 1 = all layer plot mode on // 2 = plot connected pins/vias only // 3 = plot all pins and connected vias // 4 = plot all vias and connected pins int [0,1]; // Plot border off/on flag: // 0 = off // 1 = on int [0,1]; // Plot rotate off/on flag: // 0 = rotate 0 degree // 1 = rotate 90 degree left int [0,5]; // Plot mirror mode (CAM1) int [0,1]; // Plot markers off/on flag: // 0 = off // 1 = on double [0.0,0.01]; // Plot accuracy (STD2) double; // Plot origin X coordinate (STD2) double; // Plot origin Y coordinate (STD2) );
The cam_setgenpltparam function sets the CAM Processor general plot parameters. The function returns nonzero if invalid parameters are specified.
int cam_setgerberapt( // Returns status int [1,900]; // Aperture table index int; // Aperture D-code: // 10..999 = valid D-codes // (-1) = delete aperture int [0,4]; // Aperture type: // 0 = special aperture // 1 = round aperture // 2 = square aperture // 3 = thermal aperture (heat trap) // 4 = rectangular aperture int [0,2]; // Aperture drawing mode: // 0 = aperture for all drawing modes // 1 = aperture for flash structures // 2 = aperture for line structures double [0.0,[; // Aperture dimension/X size (STD2) double [0.0,[; // Aperture dimension/Y size (STD2) );
The cam_setgerberapt function sets the definition of the Gerber aperture at the given table index in the aperture table currently loaded to the CAM Processor. A D-code value of (-1) resets the aperture definition at the specified table position. The aperture size is ignored for special aperture types. The function returns nonzero on missing or invalid parameters.
int cam_setintpar( // Returns status int [0,[; // Parameter type/number: // [ 0 = use bae_setcolor instead ] // 1 = heat trap base angle // 2 = Warning output mode: // Bit 0: Supress SCM changed warnings // Bit 1: not used in CAM Processor // Bit 2: Suppress variant mismatch warnings // [ 3 = System parameter - no write access ] // [ 4 = System parameter - no write access ] // [ 5 = System parameter - no write access ] // [ 6 = System parameter - no write access ] // 7 = Generic printer scale mode: // 0 = Fixed scale factor // 1 = Scale to paper size // 8 = Flag - Color table saved // 9 = Airline color mode: // 0 = Use unroutes color // 1 = Use layer color // 10 = Bitmap outline milling mode: // 0 = No Milling // 1 = Draw filled outline with millings // 11 = Generic printer drawing mode: // 0 = Set Color // 1 = Merge Color // 12 = Batch output flag // 13 = Drill tool table optimization flag // 14 = Plot preview mode: // 0 = 0 = None // 1 = 1 = Plotter pen width int; // Parameter value );
The cam_setintpar function is used to set CAM Processor integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The cam_getintpar function can be used to query parameter values set with cam_setintpar.
Functions cam_getdblpar, cam_getintpar, cam_setdblpar.
void cam_setplotlaycode( int; // Layer number (LAY1) int; // HP-GL plot pen number (CAM4) );
The cam_setplotlaycode function selects and/or sets the specified layer-specific HP-GL plot pen number for multilayer plots. The layer-specific HP-GL pen number is also used for non-HP-GL multilayer plots where positive pen numbers denote layers currently selected for output and negative pen numbers denote layers not selected for output.
Function cam_getplotlaycode.
int cam_setpowpltparam( // Returns status double [0.0,0.01]; // Min. distance heat-trap to drill (STD2) double [0.0,0.01]; // Min. distance isolation to drill (STD2) double [0.0,0.01]; // Tolerance heat-trap to drill (STD2) double [0.0,0.01]; // Tolerance isolation to drill (STD2) double [0.0,0.02]; // Power layer border width (STD2) double [0.0,0.02]; // Power plane isolation width (STD2) );
The cam_setpowpltparam function sets the CAM Processor power plot parameters. The function returns nonzero if invalid plot parameters are specified.
int cam_setwidedraw( // Returns status double ]0.0,[; // Input width value (STD2) );
The cam_setwidedraw function sets the current CAM Processor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value is specified.
The following User Language system functions are assigned to caller type CV; i.e., they can be called from the CAM View interpreter environment of the Bartels AutoEngineer:
int cv_aptgetcolor( // Color value (STD18) int; // Aperture index int; // Aperture mode );
The cv_aptgetcolor function returns the color value which is currently assigned in CAM View for displaying the specified Gerber aperture type.
Function cv_aptsetcolor.
int cv_aptsetcolor( // Returns status int; // Aperture index int; // Aperture mode int [-33554432,33554431]; // Color value (STD18) );
The cv_aptsetcolor function sets the color value to be used in CAM View for displaying the specified Gerber aperture type. The function returns zero if the assignment was successful or nonzero otherwise.
Function cv_aptgetcolor.
int cv_deldataset( // Returns status int [0,[; // Data set index );
The cv_deldataset function removes the specified CAM View data set from the workspace. The function returns zero if the operation was successfully completed or nonzero otherwise.
Function cv_movedataset.
int cv_getdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Input X offset (STD2) // 1 = Input Y offset (STD2) // 2 = Heat trap isolation width (STD2) // 3 = Wide line display start width (STD2) // 4 = Length of one Gerber plotter unit (STD2) & double; // Returns parameter value );
The
cv_getdblpar function is used to query
CAM View double
parameters previously set with
cv_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions cv_getintpar, cv_setdblpar, cv_setintpar.
int cv_getintpar( // Returns status int [0,[; // Parameter type/number: // 0 = Gerber import layer selection mode: // 0 = Assume single flash and line input layer // 1 = Select both flash and line input layer // 1 = Gerber layer query: // 0 = Layer not used // 1 = Layer used // 2 = Display color table/assignment: // 0 = Aperture color table/assignment // 1 = Layer color table/assignment // 3 = Area display mode: // 0 = Filled display // 1 = Outline display // 4 = Via D-Code // 5 = Heat trap base angle // 6 = Gerber Optimization: // 0 = Coordinate optimization off // 1 = Coordinate optimization on // 7 = Gerber Circle/Arc Mode: // 0 = Arbitrary Gerber arc angles // 1 = Max. 90 Gerber arc angles // 8 = Input Mirror Mode: // 0 = Mirroring Off // 1 = Mirroring at X-Axis // 2 = Mirroring at Y-Axis // 3 = Mirroring at Origin // 9 = Zero Supression Mode: // 0 = Suppress leading zeros // 1 = Suppress trailing zeros // 10 = Extended Gerber: // 0 = Extended Gerber (Header) off // 1 = Extended Gerber (Header) on // 11 = Gerber Coordinate Specification: // 0 = Absolute Coordinates // 1 = Incremental Coordinates with Reset // 2 = Incremental Coordinates without Reset // 12 = Gerber Documentary Layer Mode // 0 = Flashes as Documentary Line // 1 = Flashes as Documentary Area & int; // Returns parameter value );
The
cv_getintpar function is used to query
CAM View int
parameters previously set with
cv_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
Functions cv_getdblpar, cv_setdblpar, cv_setintpar.
int cv_movedataset( // Returns status int [0,[; // Data set index int; // Data set movement mirror flag double; // Data set movement X offset (STD2) double; // Data set movement Y offset (STD2) );
The cv_movedataset function moves (and mirrors) the specified CAM View data set using the specified offset parameters. The function returns zero if the operation was successfully completed or nonzero otherwise.
Function cv_deldataset.
int cv_setdblpar( // Returns status int [0,[; // Parameter type/number: // 0 = Input X offset (STD2) // 1 = Input Y offset (STD2) // 2 = Heat trap isolation width (STD2) // 3 = Wide line display start width (STD2) // 4 = Length of one Gerber plotter unit (STD2) double; // Parameter value );
The
cv_setdblpar function is used to set
CAM View double
system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The
cv_getdblpar function can be used to query parameter values set with
cv_setdblpar.
Functions cv_getdblpar, cv_getintpar, cv_setintpar.
int cv_setintpar( // Returns status int [0,[; // Parameter type/number: // 0 = Gerber import layer selection mode: // 0 = Assume single flash and line input layer // 1 = Select both flash and line input layer // 1 = Gerber layer usage: // Read-only parameter! // 2 = Display color table/assignment: // 0 = Aperture color table/assignment // 1 = Layer color table/assignment // 3 = Area display mode: // 0 = Filled display // 1 = Outline display // 4 = Via D-Code // 6 = Gerber Optimization: // 0 = Coordinate optimization off // 1 = Coordinate optimization on // 7 = Gerber Circle/Arc Mode: // 0 = Arbitrary Gerber arc angles // 1 = Max. 90 Gerber arc angles // 8 = Input Mirror Mode: // 0 = Mirroring Off // 1 = Mirroring at X-Axis // 2 = Mirroring at Y-Axis // 3 = Mirroring at Origin // 9 = Zero Supression Mode: // 0 = Suppress leading zeros // 1 = Suppress trailing zeros // 10 = Extended Gerber: // 0 = Extended Gerber (Header) off // 1 = Extended Gerber (Header) on // 11 = Gerber Coordinate Specification: // 0 = Absolute Coordinates // 1 = Incremental Coordinates with Reset // 2 = Incremental Coordinates without Reset // 12 = Gerber Documentary Layer Mode // 0 = Flashes as Documentary Line // 1 = Flashes as Documentary Area int; // Parameter value );
The cv_setintpar function is used to set CAM View integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The cv_getintpar function can be used to query parameter values set with cv_setintpar.
Functions cv_getdblpar, cv_getintpar, cv_setdblpar.
Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions :: PCB Design System Functions |
PCB Design System Functions
© 1985-2025 Oliver Bartels F+E