Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions :: SCM System Functions |
Bartels User Language - Programmer's GuideC.3 SCM System Functions |
![]() |
This section describes (in alphabetical order) the SCM 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 CAP; i.e., they can be called from the Schematic Editor interpreter environment of the Bartels AutoEngineer:
string cap_blockname( // Returns block name );
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.
int cap_blocktopflag( // Returns block top level flag );
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.
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) );
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.
string cap_findblockname( // Returns block plan name string; // DDB file name string; // Block name );
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.
int cap_findlayconpart( // Returns status string; // Part name & index CL_CPART; // Returns layout connection list part index );
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.
Functions cap_findlayconpartpin, cap_findlaycontree, cap_getlaytreeidx, cap_layconload.
int cap_findlayconpartpin( // Returns status string; // Pin name index CL_CPART; // Net list part index & index CL_CPIN; // Returns net list part pin index );
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.
Functions cap_findlayconpart, cap_findlaycontree, cap_getlaytreeidx, cap_layconload.
int cap_findlaycontree( // Returns status string; // Net name & index CL_CNET; // Returns layout connection list net index );
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.
Functions cap_findlayconpartpin, cap_findlayconpart, cap_getlaytreeidx, cap_layconload.
string cap_getglobnetref( // Returns net name reference // (or empty string if not referenced) string; // Net/tree name );
The cap_getglobnetref function retrieves the global net name reference for the soecified net.
int cap_getlaytreeidx( // Returns status int; // Tree number & index CL_CNET; // Returns layout connection list net index );
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.
Functions cap_findlayconpartpin, cap_findlayconpart, cap_findlaycontree, cap_layconload.
int cap_getpartattrib( // Returns status string; // Part name string; // Attribute name & string; // Attribute value );
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.
int cap_getrulecnt( // Returns rule count or (-1) on error int; // Object class code int; // Object ident code (int or index type) );
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.
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.
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 );
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.
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.
index C_BUSTAP cap_getscbustapidx( // Bus tap index or (-1) if no bus tap scanned
);
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.
Functions cap_scanall, cap_scanfelem, cap_scanpool.
int cap getscclass( // Returns SCM element class: // 0 = Schematic // 1 = Symbol // 2 = Marker // 3 = Label // (-1) otherwise );
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.
Functions cap_scanall, cap_scanfelem, cap_scanpool.
index C_POOL cap_getscrefpidx // Returns pool index or (-1) if outside macro );
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.
Functions cap_scanall, cap_scanfelem, cap_scanpool.
int cap_getscstkcnt( // Returns scan stack depth );
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.
Functions cap_scanall, cap_scanfelem, cap_scanpool.
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 );
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.
Function scm_settagdata.
int cap_lastfigelem( // Returns status & index C_CONSEG; // Returns connection segment index );
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.
Function cap_lastfigelem.
int cap_lastfigelem( // Returns status & index C_FIGURE; // Returns figure list index );
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.
Function cap_lastconseg.
int cap_layconload( // Returns status string; // DDB file name ("?" for name query) string; // Layout net list name ("?" for name query) );
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.
Functions cap_findlayconpartpin, cap_findlayconpart, cap_findlaycontree, cap_getlaytreeidx.
void cap_maccoords( & double; // Macro X coordinate (STD2) & double; // Macro Y coordinate (STD2) & double; // Macro rotation angle (STD3) & int; // Macro mirror mode (STD14) );
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).
Functions cap_scanall, cap_scanfelem, cap_scanpool.
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) );
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.
Function cap_macrelease.
void cap_macrelease( // Returns status index C_POOL; // Macro pool element index );
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.
Function cap_macload.
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) );
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.
Functions cap_scanall, cap_scanfelem, cap_scanpool.
int cap_nrefsearch( // Returns status
string; // Reference name or empty string for newest named reference
& index C_FIGURE; // Returns figure list index
);
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.
string cap_partplan( // Part sheet name string; // DDB file name string; // Part name );
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.
index C_POOL cap_pointpoolidx(// Returns pool element );
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.
int cap_ruleconatt( // Returns nonzero on error index C_CONSEG; // Connection segment element index void; // Rule name string or rule name list array );
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 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 cap_ruleerr function can be used to determine the error reason after an unsuccessful call of the cap_ruleconatt function.
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.
int cap_rulecondet( // Returns nonzero on error index C_CONSEG; // Connection segment element index );
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.
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.
void cap_ruleerr( & int; // Error item code & string; // Error item string );
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.
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 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 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.
int cap_rulefigatt( // Returns nonzero on error index C_FIGURE; // Figure list element index void; // Rule name string or rule name list array );
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 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 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.
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.
int cap_rulefigdet( // Returns nonzero on error index C_FIGURE; // Figure list element index );
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.
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.
int cap_ruleplanatt( // Returns nonzero on error void; // Rule name string or rule name list array int [0,1]; // Flag - SCM global rule );
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 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 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.
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.
int cap_ruleplandet( // Returns nonzero on error int [0,1]; // Flag - SCM global rule );
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.
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.
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 );
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
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 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.
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 cap_rulequery call
hitcount = cap_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 = cap_rulequery(0,0,"subj","pred","-?s %d",strresult,6) ;sets
hitcount
to 2 andstring
variablestrresult
toB
.
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.
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 );
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 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 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.
Functions cap_maccoords, cap_scanfelem, cap_scanpool.
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 );
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.
Functions cap_maccoords, cap_scanall, cap_scanpool.
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 );
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.
Functions cap_maccoords, cap_scanall, cap_scanfelem.
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 );
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.
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:
int scm_askrefname( // Returns status & string; // Returns reference name );
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.
int scm_asktreename( // Returns status & string; // Returns tree/net name );
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.
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 );
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.
Function scm_storetext.
int scm_checkbustapplot( // Plot status index C_FIGURE; // Bus connection figure list index index C_BUSTAP; // Bus tap index );
The scm_checkbustapplot function returns 1 if plot output is disabled for the specified bus tap, or zero otherwise.
int scm_checkjunctplot( // Plot status double; // Junction point X position (STD2) double; // Junction point Y position (STD2) );
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.
int scm_chkattrname( // Returns non-zero if invalid attribute name string; // Attribute name );
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.
Function scm_setpartattrib.
int scm_conseggrpchg( // Returns status
index C_CONSEG; // Connection segment
int [0,6]; // New group selection status (STD13)
// |4 - Display group status message
);
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.
string scm_deflibname( // Returns default library name );
The scm_deflibname function returns the default SCM library name defined in the BAE setup file.
string scm_defloglname( // Returns default packager library name );
The scm_defloglname function returns the default packager layout library name defined in the BAE setup file.
Function con_getlogpart; utility program bsetup.
int scm_defsegbus( // Returns status & index C_CONSEG; // Connection segment );
The scm_defsegbus performs a bus definition on the given connection segment and all adjacent segments. The function returns nonzero on bus definition errors.
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.
int scm_delconseg( // Returns status & index C_CONSEG; // Connection segment );
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.
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.
int scm_delelem( // Returns status & index C_FIGURE; // Element );
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.
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.
Function scm_drawelem.
void scm_drawelem( index C_FIGURE; // Element int [0, 4]; // Drawing mode (STD19) );
The scm_drawelem function updates the display of the given figure list element using the specified drawing mode.
Function scm_delelem.
int scm_elemangchg( // Returns status & index C_FIGURE; // Element double; // New rotation angle (STD3) );
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.
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.
int scm_elemgrpchg( // Returns status
index C_FIGURE; // Element
int [0,6]; // New group selection status (STD13)
// |4 - Display group status message
);
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.
int scm_elemmirrchg( // Returns status & index C_FIGURE; // Element int [0,1]; // New mirror mode (STD14) );
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.
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.
int scm_elemposchg( // Returns status & index C_FIGURE; // Element double; // New X coordinate (STD2) double; // New Y coordinate (STD2) );
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.
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.
int scm_elemsizechg( // Returns status & index C_FIGURE; // Element double; // New size (STD2) );
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.
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.
int scm_findpartplc( // Placement status string; // Part name );
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.
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 );
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.
Functions scm_getintpar, scm_getstrpar, scm_setdblpar, scm_setintpar, scm_setstrpar.
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 );
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.
Function scm_getinputdata.
int scm_gethighlnet( // Returns status
int [-1,[; // Net tree number or -1 for highlight focus modus query
& int; // Highlight mode
);
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).
Function scm_highlnet.
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 );
The scm_gethpglparam function returns the Schematic Editor HP-GL plot parameters.
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) */ );
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.
Function scm_getgroupdata.
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 );
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.
Functions scm_getdblpar, scm_getstrpar, scm_setdblpar, scm_setintpar, scm_setstrpar.
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 );
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.
Functions scm_getdblpar, scm_getintpar, scm_setdblpar, scm_setintpar, scm_setstrpar.
int scm_highlnet( // Returns status int [-1,[; // Net tree number int [0,1]; // Highlight mode );
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.
Function scm_gethighlnet.
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) );
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.
Functions scm_pickbustap, scm_pickconseg, scm_pickelem, scm_setpickconseg.
int scm_pickbustap( // Returns status & index C_BUSTAP; // Returns selected bus tap element );
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.
Functions scm_pickanyelem, scm_pickconseg, scm_pickelem, scm_setpickconseg.
int scm_pickconseg( // Returns status & index C_CONSEG; // Returns picked connection segment );
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.
Functions scm_pickanyelem, scm_pickbustap, scm_pickelem, scm_setpickconseg.
int scm_pickelem( // Returns status
& index C_FIGURE; // Returns picked element
int [1,11]; // Pick element type (CAP3 except 2 and 7)
);
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.
Functions scm_pickanyelem, scm_pickbustap, scm_pickconseg, scm_setpickconseg.
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 );
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.
Functions scm_getdblpar, scm_getintpar, scm_getstrpar, scm_setintpar, scm_setstrpar.
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 );
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.
Functions scm_getdblpar, scm_getintpar, scm_getstrpar, scm_setdblpar, scm_setstrpar.
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 );
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.
Function scm_chkattrname.
int scm_pickconseg( // Returns status index C_CONSEG; // Connection segment );
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.
Functions scm_pickanyelem, scm_pickconseg, scm_pickbustap, scm_pickelem.
int scm_setpickelem( // Returns status index C_FIGURE; // Default pick element );
The scm_setpickelem function sets a default element for subsequent Schematic Editor pick operations. The function returns zero if done or nonzero on error.
Function scm_pickelem.
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 );
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.
Functions Functions scm_getdblpar, scm_getintpar, scm_getstrpar, scm_setdblpar, scm_setintpar.
int scm_settagdata( // Returns status index C_FIGURE; // Tag element string; // Tag pin name string; // Tag reference name 1 string; // Tag reference name 2 );
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.
Function cap_gettagdata.
int scm_storecon( // Returns status );
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).
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.
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) );
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 namedstandard
is used). Theport
and/orbustap
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.
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.
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)) );
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.
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.
int scm_storepoly( // Returns status int [0,5]; // Polygon type (CAP2) );
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.
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.
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)
);
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.
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.
Function scm_attachtextpos.
Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions :: SCM System Functions |
SCM System Functions
© 1985-2025 Oliver Bartels F+E