|
This section describes (in alphabetical order) the SCM system functions of the
Bartels User Language. See
Appendix C.1 for function description notations.
C.3.1 Schematic Data Access Functions
The following
User Language system functions are assigned to caller type CAP; i.e., they can be called from the
Schematic Editor interpreter environment of the
Bartels AutoEngineer:
cap_blockname - Get SCM sheet block name (CAP)
Synopsis
string cap_blockname( // Returns block name
);
Description
The
cap_blockname function returns the hierarchical block name of the currently loaded SCM sheet element. An empty string is returned if no SCM sheet is loaded or if the currently loaded plan is not a hierarchically defined module block.
cap_blocktopflag - Get SCM sheet block hierarchy level (CAP)
Synopsis
int cap_blocktopflag( // Returns block top level flag
);
Description
The
cap_blocktopflag is used to get the hierarchical circuit design mode of the currently loaded SCM sheet. The function returns zero if the currently loaded SCM sheet is not on top hierarchy level, 1 if the SCM sheet is on top hierarchy level (normal SCM sheet) or 2 if the SCM sheet is a single reference sub block.
cap_figboxtest - Check SCM element rectangle cross (CAP)
Synopsis
int cap_figboxtest( // Returns status
& index C_FIGURE; // Element
double; // Rectangle left border (STD2)
double; // Rectangle lower border (STD2)
double; // Rectangle right border (STD2)
double; // Rectangle upper border (STD2)
);
Description
The
cap_figboxtest function checks if the given figure list element crosses the given rectangle. The fucntion returns nonzero if the element boundaries cross the given rectangle.
cap_findblockname - Find SCM block circuit sheet with given block name (CAP)
Synopsis
string cap_findblockname( // Returns block plan name
string; // DDB file name
string; // Block name
);
Description
The
cap_findblockname function searches the DDB file with the given name for an hierarchical SCM plan with the specified block name and returns the name of that SCM plan element or an empty string if the DDB file is not available and/or if no SCM sheet with the given block name is found in the DDB file.
cap_findlayconpart - Get layout connection list part index (CAP)
Synopsis
int cap_findlayconpart( // Returns status
string; // Part name
& index CL_CPART; // Returns layout connection list part index
);
Description
The
cap_findlayconpart function searches the currently loaded layout net list for the specified part name and returns the corresponding part index. The function returns zero if the part was found or non-zero if the part was not found. The
cap_layconload function is used to load layout net lists to the SCM system.
See also
Functions cap_findlayconpartpin,
cap_findlaycontree,
cap_getlaytreeidx,
cap_layconload.
cap_findlayconpartpin - Get layout connection list pin index (CAP)
Synopsis
int cap_findlayconpartpin( // Returns status
string; // Pin name
index CL_CPART; // Net list part index
& index CL_CPIN; // Returns net list part pin index
);
Description
The
cap_findlayconpartpin function searches the currently loaded layout net list for the specified part pin name and returns the corresponding pin index. The function returns zero if the part pin was found or nonzero otherwise. The
cap_layconload. function is used to load layout net lists to the SCM system.
See also
Functions cap_findlayconpart,
cap_findlaycontree,
cap_getlaytreeidx,
cap_layconload.
cap_findlaycontree - Get layout connection list net name net index (CAP)
Synopsis
int cap_findlaycontree( // Returns status
string; // Net name
& index CL_CNET; // Returns layout connection list net index
);
Description
The
cap_findlaycontree function searches the currently loaded layout net list for the specified net name and returns the corresponding net index. The function returns zero if the tree was found or non-zero if the tree was not found. The
cap_layconload. function is used to load layout net lists to the SCM system.
See also
Functions cap_findlayconpartpin,
cap_findlayconpart,
cap_getlaytreeidx,
cap_layconload.
cap_getglobnetref - Get global net name reference (CAP)
Synopsis
string cap_getglobnetref( // Returns net name reference
// (or empty string if not referenced)
string; // Net/tree name
);
Description
The
cap_getglobnetref function retrieves the global net name reference for the soecified net.
cap_getlaytreeidx - Get layout connection list net number net index (CAP)
Synopsis
int cap_getlaytreeidx( // Returns status
int; // Tree number
& index CL_CNET; // Returns layout connection list net index
);
Description
The
cap_getlaytreeidx function searches the currently loaded layout net list for the specified tree number and returns the corresponding net index. The function returns zero if the tree number was found or non-zero if the tree number was not found. The
cap_layconload. function is used to load layout net lists to the SCM system.
See also
Functions cap_findlayconpartpin,
cap_findlayconpart,
cap_findlaycontree,
cap_layconload.
cap_getpartattrib - Get SCM part attribute value (CAP)
Synopsis
int cap_getpartattrib( // Returns status
string; // Part name
string; // Attribute name
& string; // Attribute value
);
Description
The
cap_getpartattrib function retrieves an attribute value of a name-specified part of the currently loaded SCM sheet and returns it with the attribute value parameter. The function returns zero if the required attribute value has been successfully retrieved, (-1) if no SCM sheet is loaded, (-2) on missing and/or invalid parameters, (-3) if the specified part is not placed on the current sheet or (-4) if no attribute with the specified name is defined on the part or has not been set.
cap_getrulecnt - Get rule count for specific object (CAP)
Synopsis
int cap_getrulecnt( // Returns rule count or (-1) on error
int; // Object class code
int; // Object ident code (int or index type)
);
Description
The
cap_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
C_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid
C_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
cap_getrulename function for getting object-specific rule names. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_getrulecnt function.
See also
Functions
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt,
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_getrulename - Get rule name from specific object (CAP)
Synopsis
int cap_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
);
Description
The
cap_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
C_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid
C_POOL index type value passed for the object ident code). The rule name list index to be specified can be determined using the
cap_getrulecnt function. The rule name is returned with the last function parameter. The function return value is zero on success or nonzero on error. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_getrulename function.
See also
Functions
cap_getrulecnt,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt,
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_getscbustapidx - Get currently scanned SCM bus tap (CAP)
Synopsis
index C_BUSTAP cap_getscbustapidx( // Bus tap index or (-1) if no bus tap scanned
);
Description
The cap_getscrefpidx function returns the currently scanned bus tap index. cap_getscrefpidx is intended for use in the callback functions of cap_scanall, cap_scanfelem or cap_scanpool only. The function returns (-1) if no scan function is active or if no bus tap is currently scanned.
See also
Functions cap_scanall, cap_scanfelem, cap_scanpool.
cap_getscclass - Get currently scanned SCM class (CAP)
Synopsis
int cap getscclass( // Returns SCM element class:
// 0 = Schematic
// 1 = Symbol
// 2 = Marker
// 3 = Label
// (-1) otherwise
);
Description
The cap_getscclass function returns the currently scanned SCM element class. cap_getscclass is intended for use in the callback functions of cap_scanall, cap_scanfelem or cap_scanpool only. The function returns (-1) if no scan function is active or if no SCM element is currently scanned.
See also
Functions cap_scanall,
cap_scanfelem,
cap_scanpool.
cap_getscrefpidx - Get currently scanned SCM library element (CAP)
Synopsis
index C_POOL cap_getscrefpidx // Returns pool index or (-1) if outside macro
);
Description
The
cap_getscrefpidx function returns the currently scanned macro reference pool index. This allows for designating the SCM library element to which the currently scanned polygon, text, etc. belongs to.
cap_getscrefpidx is intended for use in the callback functions of
cap_scanall,
cap_scanfelem or
cap_scanpool only. The function returns (-1) if no scan function is active or if no macro is currently scanned.
See also
Functions
cap_scanall,
cap_scanfelem,
cap_scanpool.
cap_getscstkcnt - Get SCM scan function stack depth (CAP)
Synopsis
int cap_getscstkcnt( // Returns scan stack depth
);
Description
The
cap_getscstkcnt function returns the current SCM scan function stack depth. I.e.,
cap_getscstkcnt can be used for control purposes in the callback functions of
cap_scanall,
cap_scanfelem or
cap_scanpool.
See also
Functions cap_scanall,
cap_scanfelem,
cap_scanpool.
cap_gettagdata - Get SCM tag symbol destination data (CAP)
Synopsis
int cap_gettagdata( // Returns status
index C_FIGURE; // Tag figure list element
int [0, [; // Tag index
& int; // Tag pin type (CAP6)
& string; // Tag pin name
& string; // Tag reference name 1
& string; // Tag reference name 2
);
Description
The
cap_gettagdata can be used to retrieve the destination data (pin type, pin name reference names) for the specified SCM tag symbol. The function return value is zero if the query was successful or nonzero otherwise.
See also
Function scm_settagdata.
cap_lastconseg - Get last modified SCM connection segment (CAP)
Synopsis
int cap_lastfigelem( // Returns status
& index C_CONSEG; // Returns connection segment index
);
Description
The
cap_lastconseg function gets the last created and/or modified SCM connection segment and returns the corresponding connection segment index with the return parameter. The function returns zero if such a connection segment exists or nonzero else.
See also
Function cap_lastfigelem.
cap_lastfigelem - Get last modified SCM figure list element (CAP)
Synopsis
int cap_lastfigelem( // Returns status
& index C_FIGURE; // Returns figure list index
);
Description
The
cap_lastfigelem function gets the last created and/or modified SCM 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.
See also
Function cap_lastconseg.
cap_layconload - Load layout net list (CAP)
Synopsis
int cap_layconload( // Returns status
string; // DDB file name ("?" for name query)
string; // Layout net list name ("?" for name query)
);
Description
The
cap_layconload function loads the layout net list with the given name from the specified DDB file name. The function returns zero if the layout net list was successfully loaded, (-1) on file access error or (-2) on missing and/or invalid parameters.
See also
Functions cap_findlayconpartpin,
cap_findlayconpart,
cap_findlaycontree,
cap_getlaytreeidx.
cap_maccoords - Get SCM (scanned) macro coordinates (CAP)
Synopsis
void cap_maccoords(
& double; // Macro X coordinate (STD2)
& double; // Macro Y coordinate (STD2)
& double; // Macro rotation angle (STD3)
& int; // Macro mirror mode (STD14)
);
Description
The
cap_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
cap_scanall,
cap_scanfelem or
cap_scanpool only (otherwise zero/default values are returned).
See also
Functions
cap_scanall,
cap_scanfelem,
cap_scanpool.
cap_macload - Load SCM macro element to memory (CAP)
Synopsis
int cap_macload( // Returns status
& index C_POOL; // Macro pool element index
string; // DDB file name
string; // Element name
int [100,[; // Element DDB class (STD1)
);
Description
The
cap_macload function loads the specified SCM 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.
cap_macload is intended to be applied by features such as SCM symbol browsers for examining library file contents. The
cap_macrelease function can be used to unload and/or release macro elements from memory.
See also
Function
cap_macrelease.
cap_macrelease - Unload/release SCM macro element from memory (CAP)
Synopsis
void cap_macrelease( // Returns status
index C_POOL; // Macro pool element index
);
Description
The
cap_macrelease function unloads and/or releases the SCM library symbol specified with the macro pool index parameter from memory.
cap_macrelease is intended to be used together with the
cap_macload function.
See also
Function
cap_macload.
cap_mactaglink - Get SCM (scanned) macro tag link data (CAP)
Synopsis
int cap_mactaglink( // Returns status
& int; // Tag pin type (CAP6)
& double; // Start point X coordinate (STD2)
& double; // Start point Y coordinate (STD2)
& double; // End point X coordinate (STD2)
& double; // End point Y coordinate (STD2)
);
Description
The
cap_mactaglink retrieves the tag pin type and the start and end point coordinates of the tag link defined with the currently scanned macro element. This function is intended for use in the macro callback function of
cap_scanall,
cap_scanfelem or
cap_scanpool only. The function returns 1 if a tag link has been found, 0 if no tag link is defined on the currently scanned macro element or (-1) on invalid and/or missing parameter specifications.
See also
Functions
cap_scanall,
cap_scanfelem,
cap_scanpool.
cap_nrefsearch - Search named SCM reference (CAP)
Synopsis
int cap_nrefsearch( // Returns status
string; // Reference name or empty string for newest named reference
& index C_FIGURE; // Returns figure list index
);
Description
The
cap_nrefsearch function searches for the specified named reference on the currently loaded SCM 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.
cap_partplan - Get SCM part sheet name (CAP)
Synopsis
string cap_partplan( // Part sheet name
string; // DDB file name
string; // Part name
);
Description
The
cap_partplan function returns the name of the SCM sheet where the name-specified part is placed in the given DDB file. An empty string is returned if the part has not been found.
cap_pointpoolidx - Get SCM junction point pool element (CAP)
Synopsis
index C_POOL cap_pointpoolidx(// Returns pool element
);
Description
The
cap_pointpoolidx function returns the pool element index, which references the library data of the junction point marker currently in use for connecting segments on the active SCM sheet. This function is useful for plotting SCM plans; the complete junction point marker data can be scanned with the
cap_scanpool function.
cap_ruleconatt - Attach rule(s) to SCM connection segment (CAP)
Synopsis
int cap_ruleconatt( // Returns nonzero on error
index C_CONSEG; // Connection segment element index
void; // Rule name string or rule name list array
);
Description
The
cap_ruleconatt function is used to attach a new set of name-specified rules to the SCM connection segment element specified with the first function parameter. Either a single rule name (i.e., a value of type
string ) or a set of rule names (i.e., an array of type
string ) 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
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_ruleconatt function.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt,
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_rulecondet - Detach rules from SCM connection segment (CAP)
Synopsis
int cap_rulecondet( // Returns nonzero on error
index C_CONSEG; // Connection segment element index
);
Description
The
cap_rulecondet function is used to detach all currently attached rules from the SCM connection segment element specified with the function parameter. The function returns zero on success or nonzero on error. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_rulecondet function.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt.
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_ruleerr - Rule System error status query (CAP)
Synopsis
void cap_ruleerr(
& int; // Error item code
& string; // Error item string
);
Description
The
cap_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.
Diagnosis
The Rule System error state can be determined by evaluating the parameters returned with the
cap_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 database |
135 | 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> definition |
139 | Rule System Rule <r> compiled with incompatible RULECOMP version |
Depending 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 file
brules.vdb in the BAE programs directory. Internal errors usually refer to Rule System implementation gaps and should be reported to Bartels.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt,
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_rulefigatt - Attach rule(s) to figure list element (CAP)
Synopsis
int cap_rulefigatt( // Returns nonzero on error
index C_FIGURE; // Figure list element index
void; // Rule name string or rule name list array
);
Description
The
cap_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 type
string ) or a set of rule names (i.e., an array of type
string ) can be specified with the second function parameter. Note that any rules previously attached to the figure list element is detached before attaching the new rule set. The function returns zero on success or nonzero on error. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_rulefigatt function.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigdet,
cap_ruleplanatt,
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_rulefigdet - Detach rules from figure list element (CAP)
Synopsis
int cap_rulefigdet( // Returns nonzero on error
index C_FIGURE; // Figure list element index
);
Description
The
cap_rulefigdet function is used to detach 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
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_rulefigdet function.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_ruleplanatt.
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_ruleplanatt - Attach rule(s) to currently loaded element (CAP)
Synopsis
int cap_ruleplanatt( // Returns nonzero on error
void; // Rule name string or rule name list array
int [0,1]; // Flag - SCM global rule
);
Description
The
cap_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 type
string ) or a set of rule names (i.e., an array of type
string ) can be specified with the function parameter. Note that any rules previously attached to the current element is detached before attaching the new rule set. The SCM global rule parameter allows for the attachment of rules to all SCM sheets of the currently SCM sheet element (i.e., this parameter is only evaluated if an SCM sheet element is loaded). The function returns zero on success or nonzero on error. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_ruleplanatt function.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplandet,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_ruleplandet - Detach rules from currently loaded element (CAP)
Synopsis
int cap_ruleplandet( // Returns nonzero on error
int [0,1]; // Flag - SCM global rule
);
Description
The
cap_ruleplandet function to detach all currently attached rules from the currently loaded element. The SCM global rule parameter allows for the detachment of rules from all SCM sheets of the currently SCM sheet element (i.e., this parameter is only evaluated if an SCM sheet element is loaded). The function returns zero on success or nonzero on error. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_ruleplandet function.
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt,
cap_rulequery;
Neural Rule System and
Rule System Compiler.
cap_rulequery - Perform rule query on specific object (CAP)
Synopsis
int cap_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
);
Description
The
cap_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 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
C_FIGURE index type value passed for the object ident code) or a pool list element (object class code 2 with valid
C_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 values |
The 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 values |
Each 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
cap_rulequery function returns a (non-negative) hit count denoting the number of value set entries matched by the query. The function returns (-1) on error. The
cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the
cap_rulequery function.
Examples
With the rule
rule 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
cap_rulequery call
hitcount = cap_rulequery(0,0,"subj","pred","%s ?d",intresult,"A") ;
sets the
int variable
hitcount to 3 and the
int variable
intresult to 4. whilst a call such as
hitcount = cap_rulequery(0,0,"subj","pred","-?s %d",strresult,6) ;
sets
hitcount to 2 and
string variable
strresult to
B .
See also
Functions
cap_getrulecnt,
cap_getrulename,
cap_ruleerr,
cap_ruleconatt,
cap_rulecondet,
cap_rulefigatt,
cap_rulefigdet,
cap_ruleplanatt,
cap_ruleplandet;
Neural Rule System and
Rule System Compiler.
cap_scanall - Scan all SCM figure list elements (CAP)
Synopsis
int cap_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; // Macro callback function
* int; // Connection callback function
* int; // Polygon callback function
* int; // Text callback function
);
Description
The
cap_scanall function scans all figure list elements placed on the currently loaded SCM element with all hierarchy levels. User-defined scan functions automatically activated according to the currently scanned element type. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword
NULL . 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 C_MACRO macro, // Macro index
index C_POOL pool, // Internal pool index
int macinws, // Macro in workspace flag (STD10)
string refname, // Macro reference name
index C_LEVEL level, // Macro signal level
index C_LEVEL buslevel // Macro bus signal level
)
{
// Macro callback function statements
:
return(contscan);
}
Connected elements share the same non-negative signal level value. The return value of the macro callback function must be 1 for continue scan, 0 for stop scan or (-1) on error.
Connection callback function
int confuncname(
index C_CONBASE cbase, // Connection base index
int segidx, // Segment index
int ctyp, // Connection type:
// 0 = normal connection
// 1 = junction point
double lx, // Lower X coordinate (STD2)
double ly, // Lower Y coordinate (STD2)
double ux, // Upper X coordinate (STD2)
double uy, // Upper Y coordinate (STD2)
int busflag, // Bus connection flag:
// 0 = normal connection
// 1 = bus connection
int cinws, // Connection in workspace flag (STD10)
index C_LEVEL level // Connection signal level
)
{
// Connection callback function statements
:
return(errstat);
}
The connection type value 0 denotes a normal (or bus) connection. Connection type value 1 denotes a connection junction point with identical upper and lower coordinates. Connected elements share the same non-negative signal level value. The return value of the connection callback function must be zero for scan ok or nonzero on error.
Polygon callback function
int polyfuncname(
index C_POLY poly, // Polygon index
int polyinws, // Polygon in workspace flag (STD10)
index C_LEVEL level, // Polygon level
int macclass, // Polygon macro class (STD1)
int bustapidx // Polygon bustap index
)
{
// Polygon callback function statements
:
return(errstat);
}
The macro class refers to the macro where the polygon is placed onto. The bustap index is non-negative if the polygon is placed on a bustap. Connected elements share the same non-negative signal level value. The return value of the polygon callback function must be zero for scan ok or nonzero on error.
Text callback function
int textfuncname(
index C_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)
double size, // Text size (STD2)
string textstr, // Text string
int textinws, // Text in workspace flag (STD10)
int macclass, // Text macro class
int variant // Text variant attribute flag
)
{
// Text callback function statements
:
return(errstat);
}
The macro class refers to the macro where the text is placed onto. The return value of the text callback function must be zero for scan ok or nonzero on error.
See also
Functions
cap_maccoords,
cap_scanfelem,
cap_scanpool.
cap_scanfelem - Scan SCM figure list element (CAP)
Synopsis
int cap_scanfelem( // Returns scan Status
index C_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; // Macro callback function
* int; // Connection callback function
* int; // Polygon callback function
* int; // Text callback function
);
Description
The
cap_scanfelem function scans the specified SCM 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
cap_scanfelem is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See
cap_scanall for the callback function definitions.
See also
Functions
cap_maccoords,
cap_scanall,
cap_scanpool.
cap_scanpool - Scan SCM pool element (CAP)
Synopsis
int cap_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; // Macro callback function
* int; // Connection callback function
* int; // Polygon callback function
* int; // Text callback function
);
Description
The
cap_scanpool function scans the specified SCM 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
cap_scanpool is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See
cap_scanall for the callback function definitions.
See also
Functions
cap_maccoords,
cap_scanall,
cap_scanfelem.
cap_vecttext - Vectorize SCM text (CAP)
Synopsis
int cap_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,[; // Text style (CAP7)
string; // Text string
* int; // Text vectorize function
);
Description
The
cap_vecttext function vectorizes the specified text using the currently loaded text font. The 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.
C.3.2 Schematic Editor Functions
The following
User Language system functions are assigned to caller type SCM; i.e., they can be called from the
Schematic Editor interpreter environment of the
Bartels AutoEngineer:
scm_askrefname - SCM reference name selection (SCM)
Synopsis
int scm_askrefname( // Returns status
& string; // Returns reference name
);
Description
The
scm_askrefname function activates a dialog for selecting a named reference, i.e., a symbol on SCM plan level or a pin on SCM symbol level. The functions returns zero if a named reference was successfully selected or (-1) on error.
scm_asktreename - SCM net name selection (SCM)
Synopsis
int scm_asktreename( // Returns status
& string; // Returns tree/net name
);
Description
The
scm_asktreename function activates a dialog for selecting a net. The functions returns zero if a net was successfully selected or (-1) on error.
scm_attachtextpos - Attach text position to SCM element (SCM)
Synopsis
int scm_attachtextpos( // Returns status
index C_FIGURE; // SCM figure list element
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 [-1,1]; // Text mirror mode (STD14) or (-1) for reset
);
Description
The
scm_attachtextpos funtion assigns a text position modifier with the specified properties for position, rotation, size and mirroring to the text string of the specified SCM figure list element. The function returns zero if the assignment was successful, (-1) for invalid parameters or (-2) if the SCM element provides no text position modifier for the specified text string.
See also
Function
scm_storetext.
scm_checkbustapplot - Get SCM bus tap plot status (SCM)
Synopsis
int scm_checkbustapplot( // Plot status
index C_FIGURE; // Bus connection figure list index
index C_BUSTAP; // Bus tap index
);
Description
The scm_checkbustapplot function returns 1 if plot output is disabled for the specified bus tap, or zero otherwise.
scm_checkjunctplot - Get SCM junction point plot status (SCM)
Synopsis
int scm_checkjunctplot( // Plot status
double; // Junction point X position (STD2)
double; // Junction point Y position (STD2)
);
Description
The
scm_checkjunctplot check whether connection junction point markers at the given coordinates are to be plotted. The function returns 1 if plot output is disabled or 0 if plot output is enabled.
scm_chkattrname - SCM attribute name validation (SCM)
Synopsis
int scm_chkattrname( // Returns non-zero if invalid attribute name
string; // Attribute name
);
Description
The
scm_chkattrname function checks if the specified attribute name is a valid attribute name which allows for attribute value assignment. The functions returns zero if the attribute name is valid or non-zero otherwise.
See also
Function
scm_setpartattrib.
scm_conseggrpchg - Change SCM connection segment group flag (SCM)
Synopsis
int scm_conseggrpchg( // Returns status
index C_CONSEG; // Connection segment
int [0,6]; // New group selection status (STD13)
// |4 - Display group status message
);
Description
The
scm_conseggrpchg function changes the group flag of the given connection segment. The function returns zero if the connection segment group flag has been successfully changed or (-1) if the given element is invalid.
scm_deflibname - SCM setup default library name (SCM)
Synopsis
string scm_deflibname( // Returns default library name
);
Description
The
scm_deflibname function returns the default SCM library name defined in the BAE setup file.
scm_defloglname - SCM setup default packager library name (SCM)
Synopsis
string scm_defloglname( // Returns default packager library name
);
Description
The
scm_defloglname function returns the default packager layout library name defined in the BAE setup file.
See also
Function
con_getlogpart; utility program
bsetup.
scm_defsegbus - SCM connection segment bus definition (SCM)
Synopsis
int scm_defsegbus( // Returns status
& index C_CONSEG; // Connection segment
);
Description
The
scm_defsegbus performs a bus definition on the given connection segment and all adjacent segments. The function returns nonzero on bus definition errors.
Warning
This function changes the current figure list and should be used carefully in
forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_delconseg - Delete SCM connection segment (SCM)
Synopsis
int scm_delconseg( // Returns status
& index C_CONSEG; // Connection segment
);
Description
The
scm_delconseg function deletes the given connection segment from the figure list. The function returns zero if the connection segment was successfully deleted or nonzero on error.
Warning
This function changes the current figure list and should be used carefully in
forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_delelem - Delete SCM figure list element (SCM)
Synopsis
int scm_delelem( // Returns status
& index C_FIGURE; // Element
);
Description
The
scm_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.
Warning
This function changes the current figure list and should be used carefully in
forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Function scm_drawelem.
scm_drawelem - Redraw SCM figure list element (SCM)
Synopsis
void scm_drawelem(
index C_FIGURE; // Element
int [0, 4]; // Drawing mode (STD19)
);
Description
The
scm_drawelem function updates the display of the given figure list element using the specified drawing mode.
See also
Function scm_delelem.
scm_elemangchg - Change SCM figure list element rotation angle (SCM)
Synopsis
int scm_elemangchg( // Returns status
& index C_FIGURE; // Element
double; // New rotation angle (STD3)
);
Description
The
scm_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.
Warning
This function changes the current figure list and should be used carefully in
forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_elemgrpchg - Change SCM figure list element group flag (SCM)
Synopsis
int scm_elemgrpchg( // Returns status
index C_FIGURE; // Element
int [0,6]; // New group selection status (STD13)
// |4 - Display group status message
);
Description
The
scm_elemgrpchg function changes the group flag of the given figure list element. A group flag value of 0 deselects the element, a group flag value of 1 selects the element. 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.
scm_elemmirrchg - Change SCM figure list element mirror mode (SCM)
Synopsis
int scm_elemmirrchg( // Returns status
& index C_FIGURE; // Element
int [0,1]; // New mirror mode (STD14)
);
Description
The
scm_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for 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 cannot be mirrored.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_elemposchg - Change SCM figure list element position (SCM)
Synopsis
int scm_elemposchg( // Returns status
& index C_FIGURE; // Element
double; // New X coordinate (STD2)
double; // New Y coordinate (STD2)
);
Description
The
scm_elemposchg function changes the position of the given figure list element. 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.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_elemsizechg - Change SCM figure list element size (SCM)
Synopsis
int scm_elemsizechg( // Returns status
& index C_FIGURE; // Element
double; // New size (STD2)
);
Description
The
scm_elemsizechg function changes the size of the given figure list element. The size can be changed for texts only. 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.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_findpartplc - Layout part placement status query (BAE HighEnd) (SCM)
Synopsis
int scm_findpartplc( // Placement status
string; // Part name
);
Description
The
scm_findprtplc function can be used in the
BAE HighEnd Schematic Editor to query the placement status of layout parts.
The function returns 1 if a part with the specified part name is known to be placed on the project's layout. Otherwise the return value is zero.
scm_getdblpar - Get SCM double parameter (SCM)
Synopsis
int scm_getdblpar( // Returns status
int [0,[; // Parameter type/number:
// 0 = Plot scale factor
// 1 = Plotter HPGL speed
// 2 = Plotter pen width (STD2)
// 3 = Last group placement x coordinate (STD2)
// 4 = Last group placement y coordinate (STD2)
// 5 = Default symbol placement angle (STD3)
// 6 = Default text size (STD2)
// 7 = Default text placement angle (STD3)
& double; // Returns parameter value
);
Description
The
scm_getdblpar function is used to query
Schematic Editor double parameters previously set with
scm_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions scm_getintpar,
scm_getstrpar,
scm_setdblpar,
scm_setintpar,
scm_setstrpar.
scm_getgroupdata - SCM group placement data query (SCM)
Synopsis
int scm_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
);
Description
scm_getgroupdata function can be used to retrieve the current
Schematic Editor group placement interaction input data. The function returns nonzero if no group placement interaction is activated.
See also
Function scm_getinputdata.
scm_gethighlnet - Get SCM net highlight mode (SCM)
Synopsis
int scm_gethighlnet( // Returns status
int [-1,[; // Net tree number or -1 for highlight focus modus query
& int; // Highlight mode
);
Description
The
scm_gethighlnet function can be used to get the highlight mode 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 function returns nonzero if the query was successful, or zero on error (net not found, invalid parameters).
See also
Function
scm_highlnet.
scm_gethpglparam - SCM HP-GL plot parameter query (SCM)
Synopsis
void scm_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
& int; // HP-GL plot rotation mode:
// 0 = no rotation
// 1 = 90 degree rotation
// else = automatic rotation
);
Description
The
scm_gethpglparam function returns the
Schematic Editor HP-GL plot parameters.
scm_getinputdata - SCM input data query (SCM)
Synopsis
int scm_getinputdata( // Status
& double; // Initial X coordinate (STD2)
& double; // Initial Y coordinate (STD2)
& double; // Initial width (STD2)
& int; // Initial display element type (SCM1)
& double; // Current X coordinate (STD2)
& double; // Current Y coordinate (STD2)
& double; // Current width (STD2)
& int; // Current display element type (SCM1)
& void; // Input mode/element
& 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) */
);
Description
The
scm_getinputdata function can be used to retrieve the current
Schematic 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.
See also
Function scm_getgroupdata.
scm_getintpar - Get SCM integer parameter (SCM)
Synopsis
int scm_getintpar( // Returns status
int [0,[; // Parameter type/number:
// 0 = Pick point display mode:
// 0 = No pick point display
// 1 = Pick point display
// 1 = Symbol/group reroute mode:
// Bit 0/1: Router mode
// 0 = Router off
// 1 = Symbol & group route
// 2 = Symbol route only
// 3 = Group route only
// Bit 2: quick shot route flag
// 2 = Symbol name move preservation mode:
// 0 = Reset symbol texts on symbol move
// 1 = Keep symbol text offsets
// 3 = Last placed reference type:
// (-1) = No reference placed yet
// 0 = Symbol
// 1 = Label
// 2 = Module Port
// 4 = Warning mode for connecting named nets:
// 0 = Warning message display deactivated
// 1 = Warning message display activated
// 5 = Element pick mode:
// 0 = Best pick
// 1 = Pick element selection
// 6 = Generic printer color mode:
// 0 = B/W
// 1 = Color
// 7 = Warning output mode:
// Bit 0: Supress $ rename warnings
// Bit 1: Supress net join warnings
// Bit 2: Supress module port warnings
// Bit 4: Supress group symbol rename warnings
// Bit 5: Supress variant mismatch warnings
// 8 = Name prompt mode:
// 0 = Autopattern symbol name
// 1 = Prompt for symbol name
// 9 = Info display flag:
// 0 = no automatic info display
// 1 = automatic info display
// 10 = Info display mode:
// 0 = no info display
// 1 = complete info display
// 2 = net related info only display
// 11 = Label rerouting mode:
// 0 = no label rerouting
// 1 = label rerotuing
// 12 = Sub symbol number offset
// 13 = Generic plot scale mode:
// 0 = fix scale factor
// 1 = autosize to page
// 14 = Generic color mode:
// 0 = black/white
// 1 = use current color settings
// 15 = HPGL fill mode:
// 0 = outline draw
// 1 = filled draw
// 2 = filled draw, draw wide lines/texts
// 16 = Area polygon edit mode:
// 0 = don't close polylines
// 1 = always close polylines
// 2 = polyline close prompt
// 17 = Group connection rerouting mode:
// 0 = no outside antenna deletion
// 1 = delete 1st outside antenna segment
// 2 = delete complete outside antenna
// 18 = Default user units code:
// 0 = metric
// 1 = imperial
// 19 = Plot preview mode:
// 0 = none
// 1 = plotter pen width
// 20 = Autosave interval
// 21 = Automatic connection corners
// 22 = Angle lock toggle flag
// 23 = Default symbol mirroring
// 24 = Group move display mode:
// 0 = Moving Picture On
// 1 = Moving Picture All
// 2 = Instant Moving Picture
// 25 = Clipboard text placement request flag
// 26 = Signal router routing range
// 27 = Automatic bustap connection
// 28 = Signal router marker scan flag
// 29 = Segment move mode:
// 0 = Move without neighbours
// 1 = Move with neighbours
// 2 = Adjust neighbours
// |4 = End point follows segment
// 30 = Group angle lock mode:
// 0 = Keep group angle lock
// 1 = Automatically release group angle lock
// 31 = Default text mirror mode (STD14)
// 32 = Default text mode (CAP1|CAP7)
// 33 = Symbol $noplc plot visibility mode:
// Bit 0 = Set $noplc if plot visibility changes
// Bit 1 = Set plot visibility if $noplc changes
// 34 = Net plan list maximum length [ 3,200]
// 35 = Single corner edit flag
// 36 = Unroute line creation flag
// 37 = Polygon edit autocomplete flag
// 38 = Error highlight mode:
// 0 = Error highlight
// 1 = Error pattern/dash
// 39 = Flag - Automirror horizontal bus taps
// 40 = Symbol/label tag mode:
// 0 = Standard symbol
// 1 = Virtual tag
// 2 = Netlist tag
// 41 = Connection split mode:
// 0 = No connection split
// 1 = Only at 2 pin symbols
// 2 = Connection split
// 42 = Symbol connection split mode:
// 0 = No connection split
// 1 = Only at 2 pin symbols
// 2 = Connection split
// 43 = Junction marker group segment count set by scm_checkjunctplot
// 44 = Current project plan count
// 45 = Display class bits connection (SCM2)
// 46 = Display class bits bus (SCM2)
// 47 = Display class bits text (SCM2)
// 48 = Display class bits comment text (SCM2)
// 49 = Display class bits graphic area (SCM2)
// 50 = Display class bits graphic line (SCM2)
// 51 = Display class bits dotted line (SCM2)
// 52 = Display class bits connection area (SCM2)
// 53 = Display class bits net area (SCM2)
// 54 = Display class bits macro outline (SCM2)
// 55 = Display class bits tag (SCM2)
& int; // Returns parameter value
);
Description
The
scm_getintpar function is used to query
Schematic Editor integer parameters previously set with
scm_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions scm_getdblpar,
scm_getstrpar,
scm_setdblpar,
scm_setintpar,
scm_setstrpar.
scm_getstrpar - Get SCM string parameter (SCM)
Synopsis
int scm_getstrpar( // Returns status
int [0,[; // Parameter type/number:
// 0 = Last placed named reference macro name
// 1 = Last placed named reference name
// 2 = Last placed net name
// 3 = Last placed bus tap name
// 4 = Last placed text string
// 5 = Symbol name pattern
// 6 = Next placed text string
// 7 = Last placed macro library
// 8 = Error bustap name
// 9 = Error bus name
// 10 = Next free name
// 11 = Current hierachical block reference name
// 12 = Last picked attribute name
// 13 = Last picked attribute value
// 14 = Autosave path name
& string; // Returns parameter value
);
Description
The
scm_getstrpar function is used to query
Schematic Editor string parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions scm_getdblpar,
scm_getintpar,
scm_setdblpar,
scm_setintpar,
scm_setstrpar.
scm_highlnet - Set SCM net highlight mode (SCM)
Synopsis
int scm_highlnet( // Returns status
int [-1,[; // Net tree number
int [0,1]; // Highlight mode
);
Description
The
scm_highlnet function sets the highlight mode of the net specified by the given net tree number. The highlight mode parameter designates whether the net should be highlighted (value 1) or not (value 0). The function returns nonzero if the highlight mode was successfully set, or zero if an invalid net tree number and/or highlight mode value has been specified.
See also
Function
scm_gethighlnet.
scm_pickanyelem - Pick any SCM figure list element (SCM)
Synopsis
int scm_pickanyelem( // Returns status
& index C_FIGURE; // Returns picked element
& index C_CONSEG; // Returns picked connection segment
& index C_BUSTAP; // Returns picked bus tap
& int; // Returns picked element type:
// 0 = figure list element
// 1 = connection segment
// 2 = bus tap
int; // Pick element type set ((CAP3 except 7)<<1 or'ed)
);
Description
The
scm_pickanyelem function activates a mouse interaction for selecting a figure list element from the specified pick element type set.
The picked element index is returned with either of the first three parameters. The returned parameter for the picked element type can be used to determine which of the picked element index variables is valid. The function returns zero if an element has been picked or nonzero if no element was found at the pick position.
See also
Functions scm_pickbustap,
scm_pickconseg,
scm_pickelem,
scm_setpickconseg.
scm_pickbustap - Pick SCM bus tap (SCM)
Synopsis
int scm_pickbustap( // Returns status
& index C_BUSTAP; // Returns selected bus tap element
);
Description
The
scm_pickbustap function activates an interactive bus tap pick request (with mouse). The picked bus tap element is returned with the function parameter. The function returns zero if a bus tap was picked or (-1) if no bus tap was found at the pick position.
See also
Functions scm_pickanyelem,
scm_pickconseg,
scm_pickelem,
scm_setpickconseg.
scm_pickconseg - Pick SCM connection segment (SCM)
Synopsis
int scm_pickconseg( // Returns status
& index C_CONSEG; // Returns picked connection segment
);
Description
The
scm_pickconseg function activates an interactive connection segment pick request (with mouse). The picked connection segment index is returned with the function parameter. The function returns zero if a connection segment has been picked or (-1) if no connection segment has been found at the pick position.
See also
Functions scm_pickanyelem,
scm_pickbustap,
scm_pickelem,
scm_setpickconseg.
scm_pickelem - Pick SCM figure list element (SCM)
Synopsis
int scm_pickelem( // Returns status
& index C_FIGURE; // Returns picked element
int [1,11]; // Pick element type (CAP3 except 2 and 7)
);
Description
The
scm_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.
See also
Functions scm_pickanyelem,
scm_pickbustap,
scm_pickconseg,
scm_setpickconseg.
scm_setdblpar - Set SCM double parameter (SCM)
Synopsis
int scm_setdblpar( // Returns status
int [0,[; // Parameter type/number:
// 0 = Plot scale factor
// 1 = Plotter HPGL speed
// 2 = Plotter pen width (STD2)
// 3 = Last group placement x coordinate (STD2)
// 4 = Last group placement y coordinate (STD2)
// 5 = Default symbol placement angle (STD3)
// 6 = Default text size (STD2)
// 7 = Default text placement angle (STD3)
double; // Parameter value
);
Description
The
scm_setdblpar function is used to set
Schematic Editor double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The
scm_getdblpar function can be used to query parameter values set with
scm_setdblpar.
See also
Functions scm_getdblpar,
scm_getintpar,
scm_getstrpar,
scm_setintpar,
scm_setstrpar.
scm_setintpar - Set SCM integer parameter (SCM)
Synopsis
int scm_setintpar( // Returns status
int [0,[; // Parameter type/number:
// 0 = Pick point display mode:
// 0 = No pick point display
// 1 = Pick point display
// 1 = Symbol/group reroute mode:
// Bit 0/1: Router mode
// 0 = Router off
// 1 = Symbol & group route
// 2 = Symbol route only
// 3 = Group route only
// Bit 2: quick shot route flag
// 2 = Symbol name move preservation mode:
// 0 = Reset symbol texts on symbol move
// 1 = Keep symbol text offsets
// 3 = Last placed reference type:
// Read-only parameter!
// 4 = Warning mode for connecting named nets:
// 0 = Deactivate warning message display
// 1 = Activate warning message display
// 5 = Elementpick modus:
// 0 = Best pick
// 1 = Pick element selection
// 6 = Generic printer color mode:
// 0 = B/W
// 1 = Color
// 7 = Warning output mode:
// Bit 0: Supress $ rename warnings
// Bit 1: Supress net join warnings
// Bit 2: Supress module port warnings
// Bit 4: Supress group symbol rename warnings
// Bit 5: Suppress variant mismatch warnings
// 8 = Name prompt mode:
// 0 = Autopattern symbol name
// 1 = Prompt for symbol name
// 9 = Info display flag:
// 0 = no automatic info display
// 1 = automatic info display
// 10 = Info display mode:
// 0 = no info display
// 1 = complete info display
// 2 = net related info only display
// 11 = Label rerouting mode:
// 0 = no label rerouting
// 1 = label rerotuing
// 12 = Sub symbol number offset
// 13 = Generic plot scale mode:
// 0 = fix scale factor
// 1 = autosize to page
// 14 = Generic color mode:
// 0 = black/white
// 1 = use current color settings
// 15 = HPGL fill mode:
// 0 = outline draw
// 1 = filled draw
// 2 = filled draw, draw wide lines/texts
// 16 = Area polygon edit mode:
// 0 = don't close polylines
// 1 = always close polylines
// 2 = polyline close prompt
// 17 = Group connection rerouting mode:
// 0 = no outside antenna deletion
// 1 = delete 1st outside antenna segment
// 2 = delete complete outside antenna
// 18 = Default user unit code:
// 0 = metric
// 1 = imperial
// 19 = Plot preview mode:
// 0 = none
// 1 = plotter pen width
// 20 = Autosave interval
// 21 = Automatic connection corners
// 22 = Angle lock toggle flag
// 23 = Default symbol mirroring
// 24 = Group move display mode:
// 0 = Moving Picture On
// 1 = Moving Picture All
// 2 = Instant Moving Picture
// 25 = Clipboard text placement request flag
// 26 = Signal router routing range
// 27 = Automatic bustap connection
// 28 = Signal router marker scan flag
// 29 = Segment move mode:
// 0 = Move without neighbours
// 1 = Move with neighbours
// 2 = Adjust neighbours
// |4 = End point follows segment
// 30 = Group angle lock mode:
// 0 = Keep group angle lock
// 1 = Automatically release group angle lock
// 31 = Default text mirror mode (STD14)
// 32 = Default text mode (CAP1|CAP7)
// 33 = Symbol $noplc plot visibility mode:
// Bit 0 = Set $noplc if plot visibility changes
// Bit 1 = Set plot visibility if $noplc changes
// 34 = Net plan list maximum length [ 3,200]
// 35 = Single corner edit flag
// 36 = Unroute line creation flag
// 37 = Polygon edit autocomplete flag
// 38 = Error highlight mode:
// 0 = Error highlight
// 1 = Error pattern/dash
// 39 = Flag - Automirror horizontal bus taps
// [ 40 = System parameter - no write access ]
// 41 = Connection split mode:
// 0 = No connection split
// 1 = Only at 2 pin symbols
// 2 = Connection split
// 42 = Symbol connection split mode:
// 0 = No connection split
// 1 = Only at 2 pin symbols
// 2 = Connection split
// [ 43 = System parameter - no write access ]
// [ 44 = System parameter - no write access ]
// 45 = Display class bits connection (SCM2)
// 46 = Display class bits bus (SCM2)
// 47 = Display class bits text (SCM2)
// 48 = Display class bits comment text (SCM2)
// 49 = Display class bits graphic area (SCM2)
// 50 = Display class bits graphic line (SCM2)
// 51 = Display class bits dotted line (SCM2)
// 52 = Display class bits connection area (SCM2)
// 53 = Display class bits net area (SCM2)
// 54 = Display class bits macro outline (SCM2)
// 55 = Display class bits tag (SCM2)
int; // Parameter value
);
Description
The
scm_setintpar function is used to set
Schematic Editor integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The
scm_getintpar function can be used to query parameter values set with
scm_setintpar.
See also
Functions scm_getdblpar,
scm_getintpar,
scm_getstrpar,
scm_setdblpar,
scm_setstrpar.
scm_setpartattrib - Set SCM part attribute value (SCM)
Synopsis
int scm_setpartattrib( // Returns status
string; // Part name
string; // Attribute name
string; // Attribute value
int; // Part processing flags:
// Bit 0: remove from screen
// Bit 1: screen redraw
// Bit 2: force assignment, disable variant
);
Description
The
scm_setpartattrib function assigns a value to the given attribute of the name-specified part. 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 part has not been found or (-4) if the attribute with the given name is not defined on the specified part.
See also
Function
scm_chkattrname.
scm_setpickconseg - Set SCM default connection pick element (SCM)
Synopsis
int scm_pickconseg( // Returns status
index C_CONSEG; // Connection segment
);
Description
The
scm_setpickconseg function selects the specified connection segment as default element for subsequent connection segment pick operations. The function returns zero if a connection segment has been selected or (-1) on error.
See also
Functions scm_pickanyelem,
scm_pickconseg,
scm_pickbustap,
scm_pickelem.
scm_setpickelem - SCM Defaultpickelement setzen (SCM)
Synopsis
int scm_setpickelem( // Returns status
index C_FIGURE; // Default pick element
);
Description
The
scm_setpickelem function sets a default element for subsequent
Schematic Editor pick operations. The function returns zero if done or nonzero on error.
See also
Function scm_pickelem.
scm_setstrpar - Set SCM string parameter (SCM)
Synopsis
int scm_setstrpar( // Returns status
int [0,[; // Parameter type/number:
// [ 0 = System parameter write-protected ]
// [ 1 = System parameter write-protected ]
// [ 2 = System parameter write-protected ]
// [ 3 = System parameter write-protected ]
// 4 = Last placed text string
// 5 = Symbol name pattern
// [ 6 = System parameter write-protected ]
// [ 7 = System parameter write-protected ]
// [ 8 = System parameter write-protected ]
// [ 9 = System parameter write-protected ]
// [ 10 = System parameter write-protected ]
// 11 = Current hierachical block reference name
// [ 12 = System parameter write-protected ]
// [ 13 = System parameter write-protected ]
// 14 = Autosave path name
string; // Parameter value
);
Description
The
scm_setstrpar function is used to set
Schematic Editor string system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The
scm_getstrpar function can be used to query parameter values set with
scm_setstrpar.
See also
Functions Functions scm_getdblpar,
scm_getintpar,
scm_getstrpar,
scm_setdblpar,
scm_setintpar.
scm_settagdata - Set SCM tag symbol pin destination (SCM)
Synopsis
int scm_settagdata( // Returns status
index C_FIGURE; // Tag element
string; // Tag pin name
string; // Tag reference name 1
string; // Tag reference name 2
);
Description
The
scm_settagdata function assigns the specified tag destination data (tag pin name and tag reference names) to the specified SCM tag element. The function returns zero if the assignment was carried out successfully or nonzero otherwise.
See also
Function cap_gettagdata.
scm_storecon - Place SCM connection (SCM)
Synopsis
int scm_storecon( // Returns status
);
Description
The
scm_storepath function generates a connection on the currently loaded SCM sheet. The connection polygon points are taken from the internal polygon point list previously stored with
bae_storepoint. The function returns zero if the connection has been successfully generated, (-1) on invalid environment, (-2) if no connection junction point marker is defined or (-3) on invalid connection polygon data (i.e., the internal polygon contains non-orthogonal segments and/or arcs).
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_storelabel - Place SCM label (SCM)
Synopsis
int scm_storelabel( // Returns status
string; // Label net name
int [0,2]; // Label type:
// 0 = Standard Label
// 1 = Module port
// 2 = Bus tap
double; // Label X coordinate (STD2)
double; // Label Y coordinate (STD2)
double; // Label rotation angle (STD3)
int [0,1]; // Label mirror mode (STD14)
);
Description
The
scm_storelabel function stores a label with the given placement parameters to the currently loaded SCM sheet element. The first label name character must not be a question mark since this character is reserved for module port recognition. The rotation angle is ignored when placing bus taps; bus taps must always be connected to bus connection segments, i.e., their placement coordinates must match a valid bus connection segment. The label library symbol name is set to the specified net name, unless no label symbol with the given net name is available in which case the label symbol named
standard is used). The
port and/or
bustap label symbols are used on default when placing module ports and/or bus taps. The function returns zero if the label has been successfully placed, (-1) on wrong environment, (-2) on missing and/or invalid parameters, (-3) if the label cannot be loaded, (-4) if the label data could not be copied to the current job file or (-5) if the placement data of a bus tap does not match a valid bus connection segment.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_storepart - Place SCM part or pin (SCM)
Synopsis
int scm_storepart( // Returns status
& string; // Reference name
string; // Library symbol name
double; // X coordinate (STD2)
double; // Y coordinate (STD2)
double; // Rotation angle (STD3)
int [0,7]; // Mirror mode and tag pin type
// (STD14|(CAP6<<1))
);
Description
The
scm_storepart function stores a part (or pin) with the given placement parameters to the currently loaded SCM sheet (or symbol/label) element. If an empty string is specified for the part name, then the part name is automatically generated and passed back to the caller via the corresponding parameter. The function returns zero if the part has been successfully placed, (-1) if the environment is invalid, (-2) if parameters are missing or invalid, (-3) if the parts cannot be loaded, (-4) if the part data could not be copied to the current job file, (-5) if the part is placed already or (-6) if automatic part name generation failed.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_storepoly - Place SCM internal polygon (SCM)
Synopsis
int scm_storepoly( // Returns status
int [0,5]; // Polygon type (CAP2)
);
Description
The
scm_storepoly function generates a polygon of the specified type on the currently loaded SCM 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.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating
C_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
scm_storetext - Place SCM text (SCM)
Synopsis
int scm_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 [0,1]; // Text mirror mode (STD14)
int [0,[; // Text mode/style (CAP1|CAP7)
);
Description
The
scm_storetext function generates a text on the currently loaded SCM element using the specified placement parameters. The function returns nonzero on wrong environment or missing/invalid parameters.
Warning
This function changes the current figure list and should be used carefully in
forall loops for iterating
C_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.
See also
Function
scm_attachtextpos.
SCM System Functions © 1985-2024 Oliver Bartels F+E • Updated: 20 November 2007, 12:29 [UTC]
|