Welcome to the Bartels Group of Companies
Systemfunktionen - Deutsche Version System Functions - English Version
Bartels

Bartels System GmbH
Bartels
Bartels AutoEngineer
BAE Product Info
BAE Price List
BAE Downloads
BAE Documentation
BAE Installation Guide
BAE User Manual
BAE Libraries
User Language Programmer's Guide
Preface
1 Introduction
2 Language Description
3 Programming System
4 BAE User Language Programs
A Conventions and Definitions
B Index Variable Types
C System Functions
C.1 Function Reference
C.2 Standard System Functions
C.3 SCM System Functions
C.4 PCB Design System Functions
C.5 IC Design System Functions
BAE Update History
BAE Next Version Release Notes Preliminary
BAE V8.0 Release Notes
BAE V7.8 Release Notes
BAE V7.6 Release Notes
BAE V7.4 Release Notes
BAE V7.2 Release Notes
BAE V7.0 Release Notes
BAE V6.8 Release Notes
BAE V6.6 Release Notes
BAE V6.4 Release Notes
BAE V6.2 Release Notes
BAE V6.0 Release Notes
BAE V5.4 Release Notes
BAE V5.0 Release Notes
BAE V4.6 Release Notes
BAE V4.4 Release Notes
BAE V4.2 Release Notes
BAE V4.0 Release Notes
BAE V3.4 Release Notes
BAE Support
BAE Contributions
BAE Development and Service Companies
Electronics Development
Bartels Sport Service
Company Profile
Corporate Info
Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions
Bartels User Language - Programmer's Guide

Appendix C
System Functions

Bartels AutoEngineer® Dokumentation

This appendix describes the system functions included with the Bartels User Language, providing reference listings which are grouped according to the corresponding caller types. The system function descriptions are sorted in alphabetical order.

 

Contents

C.1Function Reference
C.1.1Standard System Functions (STD)
C.1.2Schematic Capture System Functions (CAP)
C.1.3Schematic Editor System Functions (SCM)
C.1.4Layout System Functions (LAY)
C.1.5Layout Editor System Functions (GED)
C.1.6Autorouter System Functions (AR)
C.1.7CAM Processor System Functions (CAM)
C.1.8CAM View System Functions (CV)
C.1.9IC Design System Functions (ICD)
C.1.10Chip Editor System Functions (CED)
C.2Standard System Functions
C.3SCM System Functions
C.3.1Schematic Data Access Functions
C.3.2Schematic Editor Functions
C.4PCB Design System Functions
C.4.1Layout Data Access Functions
C.4.2Layout Editor Functions
C.4.3Autorouter Functions
C.4.4CAM Processor Functions
C.4.5CAM View Functions
C.5IC Design System Functions
C.5.1IC Design Data Access Functions
C.5.2Chip Editor Functions

 

C.1 Function Reference

Each Bartels User Language system function is assigned to one of the caller types STD, CAP, LAY, SCM, GED, AR, CAM, CV, ICD or CED, respectively. This section lists the User Language system functions for each caller type.

Function Description Notations

Each detailed function description provided with this appendix indicates the function caller type and provides a formal function and/or parameter declaration. The function data type defines the data type of the corresponding function return value; void functions do not provide return values. The mode of operation of a function is explained in detail and/or illustrated by examples wherever necessary.

Parameter declarations can contain valid value range definitions. Such value range definitions consist of a lower and an upper value range boundary specification. Valid lower value range boundary specifications are:

[ Lvalue >= lower boundary L
] Lvalue > lower boundary L
] no lower boundary

Valid upper value range boundary specifications are:

U ]value >= upper boundary L
U [value > upper boundary L
[no upper boundary

The value range boundaries are separated by comma (,). The declaration

double ]0.0,[;

e.g., defines a parameter of type double, which must be greater than 0.0. The User Language Compiler knows about the parameter value ranges and issues error messages if parameter values are out of range.

A parameter declaration preceded with & indicates, that the corresponding parameter value is set and/or changed by the system function; the User Language Compiler will issue a warning message if a constant value or a calculation result is passed to such a parameter.

A parameter declaration preceded by * indicates that the corresponding parameter must reference a user function. The system function description contains the required user function declaration as well. When running the program, the system function will automatically activate the corresponding user function. The reference to the user function is usually optional; the keyword NULL must be used for the function reference parameter if no user function should be referenced. It is strongly recommended to take great care at the declaration of referenced user functions, since the User Language Compiler cannot recognize erroneous user function reference declarations (relating to required function data type, return value conventions, required parameters, etc.). In case of wrong function reference declarations the User Language Interpreter might show up with unpredictable results or fatal side effects at runtime.

A void system function parameter type indicates, that the corresponding parameter can be of any data type. A [] parameter type specification indicates, that the function expects optional parameters of any (void) type at this place.

 

C.1.1 Standard System Functions (STD)

The following User Language system functions are assigned to caller type STD; i.e., they can be called from each User Language Interpreter environment of the Bartels AutoEngineer (Schematic Editor, Layout Editor, Autorouter, CAM Processor, CAM View, IC Design and Chip Editor):

absAbsolute value of an integer
acosArc cosine
angclassClassify an angle value
arylengthGet array length
asinArc sine
askcoordInteractive X/Y coordinate value query
askdblInteractive double value query
askdistInteractive distance value query
askintInteractive integer value query
askstrInteractive string value query
atanArc tangent
atan2Arc tangent of the angle defined by a point
atofConvert string to floating point value
atoiConvert string to integer value
bae_askddbenameInteractive DDB element name query
bae_askddbfnameInteractive DDB file name query
bae_askdirnameInteractive directory name query
bae_askfilenameInteractive file name query
bae_askmenuInteractive BAE menu query
bae_asknameActivate BAE name selection dialog
bae_asksymnameInteractive BAE library element query
bae_callmenuBAE menu function call
bae_charsizeGet BAE text/character dimensions
bae_cleardistpolyClear internal BAE distance query polygon
bae_clearpointsClear internal BAE polygon buffer
bae_clriactqueueClear the BAE interaction queue
bae_crossarcarcDetermine cross point(s) of two arcs
bae_crosslinelineDetermine cross point of wide line segments
bae_crosslinepolyDetermine cross point of wide line with polygon
bae_crosssegarcDetermine cross point(s) of segment with arc
bae_crosssegsegDetermine cross point of segments/lines
bae_dashpolylineVectorize dashed BAE polygon
bae_deffuncprogDefine BAE function key
bae_defkeyprogDefine BAE standard key
bae_defmenuBAE standard menu definition start
bae_defmenuprogDefine BAE menu entry
bae_defmenuselSet BAE menu default selection
bae_defmenutextDefine BAE menu item text
bae_defselmenuBAE submenu definition start
bae_dialaddcontrolBAE dialog element definition
bae_dialadvcontrolAdd advanced BAE dialog element
bae_dialaskcallActivate BAE dialog with listbox element callback function
bae_dialaskparamsActivate BAE dialog
bae_dialbmpallocCreate BAE dialog bitmap
bae_dialboxbufloadRestore BAE dialog box data from buffer
bae_dialboxbufstoreStore BAE dialog box data to buffer
bae_dialboxpermActivate modeless BAE dialog
bae_dialclrClear BAE dialog elements
bae_dialgetdataGet BAE dialog element parameter
bae_dialgettextlenGet BAE dialog text length
bae_dialsetcurrentSet current BAE dialog box
bae_dialsetdataSet BAE dialog element parameter
bae_endmainmenuBAE main menu definition end
bae_endmenuBAE menu definition end
bae_fontcharcntGet BAE font character count
bae_fontnameGet BAE text font name
bae_getactmenuGet active BAE menu entry number
bae_getanglelockGet BAE angle lock flag
bae_getbackgridGet BAE display grid
bae_getcasstimeGet date/time of last project connection data update caused by Packager/Backannotation
bae_getclassbitfieldGet BAE DDB class processing key
bae_getcmdbufBAE command history query
bae_getcolorGet BAE color value
bae_getcoorddispGet BAE coordinate display mode
bae_getdblparGet BAE double parameter
bae_getfuncprogGet BAE function key definition
bae_getgridlockGet BAE grid lock flag
bae_getgridmodeGet BAE grid dependency mode
bae_getinpgridGet BAE input grid
bae_getintparGet BAE integer parameter
bae_getinvcolorGet BAE color inversion mode
bae_getkeyprogGet BAE standard key definition
bae_getmenubitfieldGet BAE menu function processing key
bae_getmenuitemBAE menu item query
bae_getmenuprogGet BAE menu entry definition
bae_getmenutextGet BAE menu text
bae_getmoduleidGet BAE module id
bae_getmsgGet BAE HighEnd message
bae_getpackdataGet last project Packager run data
bae_getpacktimeGet last project Packager run date/time
bae_getpolyrangeGet internal BAE polygon range
bae_getstrparGet BAE string parameter
bae_inittextscreenClear/initialize the BAE text screen
bae_inpointInput BAE point/coordinates with mouse
bae_inpointmenuInput BAE point/coordinates with mouse and right mouse button callback function
bae_languageGet BAE user interface language code
bae_loadcoltabLoad BAE color table
bae_loadelemLoad BAE element
bae_loadfontLoad BAE text font
bae_menuitemhelpDisplay BAE menu item help
bae_msgboxActivate BAE message popup
bae_msgboxverifyActivate BAE message popup with Yes/No verification
bae_msgboxverifyquitActivate BAE message popup with Yes/No/Quit verification
bae_msgprogressrepActivate/update BAE progress display
bae_msgprogresstermTerminate BAE progress display
bae_mtpsizeGet BAE popup display area dimensions
bae_nameaddAdd BAE name selection list element
bae_nameclrClear BAE name selection list
bae_namegetGet BAE name selection list element
bae_numstringCreate numeric string
bae_peekiactBAE interaction queue query
bae_plainmenutextBAE menu item text conversion
bae_planddbclassGet BAE element DDB class code
bae_planenameGet BAE element name
bae_planfnameGet BAE element file name
bae_plannotsavedGet BAE element not saved flag
bae_plansenameGet BAE destination element name
bae_plansfnameGet BAE destination element file name
bae_planwslxGet BAE element left workspace boundary
bae_planwslyGet BAE element lower workspace boundary
bae_planwsnxGet BAE element origin X coordinate
bae_planwsnyGet BAE element origin Y coordinate
bae_planwsuxGet BAE element right workspace boundary
bae_planwsuyGet BAE element upper workspace boundary
bae_popareachoiceDefine choice field area in active BAE popup menu
bae_popclipareaDefine clipping area in active BAE popup menu
bae_popclrtoolClear BAE toolbar popup area
bae_popcolbarDefine BAE popup menu color bar display
bae_popcolchoiceDefine BAE popup menu color bar selector
bae_popdrawpolyDisplay/draw polygon/graphic in active BAE popup menu
bae_popdrawtextDisplay/draw text in active BAE popup menu
bae_popmouseGet BAE popup/toolbar mouse position
bae_poprestoreRestore BAE popup menu area
bae_popsetareaActivate/select BAE popup menu/area
bae_popshowActivate BAE popup menu
bae_poptextDefine BAE popup menu text display
bae_poptextchoiceDefine BAE popup menu text selector
bae_postprocessRun BAE postprocess
bae_progdirGet BAE program directory path name
bae_prtdialogPrint string to BAE dialogue line
bae_querydistQuery BAE point to polygon distance
bae_readedittextBAE text input/display
bae_readtextBAE text input with popup menu
bae_redefmainmenuBAE main menu redefinition start
bae_redefmenuRedefine BAE menu item
bae_resetmenuprogReset BAE menu definitions
bae_sendmsgSend BAE HighEnd message
bae_setanglelockSet BAE angle lock fag
bae_setbackgridSet BAE display grid
bae_setclipboardStore text string to BAE clipboard
bae_setcolorSet BAE color value
bae_setcoorddispSet BAE coordinate display mode
bae_setdblparSet BAE double parameter
bae_setgridlockSet BAE grid lock flag
bae_setgridmodeSet BAE grid dependency mode
bae_setinpgridSet BAE input grid
bae_setintparSet BAE integer parameter
bae_setmoduleidSet BAE module id
bae_setmousetextSet BAE mouse click input text
bae_setplanfnameSet BAE project file name
bae_setpopdashSet BAE popup/toolbar polygon dash line parameters
bae_setstrparSet BAE string parameter
bae_settbsizeDefine/display BAE toolbar area
bae_storecmdbufStore BAE command to command history
bae_storedistpolyStore internal BAE distance query polygon
bae_storeelemStore BAE element
bae_storekeyiactStore BAE key-press interaction to queue
bae_storemenuiactStore BAE menu interaction to queue
bae_storemouseiactStore BAE mouse interaction to queue
bae_storepointStore point to internal BAE polygon
bae_storetextiactStore BAE text input interaction to queue
bae_swconfigGet BAE software configuration
bae_swversionGet BAE software version
bae_tbsizeGet BAE toolbar dimensions
bae_twsizeGet BAE text screen workspace size
bae_wsmouseGet BAE workspace mouse position
bae_wswinlxGet BAE workspace window left boundary
bae_wswinlyGet BAE workspace window lower boundary
bae_wswinuxGet BAE workspace window right boundary
bae_wswinuyGet BAE workspace window upper boundary
catextConcatenate file name extension
catextadvOptionally concatenate file name extension
ceilCeiling function
clockGet elapsed processor time
con_clearDelete internal logical net list
con_compileloglibCompile logical library definition
con_deflogpartDefine a logical library part entry
con_getddbpattribGet part/pin attribute from DDB file
con_getlogpartGet a logical library part definition
con_setddbpattribStore part/pin attribute to DDB file
con_storepartStore part to internal logical net list
con_storepinStore pin to internal logical net list
con_writeWrite internal logical net list to file
convstringConvert string
cosCosine
coshHyperbolic cosine
cvtangleConvert an angle value
cvtlengthConvert a length value
ddbcheckCheck DDB file/element availability
ddbclassidGet DDB class identifier
ddbclassscanScan DDB class elements
ddbcopyelemCopy DDB file element
ddbdelelemDelete DDB file element
ddbelemrefcountGet DDB file element reference count
ddbelemrefentryGet DDB file element reference entry
ddbgetelemcommentGet DDB file element comment
ddbgetlaypartpinGet DDB file layout part pin data
ddbrenameelemRename DDB file element
ddbupdtimeGet DDB file element update time
ddbsetelemcommentSet DDB file element comment
dirscanScan directory
existddbelemCheck DDB file element
exitTerminate a program immediately
expExponential function
fabsAbsolute value of a double
fcloseClose a file
fcloseallClose all files opened by the program
feofTest for end-of-file
fgetcRead next character from file
fgetsRead next line of text from file
filemodeGet file mode
filesizeGet file size
filetypeGet file type
floorFloor function
fmodFloating point remainder
fopenOpen a file
fprintfPrint to a file using format
fputcWrite a character to a file
fputsWrite a string to a file
frexpBreak double into fraction and exponent
fseterrmodeSet the file functions error handling mode
get_dateGet the current system date
get_timeGet the current system time
getchrGet a character from standard input
getcwdGet current working directory path name
getenvGet environment variable value
getextprogGet file type specific application
getstrGet a line of text from standard input
isalnumTest for alphanumeric character
isalphaTest for alphabetic character
iscntrlTest for control character
isdigitTest for numeric character
isgraphTest for visible character
islowerTest for lowercase alphabetic character
isprintTest for printing character
ispunctTest for punctuation character
isspaceTest for whitespace character
isupperTest for uppercase alphabetic character
isxdigitTest for hexadecimal numeric character
kbhitTest if key hit
kbstateShift/control/alt key state query
launchPass command to operating system without waiting for completion
ldexpMultiply by a power of 2
localtimeGet local processor date and time
logNatural logarithm; base e
log10Common logarithm; base ten
mkdirCreate directory
modfBreak double into integer and fractional
namestrcmpName string compare
numstrcmpNumeric string compare
perrorPrint error message
powRaise a double to a power
printfPrint to standard output using format
programidGet current program name
putchrWrite a character to standard output
putenvSet environment variable
putsWrite a string to standard output (append NL)
putstrWrite a string to standard output
quicksortSort index list
removeDelete a file or directory
renameChange the name of a file
rewindSeek to the beginning of a file
rulecompileCompile a rule definition
rulesourceGet rule definition source code
scanddbenamesScan DDB file element names
scandirfnamesScan directory file names
setprioSet BAE process priority
sinSine
sinhHyperbolic sine
sprintfPrint to string using format
sqlcmdSQL command execution
sqlerrSQL error status query
sqlinitSQL database initialization
sqrtSquare root
strcmpString compare
strcspnString prefix length not matching characters
strdelchrDelete characters from string
strextractExtract sub-string from another string
strextractfilepathExtract directory name from a file path name string
strgetconffilenameGet environment variable expanded configuration file name
strgetvarfilenameGet environment variable expanded file name string
strgetpurefilenameExtract file name from file path name string
strlenString length
strlistitemaddAdd string to string list
strlistitemchkSearch string in string list
strlowerConvert string to lowercase
strmatchTest for string pattern match
strnsetFill part or all of string with any character
strreverseReverse string
strscannextForward find characters in string
strscanpriorBackward find characters in string
strsetFill string with any character
strspnString prefix length matching characters
strupperConvert string to uppercase
syngetintparGet BNF/scanner integer parameter
synparsefileBNF/parser input file scan
synparseincfileBNF/parser include file scan
synparsestringBNF/Parser string scan
synscaneolnBNF/scanner end-of-line recognition
synscanigncaseBNF/scanner keyword case-sensitivity mode setting
synscanlineBNF/scanner input line number
synscanstringBNF/scanner input string
synsetintparSet BNF/scanner integer parameter
systemPass command to operating system and wait for completion
tanTangent
tanhHyperbolic tangent
tolowerConvert uppercase to lowercase character
toupperConvert lowercase to uppercase character
uliptypeGet User Language interpreter environment
ulipversionGet User Language interpreter version
ulproginfoGet User Language program info
ulsystemRun another User Language program
ulsystem_exitRun a User Language program after exiting current User Language program
vardeleteDelete global User Language variable
vargetGet global User Language variable value
varsetSet global User Language variable value
 

C.1.2 Schematic Capture System Functions (CAP)

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_blocknameGet SCM sheet block name
cap_blocktopflagGet SCM sheet block hierarchy level
cap_figboxtestCheck SCM element rectangle cross
cap_findblocknameFind SCM block circuit sheet with given block name
cap_findlayconpartGet layout connection list part index
cap_findlayconpartpinGet layout connection list pin index
cap_findlaycontreeGet layout connection list net name net index
cap_getglobnetrefGet global net name reference
cap_getlaytreeidxGet layout connection list net number net index
cap_getpartattribGet SCM part attribute value
cap_getrulecntGet rule count for specific SCM object
cap_getrulenameGet rule name from specific SCM object
cap_getscbustapidxGet currently scanned SCM bus tap
cap_getscclassGet currently scanned SCM class
cap_getscrefpidxGet currently scanned SCM library element
cap_getscstkcntGet SCM scan function stack depth
cap_gettagdataGet SCM tag symbol destination data
cap_lastconsegGet last modified SCM connection segment
cap_lastfigelemGet last modified SCM figure list element
cap_layconloadLoad layout net list
cap_maccoordsGet SCM (scanned) macro coordinates
cap_macloadLoad SCM macro element to memory
cap_macreleaseUnload/release SCM macro element from memory
cap_mactaglinkGet SCM (scanned) macro tag link data
cap_nrefsearchSearch named SCM reference
cap_partplanGet SCM part sheet name
cap_pointpoolidxGet SCM junction point pool element
cap_ruleconattAttach rule(s) to SCM connection segment
cap_rulecondetDetach rules from SCM connection segment
cap_ruleerrSCM rule system error code query
cap_rulefigattAttach rule(s) to SCM figure list element
cap_rulefigdetDetach rules from SCM figure list element
cap_ruleplanattAttach rule(s) to currently loaded SCM element
cap_ruleplandetDetach rules from currently loaded SCM element
cap_rulequeryPerform rule query on specific SCM object
cap_scanallScan all SCM figure list elements
cap_scanfelemScan SCM figure list element
cap_scanpoolScan SCM pool element
cap_vecttextVectorize SCM text
 

C.1.3 Schematic Editor System Functions (SCM)

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_askrefnameSCM reference name selection
scm_asktreenamSCM net name selection
scm_attachtextposAttach text position to SCM element
scm_checkbustapplotGet SCM bus tap plot status
scm_checkjunctplotGet SCM junction point plot status
scm_chkattrnameSCM attribute name validation
scm_conseggrpchgChange SCM connection segment group flag
scm_deflibnameSCM setup default library name
scm_defloglnameSCM setup default packager library name
scm_defsegbusSCM connection segment bus definition
scm_delconsegDelete SCM connection segment
scm_delelemDelete SCM figure list element
scm_drawelemRedraw SCM figure list element
scm_elemangchgChange SCM figure list element rotation angle
scm_elemgrpchgChange SCM figure list element group flag
scm_elemmirrchgChange SCM figure list element mirror mode
scm_elemposchgChange SCM figure list element position
scm_elemsizechgChange SCM figure list element size
scm_findpartplcLayout part placement status query (BAE HighEnd)
scm_getdblparGet SCM double parameter
scm_getgroupdataSCM group placement data query
scm_gethighlnetGet SCM net highlight mode
scm_gethpglparamSCM HP-GL plot parameter query
scm_getinputdataSCM input data query
scm_getintparGet SCM integer parameter
scm_getstrparGet SCM string parameter
scm_highlnetSet SCM net highlight mode
scm_pickanyelemPick any SCM figure list element
scm_pickbustapPick SCM bus tap
scm_pickconsegPick SCM connection segment
scm_pickelemPick SCM figure list element
scm_setdblparSet SCM double parameter
scm_setintparSet SCM integer parameter
scm_setpartattribSet SCM part attribute value
scm_setpickconsegSet SCM default connection pick element
scm_setpickelemSet SCM default pick element
scm_setstrparSet SCM string parameter
scm_settagdataSet SCM tag symbol pin destination
scm_storeconPlace SCM connection
scm_storelabelPlace SCM label
scm_storepartPlace SCM part
scm_storepolyPlace SCM internal polygon
scm_storetextPlace SCM text
 

C.1.4 Layout System Functions (LAY)

The following User Language system functions are assigned to caller type LAY; i.e., they can be called from the Layout Editor, the Autorouter and the CAM Processor interpreter environment of the Bartels AutoEngineer:

lay_defelemnameLayout setup default element name
lay_deflibnameLayout setup default library name
lay_defusrunitLayout setup default user units
lay_doclayindexLayout documentary layer display index
lay_doclaynameLayout setup documentary layer name
lay_doclaysideLayout setup documentary layer side mode
lay_doclaytextLayout setup documentary layer text mode
lay_figboxtestCheck layout element rectangle cross
lay_findconpartFind layout part index of a named part
lay_findconpartpinFind layout part pin index of a named part pin
lay_findcontreeFind layout net index of a named net
lay_getplanchkparamGet layout distance check parameters
lay_getpowplanetreeGet layout power plane tree number
lay_getpowpolystatLayout power layer polygon status query
lay_getrulecntGet rule count for specific layout object
lay_getrulenameGet rule name from specific layout object
lay_getscclassGet currently scanned layout class
lay_getscpartrpidxGet currently scanned layout part
lay_getscrefpidxGet currently scanned layout library element
lay_getscstkcntGet layout scan function stack depth
lay_getsctextdestGet scanned layout text line destination
lay_gettreeidxFind layout net index of a tree
lay_grpdisplayLayout setup group display layer
lay_lastfigelemGet last modified layout figure list element
lay_maccoordsGet layout (scanned) macro coordinates
lay_macloadLoad layout macro element to memory
lay_macreleaseUnload/release layout macro element from memory
lay_menulaylinecntGet the layer menu lines count
lay_menulaylinelayGet layer number of specified layer menu line
lay_menulaylinenameGet name of specified layer menu line
lay_nrefsearchSearch named layout reference
lay_planmidlaycntGet layout inside layer count
lay_plantoplayGet layout top layer
lay_pltmarklayLayout setup plot marker layer
lay_ruleerrLayout rule system error code query
lay_rulefigattAttach rule(s) to layout figure list element
lay_rulefigdetDetach rules from layout figure list element
lay_rulelaysattAttach rule(s) to layout layer stackup
lay_rulelaysdetDetach rules from layout layer stackup
lay_ruleplanattAttach rule(s) to currently loaded layout element
lay_ruleplandetDetach rules from currently loaded layout element
lay_rulequeryPerform rule query on specific layout object
lay_scanallScan all layout figure list elements
lay_scanfelemScan layout figure list element
lay_scanpoolScan layout pool element
lay_setfigcacheFill layout figure list access cache
lay_setplanchkparamSet layout distance check parameters
lay_toplaynameLayout setup top layer name
lay_vecttextVectorize layout text
 

C.1.5 Layout Editor System Functions (GED)

The following User Language system functions are assigned to caller type GED; i.e., they can be called from the Layout Editor interpreter environment of the Bartels AutoEngineer:

ged_asklayerGED layer selection
ged_askrefnameGED reference name selection
ged_asktreeidxGED net selection
ged_attachtextposAttach text position to layout element
ged_delelemDelete GED figure list element
ged_drawelemRedraw GED figure list element
ged_drcerrorhideSet/reset GED DRC error acceptance mode
ged_drcpathGED trace test placement design rule check
ged_drcpolyGED polygon test placement design rule check
ged_drcviaGED via test placement design rule check
ged_elemangchgChange GED figure list element rotation angle
ged_elemfixchgChange GED figure list element fixed flag
ged_elemgrpchgChange GED figure list element group flag
ged_elemlaychgChange GED figure list element layer
ged_elemmirrchgChange GED figure list element mirror mode
ged_elemposchgChange GED figure list element position
ged_elemsizechgChange GED figure list element size
ged_getautocorninsGet GED auto corner insertion input mode
ged_getdblparGet GED double parameter
ged_getdrcmarkmodeGet GED DRC error display mode
ged_getdrcstatusGet GED DRC completion status
ged_getgroupdataGED group placement data query
ged_gethighlnetGet GED net highlight mode/color
ged_getinputdataGED input data query
ged_getintparGet GED integer parameter
ged_getlaydefmodeGet GED default layer mode
ged_getlayerdefaultGet GED default layer
ged_getminconGet GED Mincon function type
ged_getpathwidthGet GED path standard widths
ged_getpickmodeGet GED element pick mode
ged_getpickpreflayGet GED pick preference layer
ged_getpowlayerrcntGet GED power layer error count
ged_getsegmovmodeGet GED trace segment move mode
ged_getstrparGet GED string parameter
ged_getviaoptmodeGet GED trace via optimization mode
ged_getwidedrawGet GED wide line display start width
ged_groupselectGED group selection
ged_highlnetSet GED net highlight mode/color
ged_layergrpchgSelect GED group by layer
ged_partaltmacroChange GED net list part package type
ged_partnamechgChange GED part name
ged_pickanyelemPick any GED figure list element
ged_pickelemPick GED figure list element
ged_setautocorninsSet GED auto corner insertion input mode
ged_setdblparSet GED double parameter
ged_setdrcmarkmodeSet GED DRC error display mode
ged_setintparSet GED integer parameter
ged_setlaydefmodeSet GED default layer mode
ged_setlayerdefaultSet GED default layer
ged_setminconSet GED Mincon function type
ged_setnetattribSet GED net attribute value
ged_setpathwidthSet GED path standard widths
ged_setpickelemSet GED default pick element
ged_setpickmodeSet GED element pick mode
ged_setpickpreflaySet GED pick preference layer
ged_setplantoplaySet GED layout top layer
ged_setsegmovmodeSet GED trace segment move mode
ged_setstrparSet GED string parameter
ged_setviaoptmodeSet GED trace via optimization mode
ged_setwidedrawSet GED wide line display start width
ged_storedrillPlace GED drill hole
ged_storepartPlace GED part or padstack
ged_storepathPlace GED internal polygon as path
ged_storepolyPlace GED internal polygon
ged_storetextPlace GED text
ged_storeurefPlace GED unnamed reference (via or pad)
 

C.1.6 Autorouter System Functions (AR)

The following User Language system functions are assigned to caller type AR; i.e., they can be called from the Autorouter interpreter environment of the Bartels AutoEngineer:

ar_asklayerAutorouter layer selection
ar_delelemDelete Autorouter figure list element
ar_drawelemRedraw Autorouter figure list element
ar_elemangchgChange Autorouter figure list element rotation angle
ar_elemfixchgChange Autorouter figure list element fixed flag
ar_elemmirrchgChange Autorouter figure list element layer
ar_elemposchgChange Autorouter figure list element mirror mode
ar_elemsizechgChange Autorouter figure list element position
ar_getdblparGet Autorouter double parameter
ar_getintparGet Autorouter integer parameter
ar_getminconChange Autorouter figure list element size
ar_getpickpreflayGet Autorouter Mincon function type
ar_getstrparGet Autorouter string parameter
ar_getwidedrawGet Autorouter pick preference layer
ar_highlnetGet Autorouter wide line display start width
ar_partnamechgSet Autorouter net highlight mode
ar_pickelemChange Autorouter net list part name
ar_setdblparSet Autorouter double parameter
ar_setintparSet Autorouter integer parameter
ar_setminconPick Autorouter figure list element with mouse
ar_setnetattribSet Autorouter Mincon function type
ar_setpickpreflaySet Autorouter net attribute value
ar_setplantoplaySet Autorouter pick preference layer
ar_setstrparSet Autorouter string parameter
ar_setwidedrawSet Autorouter wide line display start width
ar_storepartPlace Autorouter part or padstack
ar_storepathPlace Autorouter internal polygon as path
ar_storeurefPlace Autorouter unnamed reference (via or pad)
 

C.1.7 CAM Processor System Functions (CAM)

The following User Language system functions are assigned to caller type CAM; i.e., they can be called from the CAM Processor interpreter environment of the Bartels AutoEngineer:

cam_askplotlayerCAM plot layer selection
cam_getdblparGet CAM double parameter
cam_getdrlaccuracyCAM drill tool tolerance query
cam_getgenpltparamCAM general plot parameter query
cam_getgerberaptCAM Gerber aperture definition query
cam_getgerberparamCAM Gerber plot parameter query
cam_gethpglparamCAM HP-GL plot parameter query
cam_getintparGet CAM integer parameter
cam_getplotlaycodeCAM plot layer code query
cam_getpowpltparamCAM power layer plot parameter query
cam_getwidedrawCAM wide line display start width query
cam_plotgerberCAM Gerber photo plot output
cam_plothpglCAM HP-GL pen plot output
cam_setdblparSet CAM double parameter
cam_setdrlaccuracySet CAM drill tool tolerance
cam_setgenpltparamSet CAM general plot parameters
cam_setgerberaptSet CAM Gerber aperture definition
cam_setintparSet CAM integer parameter
cam_setplotlaycodeSet CAM plot layer code
cam_setpowpltparamSet CAM power layer plot parameters
cam_setwidedrawSet CAM wide line display start width
 

C.1.8 CAM View System Functions (CV)

The following User Language system functions are assigned to caller type CV; i.e., they can be called from the CAM View interpreter environment of the Bartels AutoEngineer:

cv_aptgetcolorGet CAM View aperture color
cv_aptsetcolorSet CAM View aperture color
cv_deldatasetDelete CAM View data set
cv_getdblparGet CAM View double parameter
cv_getintparGet CAM View integer parameter
cv_movedatasetMove CAM View data set
cv_setdblparSet CAM View double parameter
cv_setintparSet CAM View integer parameter
 

C.1.9 IC Design System Functions (ICD)

The following User Language system functions are assigned to caller type ICD; i.e., they can be called from the Chip Editor interpreter environment of the Bartels AutoEngineer:

icd_altpinlayIC Design setup alternate pin layer
icd_cellconlayIC Design setup intern. cell connection layer
icd_cellscanIC Design setup DRC on cell level mode
icd_cellshrIC Design setup cell keepout area shrink
icd_ciflaynameIC Design setup CIF output layer name
icd_cstdsizIC Design setup standard cell height
icd_defelemnameIC Design setup default element name
icd_deflibnameIC Design setup default library name
icd_drcarcIC Design setup DRC arc mode
icd_drcgridIC Design setup DRC grid
icd_drclaymodeIC Design setup layer DRC mode
icd_drcmaxparIC Design setup DRC parallel check length
icd_drcminwidthIC Design setup DRC layer minimal dimensions
icd_drcrectIC Design setup DRC orthogonal mode
icd_ecnlaymodeIC Design setup layer connectivity check
icd_findconpartFind IC Design part index of a named part
icd_findconpartpinFind IC Design part pin index of a named part pin
icd_findcontreeFind IC Design net index of a named net
icd_getrulecntGet rule count for specific object
icd_getrulenameGet rule name from specific object
icd_gettreeidxFind IC Design net index of a tree
icd_grpdisplayIC Design setup group display layer
icd_lastfigelemGet last modified IC Design figure list element
icd_maccoordsGet IC Design (scanned) macro coordinates
icd_nrefsearchSearch named IC Design reference
icd_outlinelayIC Design setup cell outline layer
icd_pindistIC Design setup pin keepout distance
icd_plcxgridIC Design setup placement grid
icd_plcxoffsetIC Design setup placement offset
icd_routcellcntIC Design setup number of power supply cells
icd_routcellnameIC Design setup name of power supply cell
icd_ruleerrRule System error code query
icd_rulefigattAttach rule(s) to figure list element
icd_rulefigdetDetach rules from figure list element
icd_ruleplanattAttach rule(s) to currently loaded element
icd_ruleplandetDetach rules from currently loaded element
icd_rulequeryPerform rule query on specific object
icd_scanallScan all IC Design figure list elements
icd_scanfelemScan IC Design figure list element
icd_scanpoolScan IC Design pool element
icd_stdlaynameIC Design setup standard layer name
icd_stdpinlayIC Design setup standard pin layer
icd_vecttextVectorize IC Design text
 

C.1.10 Chip Editor System Functions (CED)

The following User Language system functions are assigned to caller type CED; i.e., they can be called from the Chip Editor interpreter environment of the Bartels AutoEngineer:

ced_asklayerCED layer selection
ced_delelemDelete CED figure list element
ced_drawelemRedraw CED figure list element
ced_elemangchgChange CED figure list element rotation angle
ced_elemfixchgChange CED figure list element fixed flag
ced_elemgrpchgChange CED figure list element group flag
ced_elemlaychgChange CED figure list element layer
ced_elemmirrchgChange CED figure list element mirror mode
ced_elemposchgChange CED figure list element position
ced_elemsizechgChange CED figure list element size
ced_getlaydispmodeGet CED layer display mode
ced_getminconGet CED Mincon function type
ced_getpathwidthGet CED path standard widths
ced_getpickpreflayGet CED pick preference layer
ced_getwidedrawGet CED wide line display start width
ced_groupselectCED group selection
ced_highlnetSet CED net highlight mode
ced_layergrpchgSelect CED group by layer
ced_partaltmacroChange CED net list part cell type
ced_partnamechgChange CED net list part name
ced_pickelemPick CED figure list element
ced_setlaydispmodeSet CED layer display mode
ced_setminconSet CED Mincon function type
ced_setpathwidthSet CED path standard widths
ced_setpickpreflaySet CED pick preference layer
ced_setwidedrawSet CED wide line display start width
ced_storepartPlace CED part or pin
ced_storepathPlace CED internal polygon as path
ced_storepolyPlace CED internal polygon
ced_storetextPlace CED text
ced_storeurefPlace CED unnamed reference (via or subpart)
 

C.2 Standard System Functions

This section describes (in alphabetical order) the standard system functions of the Bartels User Language. See Appendix C.1 for function description notations.


abs - Absolute value of an integer (STD)

Synopsis
int abs(                      // Returns result value
      int;                    // Input integer value
      );
Description
The abs function calculates and returns the absolute value of the given integer value.

acos - Arc cosine (STD)

Synopsis
double acos(                  // Returns result value (STD3)
      double [-1.0,1.0];      // Input cosine value
      );
Description
The acos function calculates and returns the arc cosine value of the given double value. The resulting angle value is in radians.

angclass - Classify an angle value (STD)

Synopsis
int angclass(                 // Returns angle class code
      double;                 // Input angle value (STD3)
      );
Description
The angclass function determines and returns a class code for the given angle value. Possible return values are 0 for 0 degree angle, 1 for 90 degree angle, 2 for 180 degree angle, 3 for 270 degree angle or (-1) for other angle values. The input angle value must be in radians.

arylength - Get array length (STD)

Synopsis
int arylength(                // Returns array element count
      void;                   // Any input value
      );
Description
The arylength function returns the array element count for the given (array) input value.

asin - Arc sine (STD)

Synopsis
double asin(                  // Returns result value (STD3)
      double [-1.0,1.0];      // Input sine value
      );
Description
The asin function calculates and returns the arc sine value of the given double value. The resulting angle value is in radians.

askcoord - Interactive X/Y coordinate value query (STD)

Synopsis
int askcoord(                 // Returns status
      & double;               // Returns X coordinate value (STD2)
      & double;               // Returns Y coordinate value (STD2)
      int [0,1];              // Input mode:
                              //    0 = Coordinates relative to last position
                              //    1 = Coordinates absolute
      );
Description
The askcoord function activates a dialog X and Y coordinate value input. The input mode specifies whether absolute (Jump absolute) or relative (Jump relative) coordinates are to be queried. The user input is returned with the first two function parameters. For absolute coordinate queries, these parameters are also input parameters for preset coordinate values. The function returns zero if the query was successful or nonzero if the query was aborted.

askdbl - Interactive double value query (STD)

Synopsis
int askdbl(                   // Returns status
      & double;               // Returns double value
      string;                 // Prompt string
      int;                    // Maximum input string length
      );
Description
The askdbl function asks the user for a double value, indicating the required interaction with the given prompt string. The user input double value is returned with the first parameter. The function return value is nonzero, if an invalid input value has been specified.

askdist - Interactive distance value query (STD)

Synopsis
int askdist(                  // Returns status
                              //    -1 = Eingabe ungültig/abgebrochen
                              //     0 = Valid distance input value entered
                              //     1 = Valid distance input value entered,
                              //          corner button pressed
      & double;               // Returns distance value
      string;                 // Prompt string
      int [0,15];             // Input control:
                              //    1 = Negative input allowed
                              //    2 = Circular input allowed
                              //    4 = String item prompt message
                              //    8 = Round corner button
      );
Description
The askdist function asks the user for a distance value, indicating the required interaction with the given prompt string. The third parameter determines the type of valid inputs. The user input value is interpreted in default user units, and is returned with the first parameter. The function returns zero for valid distance value inputs, 1 for valid distance value inputs with corner button pressed, or (-1) for invalid inputs or if the input function was aborted.

askint - Interactive integer value query (STD)

Synopsis
int askint(                   // Returns status
      & int;                  // Returns integer value
      string;                 // Prompt string
      int;                    // Maximum input number length
      );
Description
The askint function asks the user for an integer value, indicating the required interaction with the given prompt string. The user input integer value is returned with the first parameter. The function returns nonzero if an invalid input value has been specified.

askstr - Interactive string value query (STD)

Synopsis
string askstr(                // Returns string
      string;                 // Prompt string
      int;                    // Maximum input string length
      );
Description
The askstr function asks the user for a string value, indicating the required interaction with the given prompt string. The user input string value is passed with the function return value.

atan - Arc tangent (STD)

Synopsis
double atan(                  // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The atan function calculates and returns the arc tangent value of the given angle value. The input angle value must be in radians.

atan2 - Arc tangent of the angle defined by a point (STD)

Synopsis
double atan2(                 // Returns result value (STD3)
      double;                 // Input point Y coordinate
      double;                 // Input point X coordinate
      );
Description
The atan2 function calculates and returns the arc tangent value of the angle defined by the given input point coordinates (and the origin point). The resulting angle value is in radians.

atof - Convert string to floating point value (STD)

Synopsis
double atof(                  // Returns floating point value
      string;                 // Input string
      );
Description
The atof function converts and returns the double value represented by the given string value. The result is undefined if the double value cannot be represented.

atoi - Convert string to integer value (STD)

Synopsis
int atoi(                     // Returns integer value
      string;                 // Input string
      );
Description
The atoi function converts and returns the integer value represented by the given string value. The result is undefined if the integer value cannot be represented.

bae_askddbename - Interactive DDB element name query (STD)

Synopsis
int bae_askddbename(          // Returns status
      & string;               // Returns element name
      string;                 // DDB file name
      int ]0,[;               // DDB element class (STD1)
      string;                 // Prompt string
                              //    empty string: Standard file dialog
                              //    ! prefix: Save file dialog
                              //    otherwise: Load file dialog
      );
Description
The bae_askddbename function allows the user to select a DDB element name by either keyboard input or mouse-selection in a request popup window showing the list of available elements. If the prompt string is an empty string the function uses the standard prompt for DDB element name queries. Any name passed with the first parameter is used as default element name selection. I.e., an empty string must be passed to the first parameter if no default element name is required and/or allowed. The function returns nonzero if no valid element name was selected or zero otherwise.

bae_askddbfname - Interactive DDB file name query (STD)

Synopsis
int bae_askddbfname(          // Returns status
      & string;               // Returns file name
      int [0,1];              // Existence check
      int [0,3];              // File name dialog mode (bit flags):
                              //    1 = Check if file exists
                              //    2 = specified file name is default
      string;                 // Prompt string
                              //    empty string: Standard file dialog
                              //    ! prefix: Save file dialog
                              //    otherwise: Load file dialog
      );
Description
The bae_askddbfname function allows the user to select a DDB file name by either keyboard input or mouse-selection in a request popup window showing the list of available DDB files. The standard BAE DDB file name prompt is used if an empty prompt string is specified. A file save dialog is activated instead of a file open dialog if the first character of the file name prompt string is an exclamation mark (!), i.e., the exclamation mark is faded out and the confirmation button of the Windows file name dialog changes from Open to Save. The function returns nonzero if no valid file name was selected and/or existence check is nonzero and the file doesn't exist or zero otherwise.

bae_askdirname - Interactive directory name query (STD)

Synopsis
int bae_askdirname(           // Returns status
      & string;               // Returns directory name
      string;                 // Directory name for scan start
      string;                 // Prompt string
      );
Description
The bae_askdirname function allows the user to select a directory name by either keyboard input or mouse-selection in a request popup window showing the list of available directories. The directory name for scan start specifies the top level directory for the popup window directory selection display. If the prompt string is an empty string the function uses the standard prompt for directory name queries. The function returns nonzero if no valid directory name was selected or zero otherwise.

bae_askfilename - Interactive file name query (STD)

Synopsis
int bae_askfilename(          // Returns status
      & string;               // Returns file name
      string;                 // File name extension string
      string;                 // Prompt string
                              //    empty string: Standard file dialog
                              //    ! prefix: Save file dialog
                              //    otherwise: Load file dialog
      );
Description
The bae_askfilename function allows the user to select a file name by either keyboard input or mouse-selection in a popup window showing the list of available files. The file name extension string can be used to set a file name extension filter. On empty string input, all files are scanned/displayed. On extension specification (e.g., .ddb, .dat, .txt, ., .*, etc.), only those files matching the extension are scanned and/or displayed. The - tag works for file name exclusion. On - input all files matching BAE system or data file extensions (.ass, .con, .ddb, .def, .exe, .fre, .ulc and .usf, respectively) are faded-out from display (this feature can be used for output/plot file queries where system/library/project files must not be selected). The standard BAE file name prompt is used if an empty prompt string is specified. A file save dialog is activated instead of a file open dialog if the first character of the file name prompt string is an exclamation mark (!), i.e., the exclamation mark is faded out and the confirmation button of the Windows file name dialog changes from Open to Save. The function returns nonzero if no valid file name was selected or zero otherwise.

bae_askmenu - Interactive BAE menu query (STD)

Synopsis
int bae_askmenu(              // Returns selected menu item index (0..49),
                              //  or (-1) on menu selection abort
      int [1,50];             // Menu item count
      string;                 // First menu item string
      []                      // Subsequent menu item strings
      );
Description
The bae_askmenu function activates a user-specific menu with up to 48 mouse-selectable menu items. The function returns the number of the selected menu item or (-1) if the menu selection was aborted. Menu item numbering starts at 0.
See also
Function bae_defmenusel.

bae_askname - Activate BAE name selection dialog (STD)

Synopsis
int bae_askname(              // Status
      & string;               // Returns selected name
      string;                 // Prompt string (or empty string)
      int;                    // Maximum input string length
      );
Description
The bae_askname function activates a dialog for selecting a name from the name list which is currently defined with the bae_nameadd function. The second parameter specifies a non-standard input prompt. The system uses a predefined standard prompt if an empty string is passed as prompt string. The third parameter sets the maximum user input string length. The selected name is returned through the first parameter. The function returns zero if a name was selected or nonzero if the function was aborted without valid name selection.
See also
Functions bae_nameadd, bae_nameclr, bae_nameget.

bae_asksymname - Interactive BAE library element query (STD)

Synopsis
int bae_asksymname(           // Returns status
      & string;               // Returns library element name
      & string;               // Returns DDB library file name
      int ]0,[;               // Database class (STD1)
      string;                 // Library file directory
      string;                 // Default library path name
      string;                 // Default symbol/element name
      );
Description
The bae_asksymname function activates a dialog for selecting a library element of the specified database class from a selectable library file. The function returns zero if a library element was successfully selected or non-zero if the user aborted the dialog without valid element selection.

bae_callmenu - BAE menu function call (STD)

Synopsis
int bae_callmenu(             // Returns status
      int [0,9999];           // Menu function number (STD4)
      );
Description
The bae_callmenu function calls the specified BAE menu function passing the interactions defined with the bae_store*iact functions. The function returns nonzero on menu function errors or invalid menu function numbers.

bae_charsize - Get BAE text/character dimensions (STD)

Synopsis
void bae_charsize(
      & double;               // Returns character width (pixels)
      & double;               // Returns character height (pixels)
      );
Description
The bae_charsize function determines the current BAE character dimensions and returns the corresponding pixel values with its parameters.

bae_cleardistpoly - Clear internal BAE distance query polygon (STD)

Synopsis
void bae_cleardistpoly(
      );
Description
The bae_cleardistpoly function deletes the internal distance query polygon created with the bae_storedistpoly function.
See also
Functions bae_storedistpoly.

bae_clearpoints - Clear internal BAE polygon buffer (STD)

Synopsis
void bae_clearpoints(
      );
Description
The bae_clearpoints function deletes the internally stored polygon point list. This function should be called before the first bae_storepoint call to delete previously stored points.
See also
Functions bae_getpolyrange, bae_storedistpoly, bae_storepoint.

bae_clriactqueue - Clear the BAE interaction queue (STD)

Synopsis
void bae_clriactqueue(
      );
Description
The bae_clriactqueue function deletes all interactions stored in the interaction queue. The interaction queue is used for passing interactions to the BAE menu functions activated through bae_callmenu.

bae_crossarcarc - Determine cross point(s) of two arcs (STD)

Synopsis
int bae_crossarcarc(          // Crosspoint count
      double;                 // Arc 1 start point X coordinate (STD2)
      double;                 // Arc 1 start point Y coordinate (STD2)
      double;                 // Arc 1 center point X coordinate (STD2)
      double;                 // Arc 1 center point Y coordinate (STD2)
      int [1,2];              // Arc 1 center point type code (STD15)
      double;                 // Arc 1 end point X coordinate (STD2)
      double;                 // Arc 1 end point Y coordinate (STD2)
      double;                 // Arc 2 start point X coordinate (STD2)
      double;                 // Arc 2 start point Y coordinate (STD2)
      double;                 // Arc 2 center point X coordinate (STD2)
      double;                 // Arc 2 center point Y coordinate (STD2)
      int [1,2];              // Arc 2 center point type code (STD15)
      double;                 // Arc 2 end point X coordinate (STD2)
      double;                 // Arc 2 end point Y coordinate (STD2)
      & double;               // Crosspoint 1 X coordinate (STD2)
      & double;               // Crosspoint 1 Y coordinate (STD2)
      & double;               // Crosspoint 2 X coordinate (STD2)
      & double;               // Crosspoint 2 Y coordinate (STD2)
      );
Description
The bae_crossarcarc function determines the crossing points for the specified arcs. The function returns the number of crosspoints (0, 1, or 2). The coordinates of existing crosspoints are also returned through the crosspoint functions parameters.
See also
Functions bae_crosslineline, bae_crosslinepoly, bae_crosssegarc, bae_crosssegseg.

bae_crosslineline - Determine cross point of wide line segments (STD)

Synopsis
int bae_crosslineline(        // Crossing flag
      double;                 // Line 1 start point X coordinate (STD2)
      double;                 // Line 1 start point Y coordinate (STD2)
      double;                 // Line 1 end point X coordinate (STD2)
      double;                 // Line 1 end point Y coordinate (STD2)
      double ]0.0,[;          // Line 1 width (STD2)
      double;                 // Line 2 start point X coordinate (STD2)
      double;                 // Line 2 start point Y coordinate (STD2)
      double;                 // Line 2 end point X coordinate (STD2)
      double;                 // Line 2 end point Y coordinate (STD2)
      double ]0.0,[;          // Line 2 width (STD2)
      );
Description
The bae_crosslineline function checks whether the specified wide line segments are crossing each other. The function returns 1 if the segments are crossing each other or zero otherwise.
See also
Functions bae_crossarcarc, bae_crosslinepoly, bae_crosssegarc, bae_crosssegseg.

bae_crosslinepoly - Determine cross point of wide line with polygon (STD)

Synopsis
int bae_crosslinepoly(        // Crossing flag
      double;                 // Line start point X coordinate (STD2)
      double;                 // Line start point Y coordinate (STD2)
      double;                 // Line end point X coordinate (STD2)
      double;                 // Line end point Y coordinate (STD2)
      double ]0.0,[;          // Line width (STD2)
      );
Description
The bae_crosslinepoly function checks whether the specified wide line segment crosses the temporary polygon created with bae_storepoint. The function returns 1 if the segment crosses the polygon or zero otherwise.
See also
Functions bae_crossarcarc, bae_crosslineline, bae_crosssegarc, bae_crosssegseg, bae_storepoint.

bae_crosssegarc - Determine cross point(s) of segment with arc (STD)

Synopsis
int bae_crosssegarc(          // Crosspoint count
      double;                 // Segment start point X coordinate (STD2)
      double;                 // Segment start point Y coordinate (STD2)
      double;                 // Segment end point X coordinate (STD2)
      double;                 // Segment end point Y coordinate (STD2)
      double;                 // Arc start point X coordinate (STD2)
      double;                 // Arc start point Y coordinate (STD2)
      double;                 // Arc center point X coordinate (STD2)
      double;                 // Arc center point Y coordinate (STD2)
      int [1,2];              // Arc center point type code (STD15)
      double;                 // Arc end point X coordinate (STD2)
      double;                 // Arc end point Y coordinate (STD2)
      int [0,1];              // Crosspoint priority flag
      & double;               // Crosspoint 1 X coordinate (STD2)
      & double;               // Crosspoint 1 Y coordinate (STD2)
      & double;               // Crosspoint 2 X coordinate (STD2)
      & double;               // Crosspoint 2 Y coordinate (STD2)
      );
Description
The bae_crosssegarc function determines the crossing points for the specified segment and arc. The function returns the number of crosspoints (0, 1, or 2). The coordinates of existing crosspoints are also returned through the crosspoint functions parameters.
See also
Functions bae_crossarcarc, bae_crosslineline, bae_crosslinepoly, bae_crosssegseg.

bae_crosssegseg - Determine cross point of segments/lines (STD)

Synopsis
int bae_crosssegseg(          // Crossing flag
      int [0,1];              // Infinite line comparison flag
      double;                 // Line 1 start point X coordinate (STD2)
      double;                 // Line 1 start point Y coordinate (STD2)
      double;                 // Line 1 end point X coordinate (STD2)
      double;                 // Line 1 end point Y coordinate (STD2)
      double;                 // Line 2 start point X coordinate (STD2)
      double;                 // Line 2 start point Y coordinate (STD2)
      double;                 // Line 2 end point X coordinate (STD2)
      double;                 // Line 2 end point Y coordinate (STD2)
      & double;               // Crosspoint X coordinate (STD2)
      & double;               // Crosspoint Y coordinate (STD2)
      );
Description
The bae_crosssegseg function checks whether the specified segments and/or lines are crossing each other. The first function parameter specifies whether a segment comparison or a infinite line comparison should be carried out. The function returns 1 if a crosspoint was found or zero otherwise. The crosspoint coordinates are returned through the last two function parameters if a crosspoint was found.
See also
Functions bae_crossarcarc, bae_crosslineline, bae_crosslinepoly, bae_crosssegarc.

bae_dashpolyline - Vectorize dashed BAE polygon (STD)

Synopsis
int bae_dashpolyline(         // Returns status
      int;                    // Polygon dash mode:
                              //    0 = straight line (no dash)
                              //    1 = dashed line
                              //    2 = dotted line
                              //    3 = dashed/dotted line
      double ]0.0,[;          // Polygon dash base length (STD2)
      double ]-0.5,0.5[;      // Polygon dash relative spacing
      * int;                  // Polygon line scan function
      * int;                  // Polygon arc scan function
      );
Description
The bae_dashpolyline function vectorizes the polygon previously stored with bae_storepoint using the specified dash parameters. The polygon line and arc scan functions are automatically called for each polygon line and/or arc, respectively. The function returns zero if the vectorization was successful, or nonzero on error or if the scan was aborted.
Polygon line scan function
int polylinescanfuncname(
      double xs,              // Line start point X coordinate (STD2)
      double ys,              // Line start point Y coordinate (STD2)
      double xe,              // Line end point X coordinate (STD2)
      double ye               // Line end point Y coordinate (STD2)
      )
{
      // Polygon line scan function statements
      :
      return(errstat);
}

The return value of the polygon line scan function should be zero if the scan was ok or nonzero on error or if the scan should be aborted.

Polygon arc scan function
int polylinescanfuncname(
      double xs,              // Arc start point X coordinate (STD2)
      double ys,              // Arc start point Y coordinate (STD2)
      double xe,              // Arc end point X coordinate (STD2)
      double ye               // Arc end point Y coordinate (STD2)
      double xc,              // Arc center point X coordinate (STD2)
      double yc               // Arc center point Y coordinate (STD2)
      int cwflag;             // Arc clockwise flag:
                              //       0 = arc counter-clockwise
                              //    else = arc clockwise
      )
{
      // Polygon arc scan function statements
      :
      return(errstat);
}

The return value of the polygon arc scan function should be zero if the scan was ok or nonzero on error or if the scan should be aborted.

See also
Functions bae_clearpoints, bae_storepoint.

bae_deffuncprog - Define BAE function key (STD)

Synopsis
int bae_deffuncprog(          // Returns status
      int [1,128];            // Function key number
      string;                 // User Language program name or
                              //  # followed by menu item (STD4)
      );
Description
The bae_deffuncprog function assigns the given User Language program (or BAE menu function) to the given function key. An empty string program name specification can be used to reset the current assignment. The function returns zero if done or nonzero on error (i.e., invalid parameters or reset request for undefined key bindings).
See also
Functions bae_getfuncprog, bae_resetmenuprog.

bae_defkeyprog - Define BAE standard key (STD)

Synopsis
int bae_defkeyprog(           // Returns status
      int;                    // Key character
      string;                 // User Language program name or
                              //  # followed by menu item (STD4)
      );
Description
The bae_defkeyprog function assigns the specified User Language program (or BAE menu function) to the given standard key. An empty string program name specification can be used to reset the current assignment. The function returns zero if done, or nonzero on error (i.e., invalid parameters or reset request for undefined key bindings).
See also
Functions bae_getkeyprog, bae_resetmenuprog.

bae_defmenu - BAE menu definition start (STD)

Synopsis
int bae_defmenu(              // Returns status
      int [0,999];            // Menu code number
      int [0,999];            // Menu area code number:
                              //    1   = main menu area
                              //    101 = first submenu area
                              //    102 = second submenu area
                              //    :   = : submenu area
      );
Description
The bae_defmenu function starts the definition of a standard menu in the currently active BAE module. The function returns (-1) on error or zero otherwise. After calling bae_defmenu, the bae_defmenutext function should be applied for defining the menu entries. The menu definition initiated with bae_defmenu must be terminated by a call to the bae_endmenu function. The bae_resetmenuprog function can be used to reset all menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_defmenuprog, bae_defmenutext, bae_endmenu, bae_redefmenu, bae_resetmenuprog.

bae_defmenuprog - Define BAE menu entry (STD)

Synopsis
int bae_defmenuprog(          // Selection code or (-1) on error
      int [0,999];            // Menu number
      int [0,99];             // Menu line
      string;                 // Menu text
      string;                 // User Language program name or
                              //  # followed by menu item (STD4)
      int;                    // Menu entry processing key:
                              //    8000000h = always available
                              //    7FFFFFFh = available for each
                              //                element type
                              //    else     = (combined) DDB class
                              //                processing key
      );
Description
The bae_defmenuprog function assigns the specified menu text and the named User Language program (or BAE menu function) to the given menu entry. The menu number specifies the number of the main menu, whilst the menu line designates the position in the according submenu. An empty string program name specification can be used to reset the current assignment. The menu entry processing key activates ghost menu configurations. The processing key is a coded integer value as retrieved and/or defined using the bae_getclassbitfield and bae_getmenubitfield functions (hex value 80000000h can be entered to allow for application in any case). The bae_defmenuprog function returns zero if done or nonzero on error (i.e., invalid parameters or reset request for undefined menu assignments). The bae_resetmenuprog function can be used to reset all menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_getclassbitfield, bae_getmenubitfield, bae_getmenuprog, bae_getmenutext, bae_redefmenu, bae_resetmenuprog.

bae_defmenusel - Set BAE menu default selection (STD)

Synopsis
void bae_defmenusel(
      int [-1,29];            // Menu item index
                              //  or (-1) for selection text store
      );
Description
The bae_defmenusel function sets the default selection for the next bae_askmenu call. This allows for the indication of the currently selected menu option. BAE Windows versions indicate the default selection through a tick marker, Motif versions grey-shade the preselected menu item, and the DOS versions and/or the sidemenu configurations preselect the menu item specified through the menu item index parameter. The bae_defmenusel selection is only valid for the next bae_askmenu call. bae_askmenu resets this selection, i.e., bae_defmenusel must be used to re-activate any required default selection for subsequent bae_askmenu calls.
See also
Function bae_askmenu.

bae_defmenutext - Define BAE menu item text (STD)

Synopsis
int bae_defmenutext(          // Returns status
      int [0,99];             // Menu line
      string;                 // Menu text
      int;                    // Menu entry processing key:
                              //    8000000h = always available
                              //    7FFFFFFh = available for each element type
                              //    else     = (combined) DDB class processing key
      );
Description
The bae_defmenutext function must be called after bae_defmenu and/or bae_defselmenu to store the given menu line text at the specified menu line of the current menu definition. A pulldown menu seperator line is inserted prior to the menu entry if the menu line text starts with a percent character (%). The commercial and-character & can be used to define menu accelerator keys, with the character preceded by the & sign defining the key for selecting the menu item through the keyboard. The menu entry processing key activates ghost menu configurations. The processing key is a coded integer value as retrieved and/or defined using the bae_getclassbitfield and bae_getmenubitfield functions (hex value 80000000h can be entered to allow for application in any case). The function returns (-1) on error or zero otherwise. The bae_resetmenuprog function can be used to reset all menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_defmenu, bae_defselmenu, bae_getclassbitfield, bae_getmenubitfield, bae_plainmenutext, bae_redefmenu, bae_resetmenuprog.

bae_defselmenu - BAE menu definition start (STD)

Synopsis
int bae_defselmenu(           // Returns status
      int [0,999];            // Menu code number
      int [0,999];            // Menu area code number:
                              //    1   = main menu area
                              //    101 = first submenu area
                              //    102 = second submenu area
                              //    :   = : submenu area
      );
Description
The bae_defselmenu function starts the definition of a standard menu in the currently active BAE module. The function returns (-1) on error or zero otherwise. After calling bae_defselmenu, the bae_defmenutext function should be applied for defining the menu entries. The menu definition initiated with bae_defselmenu must be terminated by a call to the bae_endmenu function. The bae_resetmenuprog function can be used to reset all menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_defmenuprog, bae_defmenutext, bae_endmenu, bae_redefmenu, bae_resetmenuprog.

bae_dialaddcontrol - BAE dialog element definition (STD)

Synopsis
int bae_dialaddcontrol(       // Dialog element index or (-1) on error
      int [0,[;               // Parameter type (STD5)
      int;                    // Minimum int parameter value
      int;                    // Maximum int parameter value
      int;                    // Initial int parameter value
      double;                 // Minimum double parameter value
      double;                 // Maximum double parameter value
      double;                 // Initial double parameter value
      string;                 // Initial string parameter value
      int [0,[;               // Maximum string parameter value length
      double;                 // Dialog element X position [character units]
      double;                 // Dialog element Y position [character units]
      double;                 // Dialog element dimension [character units]
      string;                 // Parameter name/prompt
      );
Description
The bae_dialaddcontrol function defines a dialog element for the specified parameter type. Subsequent calls to the bae_dialaskparams, function activate a dialog with the dialog element displayed at the specified position and size. Any label and/or prompt to be displayed with the dialog element can be specified through the parameter name/prompt function parameter. The parameter value setting(s) for the new dialog element must be passed through the function parameter(s) matching the specified dialog element parameter type. The function returns a non-negative dialog element index if the dialog element creation was successful or (-1) otherwise. The dialog element index is used as dialog element selection parameter in subsequent calls to the bae_dialgetdata and bae_dialsetdata functions. Dialog elements created with bae_dialaddcontrol are valid and/or available until the next bae_dialclr call.
See also
Functions bae_dialadvcontrol, bae_dialaskparams, bae_dialbmpalloc, bae_dialboxbufload, bae_dialboxbufstore, bae_dialclr, bae_dialgetdata, bae_dialsetdata.

bae_dialadvcontrol - Add advanced BAE dialog element (STD)

Synopsis
int bae_dialadvcontrol(       // Returns new dialog control index or (-1) on error
      int [0,[;               // Parameter type (STD5)
      int;                    // Minimum int parameter value
      int;                    // Maximum int parameter value
      int;                    // Initial int parameter value
      double;                 // Minimum double parameter value
      double;                 // Maximum double parameter value
      double;                 // Initial double parameter value
      string;                 // Initial string parameter value
      int [0,[;               // Maximum string parameter value length
      double;                 // Dialog element X coordinate [character units]
      double;                 // Dialog element Y coordinate [character units]
      double;                 // Dialog element width [character units]
      double;                 // Dialog element height [character units]
      string;                 // Parameter name/prompt
      );
Description
The bae_dialadvcontrol function defines an advanced dialog element (with element height specification) for the specified parameter type. Subsequent calls to the bae_dialaskparams, function activate a dialog with the dialog element displayed at the specified position, width and height. Any label and/or prompt to be displayed with the dialog element can be specified through the parameter name/prompt function parameter. The parameter value setting(s) for the new dialog element must be passed through the function parameter(s) matching the specified dialog element parameter type. The function returns a non-negative dialog element index if the dialog element creation was successful or (-1) otherwise. The dialog element index is used as dialog element selection parameter in subsequent calls to the bae_dialgetdata and bae_dialsetdata functions. Dialog elements created with bae_dialadvcontrol are valid and/or available until the next bae_dialclr call.
See also
Functions bae_dialaddcontrol, bae_dialaskparams, bae_dialbmpalloc, bae_dialboxbufload, bae_dialboxbufstore, bae_dialclr, bae_dialgetdata, bae_dialsetdata.

bae_dialaskcall - Activate BAE dialog with listbox element callback function (STD)

Synopsis
int bae_dialaskcall(          // Returns positive action code, or
                              //    ( 0) on OK, or
                              //    (-1) on Abort or error
      string;                 // Dialog title
      int [0,3];              // Distance output units:
                              //    0 = mm
                              //    1 = Inch
                              //    2 = mil
                              //    3 = um
      double ]0.0,[;          // Dialog width [character units]
      double ]0.0,[;          // Dialog height [character units]
      * int;                  // Listbox element callback function
      );
Description
The bae_dialaskcall function activates a dialog with the dialog elements previously defined with bae_dialaddcontrol. The dialog title specified with the first function parameter is displayed in the title bar of the dialog window. The size of the dialog window can be specified through the dialog width and height function parameters. The function return value is set to zero if the OK dialog button is pressed. Pressing a non-default action button dialog element with a positive action code assignment causes bae_dialaskcall to return with the specified action code. A value of (-1) is returned on error or Abort dialog button activation. The bae_dialgetdata, function can be used to retrieve dialog parameter values after successfully completing bae_dialaskcall. Distance and/or length parameter values are automatically displayed and/or returned according to the distance output units mode function parameter passed to bae_dialaskcall. The last parameter allows for the specification of a user-defined callback function which is automatically called if an element of a listbox with PA_MCALLBACK type definition is selected.
Listbox Element Callback Function
int callbackfuncname(
      int reason,             // Callback reason
      int boxidx,             // Dialog box index
      int itemidx,            // List element index
      int itemid,             // List element id
      string itemstr          // List element text
      )
{
      // Function statements
      :
      return(errstat);
}

The callback function should return zero upon successfull completion, or non-zero for errors or abort requests.

See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskparams, bae_dialbmpalloc, bae_dialboxparam, bae_dialboxperm, bae_dialclr, bae_dialgetdata, bae_dialsetdata.

bae_dialaskparams - Activate BAE dialog (STD)

Synopsis
int bae_dialaskparams(        // Returns positive action code, or
                              //    ( 0) on OK, or
                              //    (-1) on Abort or error
                              //    (-2) on dialog size change
      string;                 // Dialog title
      int [0,3];              // Distance output units:
                              //    0 = mm
                              //    1 = Inch
                              //    2 = mil
                              //    3 = um
      double ]0.0,[;          // Dialog width [character units]
      double ]0.0,[;          // Dialog height [character units]
      );
Description
The bae_dialaskparams function activates a dialog with the dialog elements previously defined with bae_dialaddcontrol. The dialog title specified with the first function parameter is displayed in the title bar of the dialog window. The size of the dialog window can be specified through the dialog width and height function parameters. The function return value is set to zero if the OK dialog button is pressed. Pressing a non-default action button dialog element with a positive action code assignment causes bae_dialaskparams to return with the specified action code. A value of (-1) is returned on error or Abort dialog button activation. A value of (-2) is returned if the dialog size is changed. The bae_dialgetdata, function can be used to retrieve dialog parameter values after successfully completing bae_dialaskparams. Distance and/or length parameter values are automatically displayed and/or returned according to the distance output units mode function parameter passed to bae_dialaskparams.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskcall, bae_dialbmpalloc, bae_dialboxperm, bae_dialclr, bae_dialgetdata, bae_dialsetdata.

bae_dialbmpalloc - Create BAE dialog bitmap (STD)

Synopsis
int bae_dialbmpalloc(         // Returns non-negative bitmap id or (-1) on error
      double ]0.0,[;          // Requested bitmap width [character units]
      double ]0.0,[;          // Requested bitmap height [character units]
      int [2,31];             // Bitmap id
      & int;                  // Generated bitmap width [Pixel]
      & int;                  // Generated bitmap height [Pixel]
      );
Description
The bae_dialbmpalloc function creates a bitmap with the specified parameters in a dialog box to be activated with bae_dialaskparams. The function returns (-1) on error or a non-negative bitmap id (and the generated bitmap dimensions) if the bitmap was successfully created. Once the bitmap is generated, the bae_popsetarea function is used to select the bitmap for subsequent graphic output with the bae_popdrawtext and bae_popdrawpoly functions.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskcall, bae_dialaskparams, bae_dialboxperm, bae_dialclr, bae_popdrawpoly, bae_popdrawtext, bae_popsetarea.

bae_dialboxbufload - Restore BAE dialog box data from buffer (STD)

Synopsis
int bae_dialboxbufload(       // Status
      int [1,[;               // Dialog box buffer id
      );
Description
The bae_dialboxbufload function is used to restore dialog box definitions which were previously saved with the bae_dialboxbufstore function. The function returns zero if the dialog box definitions were successfully loaded or nonzero on error.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialboxbufstore, bae_dialclr.

bae_dialboxbufstore - Store BAE dialog box data to buffer (STD)

Synopsis
int bae_dialboxbufstore(      // Dialog box id (>0) or (-1) on error
      );
Description
The bae_dialboxbufstore function saves the current dialog box definitions to an internal buffer. The functions returns a buffer id or (-1) on error. The buffer id can be used in subsequent calls to the bae_dialboxbufload function for restoring these dialog box definitions.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialboxbufload, bae_dialclr.

bae_dialboxperm - Activate modeless BAE dialog (STD)

Synopsis
int bae_dialboxperm(          // Returns positive dialog box id, or
                              //    (-1) on dialog box creation error, or
                              //    (-2) if maximum dialog box count reached
      string;                 // Dialog title
      int [0,3];              // Distance output units:
                              //    0 = mm
                              //    1 = Inch
                              //    2 = mil
                              //    3 = um
      double ]0.0,[;          // Dialog width [character units]
      double ]0.0,[;          // Dialog height [character units]
      );
Description
The bae_dialboxperm function activates a modeless dialog with the dialog elements previously defined with bae_dialaddcontrol. The dialog title specified with the first function parameter is displayed in the title bar of the dialog window. The size of the dialog window can be specified through the dialog width and height function parameters. The function returns the positive dialog box id if the dialog was successfully generated, or a negative value on error. The bae_dialgetdata function can be used to retrieve dialog parameter values after successfully completing bae_dialboxperm (and dialog activation with bae_dialsetcurrent). Distance and/or length parameter values are automatically displayed and/or returned according to the distance output units mode function parameter passed to bae_dialboxperm.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskcall, bae_dialaskparams, bae_dialbmpalloc, bae_dialclr, bae_dialgetdata, bae_dialsetcurrent, bae_dialsetdata.

bae_dialclr - Clear BAE dialog elements (STD)

Synopsis
int bae_dialclr(              // Returns status
      );
Description
The bae_dialclr function clears/deletes all BAE dialog elements previously defined with bae_dialaddcontrol. The function return value is nonzero if dialogs are not supported in the current BAE user interface environment. To clear any dialog elements from previous dialog definitions, bae_dialclr should be called before starting a new BAE dialog definitions The function return value should be checked, and alternative user input facilities should be provided if dialogs are not supported.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskcall, bae_dialaskparams, bae_dialbmpalloc, bae_dialboxbufload, bae_dialboxbufstore, bae_dialboxperm, bae_dialgetdata, bae_dialsetdata.

bae_dialgetdata - Get BAE dialog element parameter (STD)

Synopsis
int bae_dialgetdata(          // Returns status
      int [0,[;               // Dialog element index
      & int;                  // Dialog element integer value
      & double;               // Dialog element double value
      & string;               // Dialog element string value
      );
Description
The bae_dialgetdata function is used to retrieve dialog element parameter values after successful bae_dialaskparams calls. The query dialog element is selected through the dialog element index returned by bae_dialaddcontrol at the creation of the dialog element. The parameter value is returned through the function parameter matching the data type of the queried dialog element. The function returns nonzero if the dialog element parameter query failed.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskparams, bae_dialclr, bae_dialsetdata.

bae_dialgettextlen - Get BAE dialog text length (STD)

Synopsis
double bae_dialgettextlen(    // Returns text length [character units]
      int [0,[;               // Dialog text (font) type
      string;                 // Dialog text string
      );
Description
The bae_dialgettextlen function calculates and returns the spacial requirements for displaying the specified dialog text string.

bae_dialsetcurrent - Set current BAE dialog box (STD)

Synopsis
int bae_dialsetcurrent(       // Returns status
      int [0,[;               // Dialog box id
      );
Description
The bae_dialsetcurrent activates the (modeless) dialog box specified through the dialog box id for subsequent dialog box operations. The functions returns zero if a dialog was successfully selected, or nonzero otherwise.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskcall, bae_dialaskparams, bae_dialbmpalloc, bae_dialboxperm, bae_dialclr, bae_dialgetdata, bae_dialsetdata.

bae_dialsetdata - Set BAE dialog element parameter (STD)

Synopsis
int bae_dialsetdata(          // Returns status
      int [0,[;               // Dialog element index
      int [0,[;               // Dialog element parameter type (STD5)
      int;                    // Dialog element integer value
      double;                 // Dialog element double value
      string;                 // Dialog element string value
      );
Description
The bae_dialsetdata function is used to set dialog element parameter types and/or values previously defined with the bae_dialaddcontrol function. The dialog element to be changed is selected through the dialog element index returned by bae_dialaddcontrol at the creation of the dialog element. The new dialog element parameter value must be passed through the function parameter matching the specified dialog element parameter type. The function returns nonzero if the dialog element parameter value change failed.
See also
Functions bae_dialaddcontrol, bae_dialadvcontrol, bae_dialaskparams, bae_dialclr, bae_dialgetdata.

bae_endmainmenu - BAE main menu definition end (STD)

Synopsis
int bae_endmainmenu(          // Returns status
      );
Description
The bae_endmainmenu function terminates a main menu redefinition previously initiated with the bae_redefmainmenu function. The function returns (-1) on error or zero otherwise.
See also
Function bae_redefmainmenu.

bae_endmenu - BAE menu definition end (STD)

Synopsis
int bae_endmenu(              // Returns status
      );
Description
The bae_endmenu function terminates a menu definition previously initiated with either of the functions bae_defmenu or bae_defselmenu. The function returns (-1) on error or zero otherwise.
See also
Functions bae_defmenu, bae_defselmenu.

bae_fontcharcnt - Get BAE font character count (STD)

Synopsis
int bae_fontcharcnt(          // Returns font character count
      );
Description
The bae_fontcharcnt function returns the number of characters defined in the currently active BAE text font.

bae_fontname - Get BAE text font name (STD)

Synopsis
string bae_fontname(          // Returns text font name
      );
Description
The bae_fontname function returns the text font name of the currently loaded BAE element.

bae_getactmenu - Get active BAE menu entry number (STD)

Synopsis
int bae_getactmenu(           // Returns menu entry number (STD4)
      );
Description
The bae_getactmenu function returns the menu entry number (STD4) of the currently active BAE menu function or (-1) if no menu function is active. This feature is useful for key-called User Language programs.

bae_getanglelock - Get BAE angle lock flag (STD)

Synopsis
int bae_getanglelock(         // Returns angle lock flag (STD9)
      );
Description
The bae_getanglelock function returns the current BAE angle lock mode (0=angle unlocked, 1=angle locked).
See also
Function bae_setanglelock.

bae_getbackgrid - Get BAE display grid (STD)

Synopsis
void bae_getbackgrid(
      & double;               // Returns X display grid (STD2)
      & double;               // Returns Y display grid (STD2)
      );
Description
The bae_getbackgrid function returns the current BAE X/Y display grid values with its parameters. Zero grid values refer to switched-off grids.
See also
Function bae_setbackgrid.

bae_getcasstime - Get date/time of last project connection data update caused by Packager/Backannotation (STD)

Synopsis
string bae_getcasstime(       // Returns Packager net lsit name
      & int;                  // Returns time second
      & int;                  // Returns time minute
      & int;                  // Returns time hour
      & int;                  // Returns date day
      & int;                  // Returns date month
      & int;                  // Returns date year
      );
Description
The bae_getcasstime function can be used to retrieve the date and time of the last project netlist updated caused by Packager or Backannotation.
See also
Functions bae_getpackdata, bae_getpacktime.

bae_getclassbitfield - Get BAE DDB class processing key (STD)

Synopsis
int bae_getclassbitfield(     // Returns processing key
      int ]0,[;               // DDB database class code (STD1)
      );
Description
The bae_getclassbitfield function returns the processing key code assigned to the specified DDB database class. The function returns (-1) for invalid and/or unknown database class specifications.

The processing key is a coded integer value which - in a BAE module - is unique for each processable DDB database class. Such key codes can be combined using bit-or operations and can subsequently be assigned to specific menu entries using either of the bae_defmenutext, bae_defmenuprog or bae_redefmenu functions, thus allowing for the configuration of menu functions which can only be applied on certain database classes.

See also
Functions bae_defmenuprog, bae_defmenutext, bae_getmenubitfield, bae_redefmenu.

bae_getcmdbuf - BAE command history query (STD)

Synopsis
int bae_getcmdbuf(            // Returns status
      int [-50,2099];         // Command buffer index 0 to 49
                              //   or 1000 to 1099 for Undo items 1 to 100
                              //   or 2000 to 2099 for Redo items 1 to 100
                              //   or negative value for message history
      & string;               // Command (sequence) string
      & string;               // Command notification text
      );
Description
The bae_getcmdbuf function is used to query the current context menu command history, i.e., the list of commands activated through the right mouse button. The command buffer index parameter selects the command to be queried (zero being the most recent command). The command (sequence) string and the command notification text (as displayed in the title bar) are returned through the second and third function parameter. The function returns 1 if the query was successful or zero if an invalid command buffer index was specified.
See also
Function bae_storecmdbuf.

bae_getcolor - Get BAE color value (STD)

Synopsis
int bae_getcolor(             // Color value (STD18)
      int;                    // Display item type (SCM1|LAY9|ICD9)
      );
Description
The bae_getcolor function returns the color value currently set for the given display item type. The display item type value must be set according to the currently active User Language Interpreter environment.
See also
Function bae_setcolor.

bae_getcoorddisp - Get BAE coordinate display mode (STD)

Synopsis
int bae_getcoorddisp(         // Returns coordinate display mode (STD7)
      );
Description
The bae_getcoorddisp function returns the current BAE coordinate display mode. The return value is 0 for mm display units (micrometer units in IC Design) or 1 for Inch display units (mil units in IC Design).
See also
Function bae_setcoorddisp.

bae_getdblpar - Get BAE double parameter (STD)

Synopsis
int bae_getdblpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = maximum dialog box width
                              //    1 = maximum dialog box height
                              //    2 = display zoom factor
                              //    3 = Rubberband corner radius (STD2)
                              //    4 = Rubberband X vector coordinate (STD2)
                              //    5 = Rubberband Y vector coordinate (STD2)
                              //    6 = fixed X pick coordinate (STD2)
                              //    7 = fixed Y pick coordinate (STD2)
                              //    8 = Dialog box width:
                              //    9 = Dialog box height:
                              //    10 = Screen pick aperture (STD2)
                              //    11 = Element selection preview area relative size [0.05, 0.95]
                              //    12 = Dialog box X unit pixels
                              //    13 = Dialog box Y unit pixels
      & double;               // Returns parameter value
      );
Description
The bae_getdblpar function is used to query Bartels AutoEngineerdouble parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions bae_getintpar, bae_getstrpar, bae_setdblpar, bae_setintpar, bae_setstrpar.

bae_getfuncprog - Get BAE function key definition (STD)

Synopsis
string bae_getfuncprog(       // Program name
      int [1,128];            // Function key number
      );
Description
The bae_getfuncprog function returns the name of the User Language program (or the hash-preceded BAE menu function number) assigned to the specified function key. An empty string is returned if no program is assigned to the key or if the function key number specification is invalid.

bae_getgridlock - Get BAE grid lock flag (STD)

Synopsis
int bae_getgridlock(          // Returns grid lock flag (STD8)
      );
Description
The bae_getgridlock function returns the current BAE grid lock mode (0=grid unlocked, 1=grid locked).
See also
Function bae_setgridlock.

bae_getgridmode - Get BAE grid dependency mode (STD)

Synopsis
int bae_getgridmode(          // Returns automatic grid setting mode
                              //    0x01: input grid = 0.25 × display grid
                              //    0x02: input grid = 0.50 × display grid
                              //    0x04: input grid = 1.00 × display grid
                              //    0x08: input grid = 2.00 × display grid
                              //    0x10: display grid = 0.25 × input grid
                              //    0x20: display grid = 0.50 × input grid
                              //    0x40: display grid = 1.00 × input grid
                              //    0x80: display grid = 2.00 × input grid
      );
Description
The bae_getgridmode function returns the current BAE grid dependency mode.
See also
Function bae_setgridmode.

bae_getinpgrid - Get BAE input grid (STD)

Synopsis
void bae_getinpgrid(
      & double;               // Returns X input grid (STD2)
      & double;               // Returns Y input grid (STD2)
      );
Description
The bae_getinpgrid function returns the current BAE X/Y input grid values with its parameters. Zero grid values refer to switched-off grids.
See also
Function bae_setinpgrid.

bae_getintpar - Get BAE integer parameter (STD)

Synopsis
int bae_getintpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Input coordinate range checking:
                              //        0 = range check enabled
                              //        1 = range check disabled
                              //    1 = Module change autosave mode:
                              //        0 = autosave without prompt
                              //        1 = prompt before autosave
                              //    2 = Display disable mode:
                              //        0 = display enabled
                              //        1 = display disabled
                              //    3 = User interface menu/mouse mode:
                              //        0 = Sidemenu configuration
                              //        1 = Pulldown menu, LMB context
                              //        2 = Pulldwon menu, RMB context
                              //    4 = Workspace text color mode:
                              //        0 = standard colors
                              //        1 = inverted standard colors
                              //        2 = workspace related colors
                              //    5 = Load display mode:
                              //        0 = display overview after load
                              //        1 = handle load display in bae_load
                              //    6 = File dialog view:
                              //        0 = old BAE style file selection
                              //        1 = Explorer style default view
                              //        2 = Explorer style list view
                              //        3 = Explorer style details
                              //        4 = Explorer style small icons
                              //        5 = Explorer style large icons
                              //        6 = Use default style and size
                              //    7 = Element selection box mode:
                              //        0 = display name only
                              //        1 = display name and date
                              //    8 = Element selection sort mode:
                              //        0|1 = sort by name
                              //        2 = sort numerically
                              //        3 = sort by date
                              //    9 = Placement visibility:
                              //        0 = placed elements visible
                              //        1 = unplaced elements visible
                              //    10 = Last file system error
                              //    11 = Command history disable flag:
                              //        0 = Command history enabled
                              //        1 = Command history disabled
                              //    12 = Popup menu mouse warp mode:
                              //        0 = No popup menu mouse warp
                              //        1 = First popup menu entry mouse warp
                              //        2 = Preselected menu entry mouse warp
                              //        +4 = Mouse position restore warp
                              //        +8 = Element pick position warp
                              //    13 = Save disable flag:
                              //        0 = save enabled
                              //        1 = save disabled
                              //    14 = Mouse rectangle min. size:
                              //        ]0,[ = min. rectangle size
                              //    15 = Mouse info display mode:
                              //        0 = Tooltip info display
                              //        1 = Continuous crosshair info display
                              //        2 = Crosshair info display with Ctrl
                              //    16 = Next dialog box id
                              //    17 = Last created tooltip id
                              //    18 = Polygon drop count
                              //    19 = Polygon check disabled flag:
                              //        0 = Polygon check enabled
                              //        1 = Polygon check disabled
                              //    20 = Cursor key grid mode:
                              //        0 = Input grid
                              //        1 = Pixel grid
                              //    21 = Unsaved plan flag
                              //    22 = Element batch load mode:
                              //        0 = no batch load
                              //        1 = Batch load
                              //        2 = batch load, restore zoom window
                              //    23 = Grid lines display:
                              //        0 = Dot grid
                              //        1 = Line grid
                              //    24 = Display mirroring flag
                              //    25 = Input grid display flag
                              //    26 = Mouse function repeat mode:
                              //        0 = Repeat menu function
                              //        +1 = Repeat keystroke function
                              //        +2 = Repeat context menu function
                              //    27 = Maximum Undo/Redo count
                              //    28 = Menu tree view mode:
                              //        0 = No menu tree view window
                              //        1 = Left attached menu tree view window
                              //        2 = Right attached menu tree view window
                              //    29 = Menu tree view pixel width
                              //    30 = Message history disabled flag
                              //    31 = Element load message mode:
                              //        0 = Standard message
                              //        1 = User message
                              //        2 = User error message
                              //    32 = Pick marker display mode:
                              //        0 = Circle marker
                              //        1 = Diamond marker
                              //    33 = Mouse drag status:
                              //        0 = No mouse drag
                              //        1 = Request mouse drag
                              //        2 = Mouse dragged
                              //        3 = Request mouse drag release
                              //    34 = Menu function repeat request flag
                              //    35 = Function aborted flag
                              //    36 = Plan selection preview flag
                              //    37 = File error display mode:
                              //        0 = Status message only
                              //        1 = Confirm message box
                              //    38 = Element selection reference display mode:
                              //        0 = Display project file references
                              //        1 = Display library file references
                              //    39 = Mouse double-click mode:
                              //        0 = Map double-click and select 0 to right mouse button
                              //        1 = Ignore double-click
                              //        2 = Map double-click to right mouse button
                              //    40 = Mouse pick double-click mode:
                              //        0 = Map double-click to right mouse button
                              //        1 = Ignore double-click
                              //    41 = Dialog control support flags:
                              //        0 = No dialog control elements supported
                              //        |1 = Base dialog control set supported
                              //        |2 = List view supported
                              //        |4 = Progress display supported
                              //        |8 = Toolbar button supported
                              //    42 = Progress box display mode:
                              //        0 = No progress box window
                              //        1 = Display progress window
                              //    43 = Progress box abort request flag
                              //    44 = Middle mouse button disable flag
                              //    45 = Current undo items count
                              //    46 = File drag and drop operation flag
                              //    47 = Autoraise BAE window flag
                              //    48 = Menu function active count
                              //    49 = Internal polygon list point count
                              //    50 = Alternate configuration file priority
                              //    51 = Dialog position save mode:
                              //        0 = Store absolute coordinates
                              //        1 = Store main window relative coordinates
                              //        2 = Store main window monitor absolute coordinates
                              //    52 = Message box default button index:
                              //        (-1) = No default (Abort or No)
                              //        0-2 = Default button index
      & int;                  // Returns parameter value
      );
Description
The bae_getintpar function is used to query Bartels AutoEngineer integer parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions bae_getdblpar, bae_getstrpar, bae_setdblpar, bae_setintpar, bae_setstrpar.

bae_getinvcolor - Get BAE color inversion mode (STD)

Synopsis
int bae_getinvcolor(          // Returns inverted color palette flag
      );
Description
The bae_getinvcolor function checks whether the BAE system color palette is "inverted". The system color palette is considered inverted if the darkest color in palette (as defined through a bae.col file in the BAE programs directory) is not black. The function returns nonzero if the BAE system color palette appears to be inverted or zero else.

bae_getmenubitfield - Get BAE menu function processing key (STD)

Synopsis
int bae_getmenubitfield(      // Returns processing key
      int [0,999];            // Menu code
      int [0,99];             // Menu line
      );
Description
The bae_getmenubitfield function returns the processing code assigned to the menu entry specified with the main menu code and the menu line number in the corresponding submenu. The function returns (-1) for invalid and/or unknown menu entry specifications.

The processing key is a coded integer value specifying a set of element types which can be subject to the menu function. This key is utilized throughout the Bartels AutoEngineer to activate and/or deactivate specific menu functions according to the type of element currently loaded (note that the ghost menu layouts of the BAE Windows versions are a typical application of this feature). With the hex value 80000000h assigned to its processing key, a menu function can always be applied (i.e., even if no element is loaded). With the hex value 7FFFFFFFh assigned to its processing key, a menu function can be applied to any currently loaded element type. Other processing key codes are defined in each BAE module according to the DDB database classes which can be processed. The processing key code for a specific database class can be retrieved with the bae_getclassbitfield function. Such processing key codes can be combined using bit-or operations and can subsequently be assigned to specific menu entries using either of the bae_defmenutext, bae_defmenuprog or bae_redefmenu functions, thus allowing for a user-defined ghost menu setup.
See also
Functions bae_defmenuprog, bae_defmenutext, bae_getclassbitfield, bae_redefmenu.

bae_getkeyprog - Get BAE standard key definition (STD)

Synopsis
string bae_getkeyprog(        // Program name
      int;                    // Key character
      );
Description
The bae_getkeyprog function returns the name of the User Language program (or the hash-preceded BAE menu function number) assigned to the specified standard key. An empty string is returned if no program is assigned to the key or if the key character specification is invalid.
See also
Functions bae_defkeyprog, bae_resetmenuprog.

bae_getmenuitem - BAE menu item query (STD)

Synopsis
int bae_getmenuitem(          // Return status
      & int;                  // Menu code
      & string;               // Menu text(s)
      & string;               // Menu command
      );
Description
The bae_getmenuitem function activates a menu function selection for menu item information query (i.e., the selected menu function is not executed). The menu code parameter returns the numeric menu call code of the selected menu item. The menu text parameter returns the selected hierarchical menu item text sequence (with menu texts separated by ->). The menu command parameter returns the menu command string/sequence assigned to the selected menu item. The function returns zero if the query was successful or nonzero for failed or aborted queries.
See also
Functions bae_callmenu, bae_defmenuprog, bae_getmenuprog, bae_getmenutext.

bae_getmenuprog - Get BAE menu entry definition (STD)

Synopsis
string bae_getmenuprog(       // Program name
      int [0,999];            // Menu code
      int [0,99];             // Menu line
      );
Description
The bae_getmenuprog function returns the name of the User Language program (or the hash-preceded BAE menu function number) assigned to the specified menu entry. The menu code parameter specifies the main menu number, whilst the menu line parameter specifies the position in the corresponding submenu. An empty string is returned if no program is assigned to the menu entry or if the menu entry does not exist.
See also
Functions bae_defmenuprog, bae_getmenuitem, bae_getmenutext, bae_resetmenuprog.

bae_getmenutext - Get BAE menu text (STD)

Synopsis
string bae_getmenutext(       // Menu text
      int [0,999];            // Menu code
      int [0,99];             // Menu line
      );
Description
The bae_getmenutext function returns the menu text which is assigned to the given menu entry. The menu code parameter specifies the main menu number, whilst the menu line parameter specifies the position in the corresponding submenu. An empty string is returned if the specified menu entry does not exist.
See also
Functions bae_defmenuprog, bae_getmenuitem, bae_getmenuprog, bae_plainmenutext, bae_resetmenuprog.

bae_getmoduleid - Get BAE module id (STD)

Synopsis
string bae_getmoduleid(       // Returns module id
      );
Description
The bae_getmoduleid retrieves the module name/identification of the currently active BAE program module.
See also
Function bae_setmoduleid.

bae_getmsg - Get BAE HighEnd message (STD/HighEnd)

Synopsis
string bae_getmsg(            // Returns current message string
      );
Description
The bae_getmsg function is only available in BAE HighEnd. bae_getmsg is used for receiving pending messages from the BAE HighEnd message system. Messages are send to program instances of a BAE HighEnd session using the bae_sendmsg function. A BAE HighEnd session is started with a BAE call and includes any other BAE program instance subsequently started with the New Task function from the BAE main menu or with the Next SCM Window function from the Schematic Editor. Each BAE HighEnd module receiving a message automatically activates the User Language program named bae_msg. If bae_msg is not available, the system tries to start an interpreter-specific User Language program (scm_msg in the Schematic Editor, ged_msg in the Layout Editor, ar_msg in the Autorouter, etc.). The bae_getmsg function must be used in the *_msg User Language program to retrieve pending messages. Pending messages are only available during the execution of the *_msg User Language program, i.e., any message not retrieved by the *_msg program using the bae_getmsg function is lost. The message text string can be used for triggering certain actions in the destination program instances.
See also
Function bae_sendmsg.

bae_getpackdata - Get last project Packager run data (STD)

Synopsis
int bae_getpackdata(          // Returns status
      string;                 // Project file name
      & string;               // Returns layout library file name
      & string;               // Returns net list name
      );
Description
The bae_getpackdata retrieves the layout library file and net list name parameters used for the last Packager run on the specified project file. The function returns zero if the query was successful or non-zero if the paramater data was not found.
See also
Functions bae_getcasstime, bae_getpacktime.

bae_getpacktime - Get last project Packager run date/time (STD)

Synopsis
int bae_getpacktime(          // Returns status
      string;                 // Project file name
      & int;                  // Returns time second
      & int;                  // Returns time minute
      & int;                  // Returns time hour
      & int;                  // Returns date day
      & int;                  // Returns date month
      & int;                  // Returns date year
      );
Description
The bae_getpacktime retrieves the date and time of the last Packager run for the specified project file. The function returns zero if the query was successful or non-zero if the date/time information was not available.
See also
Functions bae_getcasstime, bae_getpackdata.

bae_getpolyrange - Get internal BAE polygon range (STD)

Synopsis
int bae_getpolyrange(         // Returns status
      & double;               // Returns polygon range left boundary
      & double;               // Returns polygon range lower boundary
      & double;               // Returns polygon range right boundary
      & double;               // Returns polygon range upper boundary
      );
Description
The bae_getpolyrange function is used to query the range of the internal BAE polygon defined with bae_storepoint. The function returns zero if the query was successful or non-zero otherwise.
See also
Functions bae_clearpoints, bae_storepoint.

bae_getstrpar - Get BAE string parameter (STD)

Synopsis
int bae_getstrpar(            // Rückgabe Status
      int [0,[;               // Parameter type/number:
                              //    0 = Current element comment text
                              //    1 = Current element specification
                              //    2 = Last file access error file
                              //    3 = Last file access error item
                              //  [ 4 = System parameter - no read access ]
                              //  [ 5 = System parameter - no read access ]
                              //    6 = Last loaded color table
                              //    7 = Menu text of last called function
                              //    8 = Current menu item element text
                              //    9 = Current element load user message
                              //    10 = Clipboard text string
                              //    11 = Next module call file argument
                              //    12 = Next module call element argument
                              //    13 = Next module call command/type argument
                              //    14 = Last output file name
                              //    15 = Host name
                              //  [ 16 = System parameter - no read access ]
                              //    17 = All users data directory
                              //    18 = Current user data directory
                              //    19 = Alternate configuration data directory
                              //    20 = Local data column
                              //    21 = Global data column
      & string;               // Returns parameter value
      );
Description
The bae_getstrpar function is used to query Bartels AutoEngineer string parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions bae_getdblpar, bae_getintpar, bae_setdblpar, bae_setintpar, bae_setstrpar.

bae_inittextscreen - Clear/initialize the BAE text screen (STD)

Synopsis
void bae_inittextscreen(
      );
Description
The bae_inittextscreen function clears the BAE graphic workarea and initializes the BAE text screen. The text cursor is set to the upper left corner of the text screen.

bae_inpoint - Input BAE point/coordinates with mouse (STD)

Synopsis
int bae_inpoint(              // Returns status
      double;                 // Start X coordinate (STD2)
      double;                 // Start Y coordinate (STD2)
      & double;               // Returns input X coordinate (STD2)
      & double;               // Returns input Y coordinate (STD2)
      int;                    // Drawing mode:
                              //    0 = no tracking display
                              //    1 = rubberband frame display
                              //    2 = rubberband line display
                              //    3 = rubberband circle display
                              //    4 = rubberband distance display
                              //    5 = rubberband zoom window display
                              //    6 = rubberband square display
                              //    7 = rubberband centered square display
                              //    8 = rubberband centered window display
                              //    9 = rubberband line polygon display
                              //    10 = rubberband outline polygon display
                              //    11 = rubberband circle center display
                              //    12 = rubberband fixed
                              //    13 = rubberband centered zoom window
                              //    14 = No window display, RMB immediate abort
                              //    15 = Fixed offset display
      );
Description
The bae_inpoint function activates an interactive coordinate point specification request (with mouse and optional submenu). The start coordinates specify the start point for Jump relative commands. The selected point coordinates are passed with the return parameters. A drawing mode value of 1 activates rubberband frame drawing from the start coordinate to the current mouse coordinate during coordinate selection. A drawing mode value of 2 activates rubberband line drawing from the start coordinate to the current mouse coordinate during coordinate selection. The function returns nonzero if a point has been selected or (-1) if the point selection has been aborted.
See also
Function bae_inpointmenu.

bae_inpointmenu - Input BAE point/coordinates with mouse and right mouse button callback function (STD)

Synopsis
int bae_inpointmenu(          // Returns status
      double;                 // Start X coordinate (STD2)
      double;                 // Start Y coordinate (STD2)
      & double;               // Returns input X coordinate (STD2)
      & double;               // Returns input Y coordinate (STD2)
      int;                    // Drawing mode:
                              //    0 = no tracking display
                              //    1 = rubberband frame display
                              //    2 = rubberband line display
                              //    3 = rubberband circle display
                              //    4 = rubberband distance display
                              //    5 = rubberband zoom window display
                              //    6 = rubberband square display
                              //    7 = rubberband centered square display
                              //    8 = rubberband centered window display
                              //    9 = rubberband line polygon display
                              //    10 = rubberband outline polygon display
                              //    11 = rubberband circle center display
                              //    12 = rubberband fixed
                              //    13 = rubberband centered zoom window
                              //    14 = unused
                              //    15 = Fixed offset display
      );
Description
The bae_inpointmenu function activates an interactive coordinate point specification request (with mouse and optional submenu). The start coordinates specify the start point for Jump relative commands. The selected point coordinates are passed with the return parameters. A drawing mode value of 1 activates rubberband frame drawing from the start coordinate to the current mouse coordinate during coordinate selection. A drawing mode value of 2 activates rubberband line drawing from the start coordinate to the current mouse coordinate during coordinate selection. The last parameter allows for the specification of a callback function (e.g., for displaying a specific options menu) to be activated if the right mouse button is pressed. The function returns nonzero if a point has been selected or (-1) if the point selection has been aborted.
Right mouse button callback function
int callbackfunction(         // Status
      double x                // Current input X coordinate
      double y                // Current input Y coordinate
      )
{
      // Right mouse button callback function statements
      :
      return(status);
}

The right mouse button callback function return value should be 0 to signal input completion, 1 to continue input, or any other value to abort input. Modified X/Y input coordinate parameters can be returned for zero callback function return values (input completed).

See also
Function bae_inpoint.

bae_language - Get BAE user interface language code (STD)

Synopsis
string bae_language(          // Returns language code:
                              //    DE = German
                              //    EN = English
                              //  for future use:
                              //    FR = French
                              //    IT = Italian
                              //    SP = Spanish
                              //    SV = Swedish
      );
Description
The bae_language function returns a code for identifying the language which is currently activated in the BAE user interface. This information can be used to support dynamic multi-language support.

bae_loadcoltab - Load BAE color table (STD)

Synopsis
int bae_loadcoltab(           // Returns status
      string;                 // Color table name
      );
Description
The bae_loadcoltab function loads the color table with the given name to the BAE. The function returns nonzero if the color table cannot be loaded.

bae_loadelem - Load BAE element (STD)

Synopsis
int bae_loadelem(             // Returns status
      string;                 // File name
      string;                 // Element name
      int [100,[;             // DDB class (STD1)
      );
Description
The bae_loadelem function loads a BAE element from DDB file to memory. The element is specified by the DDB file name, the element name and the DDB class. Possible Schematic Editor DDB class codes are 800, 801, 802 and 803 for SCM sheet, SCM symbol, SCM marker and SCM label, respectively. Possible BAE Layout DDB class codes are 100, 101, 102 and 103 for PCB layout, layout part, layout padstack and layout pad, respectively. Possible IC Design DDB class codes are 1000, 1001 and 1002 for IC layout, IC cell and IC pin, respectively. The function returns zero if the element was successfully loaded, (-1) on file access errors, 1 on text font load faults, 2 if referenced macros (library elements) are missing or 3 on unplaced parts and/or missing pins, i.e., if part symbols placed on a loaded layout do not match the net list specifications.

An empty element name can be specified with PCB Layout element class 100 for automatically loading the layout element with the default layout element name (see LAYDEFELEMENT command for bsetup).

bae_loadelem automatically processes pending Backannotation requests when loading SCM plans to the Schematic Editor.
Warning
The bae_loadelem function changes all currently loaded BAE element data. As a result, any active index variable becomes invalid. It is strongly recommended to refrain from using bae_loadelem in index variable accessing program blocks such as forall loops. Since bae_loadelem reset the Undo facility, it is also strongly recommended to check (with bae_plannotsaved) whether the current element has been saved before calling bae_loadelem.

bae_loadfont - Load BAE text font (STD)

Synopsis
int bae_loadfont(             // Returns status
      string;                 // Text font name
      );
Description
The bae_loadfont function loads the name-specified BAE text font. The function returns nonzero on font load errors or zero otherwise.

bae_menuitemhelp - Display BAE menu item help (STD)

Synopsis
int bae_menuitemhelp(         // Status
      int [0,9999];           // Menu code (STD4)
      string;                 // Help file name (Windows .hlp file)
      );
Description
The bae_menuitemhelp displays the Windows online help file topic for the specified menu code. The function returns nonzero if invalid parameters are specified.
Limitations
bae_menuitemhelp operates only under Windows.

bae_msgbox - Activate BAE message popup (STD)

Synopsis
void bae_msgbox(
      int;                    // Message box style/icon:
                              //    0 = info (information)
                              //    1 = warning (exclamation-point)
                              //    2 = error (question-mark)
                              //    3 = fatal error (stop-sign)
                              //    else =  no icon
      string;                 // Message box text string
      string;                 // Message box title string
      );
Description
The bae_msgbox function activates a message box popup with a confirmation (OK) button. The appearance of the message popup window can be selected with the first parameter. The message box text string is displayed in the popup area. The message box title string is used as header string to be displayed in the message box popup window title bar. The appearance and layout of the message box (popup positioning, title bar display, confirmation button, text alignment, word wrapping, etc.) can differ depending on the host operating system platform.
See also
Functions bae_msgboxverify, bae_msgboxverifyquit.

bae_msgboxverify - Activate BAE message popup with Yes/No verification (STD)

Synopsis
int bae_msgboxverify(         // Returns answer code:
                              //    1 = Yes
                              //    0 = No (default)
      string;                 // Message box text string
      string;                 // Message box title string
      );
Description
The bae_msgboxverify function activates a message box popup with a Yes/No verification query. The function returns 1 on Yes input/selection or zero otherwise. The message box text string is displayed in the popup area. The message box title string is used as header string to be displayed in the message box popup window title bar. The appearance and layout of the message box (popup positioning, title bar display, yes/no buttons, text alignment, word wrapping, etc.) can differ depending on the host operating system platform.
See also
Functions bae_msgbox, bae_msgboxverifyquit.

bae_msgboxverifyquit - Activate BAE message popup with Yes/No/Quit verification (STD)

Synopsis
int bae_msgboxverifyquit(     // Returns answer code:
                              //    1 = Yes
                              //    0 = No
                              //    else = Cancel/Quit (default)
      string;                 // Message box text string
      string;                 // Message box title string
      );
Description
The bae_msgboxverifyquit function activates a message box popup with a Yes/No/Quit verification query. The function returns 1 on Yes input/selection or zero on No input/selection. Any other return value indicates a Cancel/Quit request. The message box text string is displayed in the popup area. The message box title string is used as header string to be displayed in the message box popup window title bar. The appearance and layout of the message box (popup positioning, title bar display, yes/no/quit buttons, text alignment, word wrapping, etc.) can differ depending on the host operating system platform.
See also
Functions bae_msgbox, bae_msgboxverify.

bae_msgprogressrep - Activate/update BAE progress display (STD)

Synopsis
int bae_msgprogressrep(       // Returns non-zero on error
      string;                 // Progress display text string
      int [0,258];            // Progress display type:
                              //    1 : Percentage progress
                              //    2 : Marquee progress slider
                              //    |256 : Display abort button
      int [0,10000];          // Progress display completion value [%*100]
      int [0,[;               // Progress display min. character length
      );
Description
The bae_msgprogressrep activates and/or updates the current BAE progress display with the specified parameters. The function returns zero on success or non-zero on error (if invalid parameters were specified). The bae_msgprogressterm function can be used to terminate the progress display.
See also
Function bae_msgprogressterm.

bae_msgprogressterm - Terminate BAE progress display (STD)

Synopsis
void bae_msgprogressterm(
      );
Description
The bae_msgprogressterm terminates the previously with bae_msgprogressrep activated BAE progress display.
See also
Function bae_msgprogressrep.

bae_mtpsize - Get BAE popup display area dimensions (STD)

Synopsis
void bae_mtpsize(
      & int;                  // Returns popup menu text columns
      & int;                  // Returns popup menu text rows
      );
Description
The bae_mtpsize function retrieves the size of the graphic workarea available for displaying popup menus or toolbars defined with bae_popshow and/or bae_settbsize. The display area width is returned with the popup menu text columns parameter, whilst the display area height is returned with the popup menu text rows parameter. The bae_charsize function can be utilized to convert these values to standard length units.
See also
Functions bae_charsize, bae_popshow, bae_twsize, bae_settbsize.

bae_nameadd - Add BAE name selection list element (STD)

Synopsis
int bae_nameadd(              // Name list index/ID or (-1) on error
      string;                 // Name
      string;                 // Date string
      string;                 // Date sort string
      int;                    // Sort mode:
                              //    0 = append (no sorting)
                              //    1 = sort alphanumerically
                              //    2 = sort numerically
                              //    3 = sort by date
                              //    4 = sort for ID creation
      );
Description
The bae_nameadd function adds a name entry to the BAE name selection list. This list is used by the bae_askname function for activating name selection dialogs. The bae_nameclr function can or/should be used prior to the first bae_nameadd call to clear any previously stored entries from the name selection list. The function returns a name list index/ID or (-1) on error.
See also
Functions bae_askname, bae_nameclr, bae_nameget.

bae_nameclr - Clear BAE name selection list (STD)

Synopsis
void bae_nameclr(
      );
Description
The bae_nameclr function clears the name list currently defined with bae_nameadd.
See also
Functions bae_askname, bae_nameadd, bae_nameget.

bae_nameget - Get BAE name selection list element (STD)

Synopsis
int bae_nameget(              // Status
      int;                    // Name list index
      & string;               // Returns name
      & string;               // Returns date string
      & string;               // Returns date sort string
      & string;               // Returns comment
      & int;                  // Returns name entry count or name ID
      );
Description
The bae_nameget can be used to query BAE name selection list entries defined by bae_nameadd. The function returns zero if the query was successfully or nonzero otherwise.
See also
Functions bae_askname, bae_nameadd, bae_nameclr.

bae_numstring - Create numeric string (STD)

Synopsis
string bae_numstring(         // Returns numeric string
      double;                 // Input value
      int [0,[;               // Maximum precision
      );
Description
The bae_numstring converts the input value into a string with the specified precision (number of decimal points.

bae_peekiact - BAE interaction queue query (STD)

Synopsis
int bae_peekiact(             // Returns pending interaction status/type:
                              //    0 = No automatic interaction pending
                              //    1 = Mouse interaction pending
                              //    2 = Text interaction pending
                              //    3 = Menu interaction pending
                              //    4 = Wait key interaction pending
      );
Description
The bae_peekiact can be used to check whether an automatic interaction is pending in the current interaction queue. The function returns a type code for the next automatic interaction queue item, or zero if no automatic interaction is pending.
See also
Functions bae_storekeyiact, bae_storemenuiact, bae_storemouseiact, bae_storetextiact.

bae_plainmenutext - BAE menu item text conversion (STD)

Synopsis
string bae_plainmenutext(     // Returns answer string
      string;                 // Menu item string
      );
Description
The bae_plainmenutext function strips all special characters for menu separator line specifications (%), key accelerators (&), etc. from the specified menu item string. The resulting plain menu item string is returned as function result.
See also
Functions bae_defmenutext, bae_getmenutext.

bae_planddbclass - Get BAE element DDB class code (STD)

Synopsis
int bae_planddbclass(         // Returns BAE element DDB class code (STD1)
      );
Description
The bae_planddbclass functions returns the DDB class code of the currently loaded BAE element. Possible Schematic Editor return values are 800 for SCM sheet, 801 for SCM symbol, 802 for SCM marker or 803 for SCM label. Possible BAE Layout return values are 100 for PCB layout, 101 for layout part, 102 for layout padstack or 103 for layout pad. Possible IC Design return values are 1000 for IC layout, 1001 for IC cell and 1001 for IC pin. The function returns (-1) if no element is loaded.

bae_planename - Get BAE element name (STD)

Synopsis
string bae_planename(         // Returns BAE element name
      );
Description
The bae_planename function returns the element name of the currently loaded BAE element or an empty string if no element is currently loaded.
See also
Function bae_plansename.

bae_planfname - Get BAE element file name (STD)

Synopsis
string bae_planfname(         // Returns BAE element file name
      );
Description
The bae_planfname function returns file name of the currently loaded BAE element or and empty string if no element is currently loaded.
See also
Functions bae_plansfname, bae_setplanfname.

bae_plannotsaved - Get BAE element not saved flag (STD)

Synopsis
int bae_plannotsaved(         // Returns BAE element not saved flag
      );
Description
The bae_plannotsaved function checks whether the currently loaded BAE element has been saved. The functions zero if the element has been saved or 1 if changes have been made since the last save.

bae_plansename - Get BAE destination element name (STD)

Synopsis
string bae_plansename(        // Returns BAE destination element name
      );
Description
The bae_plansename function returns the destination element name of the currently loaded BAE element or an empty string if no element is currently loaded. This function should be used for element name queries during Save As operations.
See also
Function bae_planename.

bae_plansfname - Get BAE destination element file name (STD)

Synopsis
string bae_plansfname(        // Returns BAE destination element file name
      );
Description
The bae_plansfname function returns the destination file name of the currently loaded BAE element or an empty string if no element is currently loaded. This function should be used for element file name queries during Save As operations.
See also
Function bae_planfname.

bae_planwslx - Get BAE element left workspace boundary (STD)

Synopsis
double bae_planwslx(          // Returns left workspace boundary (STD2)
      );
Description
The bae_planwslx function returns the left (lower X) workspace boundary of the currently loaded BAE element.

bae_planwsly - Get BAE element lower workspace boundary (STD)

Synopsis
double bae_planwsly(          // Returns lower workspace boundary (STD2)
      );
Description
The bae_planwsly function returns the lower (lower Y) workspace boundary of the currently loaded BAE element.

bae_planwsnx - Get BAE element origin X coordinate (STD)

Synopsis
double bae_planwsnx(          // Returns origin X coordinate (STD2)
      );
Description
The bae_planwsnx function returns the origin X coordinate of the currently loaded BAE element.

bae_planwsny - Get BAE element origin Y coordinate (STD)

Synopsis
double bae_planwsny(          // Returns origin Y coordinate (STD2)
      );
Description
The bae_planwsny function returns the origin Y coordinate of the currently loaded BAE element.

bae_planwsux - Get BAE element right workspace boundary (STD)

Synopsis
double bae_planwsux(          // Returns right workspace boundary (STD2)
      );
Description
The bae_planwsux function returns the right (upper X) workspace boundary of the currently loaded BAE element.

bae_planwsuy - Get BAE element upper workspace boundary (STD)

Synopsis
double bae_planwsuy(          // Returns upper workspace boundary (STD2)
      );
Description
The bae_planwsuy function returns the upper (upper Y) workspace boundary of the currently loaded BAE element.

bae_popareachoice - Define choice field in active BAE popup menu (STD)

Synopsis
int bae_popareachoice(        // Returns status
      double [0.0,[;          // From row number
      double [0.0,[;          // From column number
      double [0.0,[;          // To row number
      double [0.0,[;          // To column number
      string;                 // Selection return string
      );
Description
The bae_popareachoice function defines a rectangular selection field in the currently active popup menu area. The active popup menu area is selected with the bae_popsetarea function and can be either the standard popup menu area to be defined and/or displayed with bae_popshow or the toolbar menu area to be defined and/or displayed with bae_settbsize. The selection area is defined with the text row and column range function parameters, whereas row zero refers to the top of the popup area and column zero refers to the left of the popup area. The bae_tbsize function can be used to retrieve the current toolbar dimensions. The bae_charsize function can be utilized to convert text coordinates to standard length units. The selection return string parameter defines the answer string to be returned with the bae_readtext function on selections in the defined choice area. The function returns (-1) on missing and/or invalid parameter specifications, 1 if a button was created, or zero otherwise.
See also
Functions bae_charsize, bae_popcolbar, bae_popcolchoice, bae_popsetarea, bae_popshow, bae_poptext, bae_poptextchoice, bae_readtext, bae_settbsize, bae_tbsize.

bae_popcliparea - Define clipping area in active BAE popup menu (STD)

Synopsis
void bae_popcliparea(
      int [0,1];              // Clipping enable flag:
                              //    0 = disable clipping
                              //    1 = enable clipping
      double [0.0,[;          // From row number
      double [0.0,[;          // From column number
      double [0.0,[;          // To row number
      double [0.0,[;          // To column number
      );
Description
The bae_popcliparea function enables (clipping enable flag nonzero) and/or disables (clipping enable flag zero) clipping in the currently active BAE popup menu area. The active popup menu area is selected with the bae_popsetarea function and can be either the standard popup menu area to be defined and/or displayed with bae_popshow or the toolbar menu area to be defined and/or displayed with bae_settbsize. Clipping is most useful for restricting graphic output to certain areas when displaying polygons in popup areas and/or toolbars using the bae_popdrawpoly function. The clipping area is defined with the text row and column range function parameters, whereas row zero refers to the top of the popup area and column zero refers to the left of the popup area. The bae_charsize function can be utilized to convert text coordinates to standard length units.
See also
Functions bae_charsize, bae_popdrawpoly, bae_popsetarea, bae_popshow, bae_settbsize.

bae_popclrtool - Clear BAE toolbar popup area (STD)

Synopsis
void bae_popclrtool(
      );
Description
The bae_popclrtool function can be used to clear and/or deactivate all elements from the current toolbar area.
See also
Functions bae_popsetarea, bae_settbsize.

bae_popcolbar - Define BAE popup menu color bar display (STD)

Synopsis
int bae_popcolbar(            // Returns nonzero on error
      double [0.0,[;          // From row number
      double [0.0,[;          // From column number
      double [0.0,[;          // To row number
      double [0.0,[;          // To column number
      int [0,[;               // Color value (STD18)
      );
Description
The bae_popcolbar function defines a non-selectable color bar in the popup menu previously activated by bae_popshow. The color bar size and position emerge from the specified row and column parameters with the zero coordinate [0,0] referring to the top left corner of the popup area. The color bar's color is specified with the given color value parameter. The function returns nonzero on invalid parameter specifications.
See also
Functions bae_popcolchoice, bae_popshow, bae_poptext, bae_poptextchoice.

bae_popcolchoice - Define BAE popup menu color bar selector (STD)

Synopsis
int bae_popcolchoice(         // Returns nonzero on error
      double [0.0,[;          // From row number
      double [0.0,[;          // From column number
      double [0.0,[;          // To row number
      double [0.0,[;          // To column number
      int [0,[;               // Color value (STD18)
      string;                 // Answer string to be returned
      );
Description
The bae_popcolchoice function defines a mouse-selectable color bar in the popup menu previously activated by bae_popshow. The color bar size and position emerge from the specified row and column parameters with the zero coordinate [0,0] referring to the top left corner of the popup area. The color bar's color is specified with the given color value parameter. The function returns nonzero on invalid parameter specifications. The selection of a color bar defined with bae_popcolchoice can be enabled through a call to the bae_readtext function. The bae_readtext return value is then set to the bae_popcolchoice answer string parameter.
See also
Functions bae_popcolbar, bae_popshow, bae_poptext, bae_poptextchoice, bae_readtext.

bae_popdrawpoly - Display/draw polygon in active BAE popup menu (STD)

Synopsis
int bae_popdrawpoly(          // Returns status
      int [0,[;               // Polygon color (STD18)
      int [0,3];              // Polygon drawing mode (STD19)
      int [0,15];             // Polygon fill mode (STD20)
      );
Description
The bae_popdrawpoly function draws the internal polygon defined with the bae_storepoint function to the currently active popup menu area using the color, drawing mode and filling properties specified with the corresponding function parameters. The active popup menu area is selected with the bae_popsetarea function and can be either the standard popup menu area to be defined and/or displayed with bae_popshow or the toolbar menu area to be defined and/or displayed with bae_settbsize. The polygon display can be restricted to a certain popup menu region using the bae_popcliparea function. The bae_popareachoice function can be utilized for allowing the polygon display or certain parts of it to be selected with the bae_readtext function. The bae_setpopdash function can be used to set the base length for dash lines. The bae_clearpoints function can be used to clear the internal polygon data to prepare for subsequent polygon definitions. The function returns zero if the polygon was drawn without errors or nonzero otherwise.
See also
Functions bae_clearpoints, bae_dialbmpalloc, bae_popareachoice, bae_popcliparea, bae_popcolbar, bae_popcolchoice, bae_popdrawtext, bae_popsetarea, bae_popshow, bae_readtext, bae_setpopdash, bae_settbsize, bae_storepoint.

bae_popdrawtext - Display/draw text in active BAE popup menu (STD)

Synopsis
int bae_popdrawtext(          // Returns status
      int;                    // Text row
      int;                    // Text column
      int [0,[;               // Text display color (STD18)
      int [0,[;               // Text background color (STD18)
      string;                 // Text string
      );
Description
The bae_popdrawtext function displays the given text string at the specified row and column coordinates in the currently active popup menu area using the colors specified for text display and background. The active popup menu area is selected with the bae_popsetarea function and can be either the standard popup menu area to be defined and/or displayed with bae_popshow or the toolbar menu area to be defined and/or displayed with bae_settbsize. The bae_charsize function can be utilized to convert text coordinates to standard length units. The bae_popareachoice function can be utilized for allowing the text display or certain parts of it to be selected with the bae_readtext function. The function returns zero if the text was displayed without errors or nonzero otherwise.
See also
Functions bae_charsize, bae_dialbmpalloc, bae_popareachoice, bae_popdrawpoly, bae_popsetarea, bae_popshow, bae_readtext, bae_settbsize.

bae_popmouse - Get BAE popup/toolbar mouse position (STD)

Synopsis
void bae_popmouse(
      & double;               // Returns mouse X coordinate/column
      & double;               // Returns mouse Y coordinate/row
      & int;                  // Returns mouse state:
                              //    Bit 1 : Left mouse button pressed
                              //    Bit 2 : Right mouse button pressed
                              //    Bit 3 : Middle mouse button pressed
      );
Description
The bae_wsmouse function retrieves the current mouse coordinates (column and row) with the popup and/or toolbar area. The mouse state return parameter can be used to designate which mouse buttons are currently pressed.
See also
Function bae_wsmouse.

bae_poprestore - Restore BAE popup menu area (STD)

Synopsis
void bae_poprestore(
      );
Description
The bae_poprestore function releases and restores the popup graphic work area previously defined with bae_popshow.
See also
Function bae_popshow.

bae_popsetarea - Clear BAE toolbar popup area (STD)

Synopsis
void bae_popsetarea(
      int                     // Popup area code:
                              //    0 = Popup menu area
                              //    1 = Toolbar area
                              //    2..31 = Dialog bitmap area
      );
Description
The bae_popsetarea function activates the toolbar area (popup area code 1), the standard popup menu area (popup area code 2) or a dialog bitmap area (popup area code and/or popup bitmap number 2 through 31) for subsequent popup operations such as bae_popareachoice, bae_popcliparea, bae_popdrawpoly or bae_popdrawtext. The standard popup menu area is defined and/or displayed with the bae_popshow function. The toolbar popup menu area is defined and/or displayed with the bae_settbsize function. On default, the standard popup menu area is selected for popup operations.
See also
Functions bae_dialbmpalloc, bae_popareachoice, bae_popcliparea, bae_popdrawpoly, bae_popdrawtext, bae_popshow, bae_settbsize.

bae_popshow - Activate BAE popup menu (STD)

Synopsis
int bae_popshow(              // Returns nonzero on error
      & double [0.0,[;        // Popup rows count
      & double [0.0,[;        // Popup columns count
      & double [0,1.0];       // Popup percentage left boundary
      & double [0,1.0];       // Popup percentage bottom boundary
      & double [0,1.0];       // Popup percentage right boundary
      & double [0,1.0];       // Popup percentage top boundary
      );
Description
The bae_popshow function defines and generates a popup menu with the given parameters. The popup menu position and size emerge from the specified popup boundary parameters; the given values are interpreted relatively to the available graphic work area size; the boundary values range from 0.0 (minimum and/or left/lower boundary) to 1.0 (maximum and/or right/upper boundary). The bae_mtpsize function can be used for determining the number of columns and/or rows available for popup display. The requested popup size is specified with the popup row and column count input parameters. These parameters are automatically re-calculated by bae_popshow to denote the row and column counts actually visible in the given popup area boundaries. The function returns nonzero on invalid and/or inconsistent parameter specifications. The popup menu colors for texts, background and frame are taken from the corresponding BAE setup menu color values stored with the bsetup utility program. The bae_popareachoice, bae_popcolbar, bae_popcolchoice, bae_popdrawpoly, bae_popdrawtext, bae_poptext and bae_poptextchoice functions can be used after calling bae_popshow to define selectable and non-selectable color bars, text buttons, graphic display and selection areas in the popup menu. The popup menu item selections can be enabled by calling the bae_readtext function.
Warning
The bae_poprestore function must be used to release and/or restore any graphic work area occupied by a popup menu.
See also
Functions bae_mtpsize, bae_popareachoice, bae_popcliparea, bae_popcolbar, bae_popcolchoice, bae_popdrawpoly, bae_popdrawtext, bae_poprestore, bae_popsetarea, bae_poptext, bae_poptextchoice, bae_readtext, bae_settbsize, and BAE utility program bsetup.

bae_poptext - Define BAE popup menu text display (STD)

Synopsis
int bae_poptext(              // Returns nonzero on error
      double [0.0,[;          // Text row number
      double [0.0,[;          // Text column number
      string;                 // Text string
      );
Description
The bae_poptext function defines a non-selectable text in the popup menu previously activated by bae_popshow. The text display position emerges from the specified row and column parameters with the zero coordinate [0,0] referring to the top left corner of the popup area. The text to be displayed is specified with the given text string parameter. The function returns nonzero on invalid parameter specifications.
See also
Functions bae_popcolbar, bae_popcolchoice, bae_popshow, bae_poptextchoice.

bae_poptextchoice - Define BAE popup menu text selector (STD)

Synopsis
int bae_poptextchoice(        // Returns nonzero on error
      double [0.0,[;          // Text row number
      double [0.0,[;          // Text column number
      string;                 // Text string
      string;                 // Answer string to be returned
      );
Description
The bae_poptextchoice function defines a mouse-selectable text in the popup menu previously activated by bae_popshow. The text display position emerges from the specified row and column parameters with the zero coordinate [0,0] referring to the top left corner of the popup area. The text to be displayed is specified with the given text string parameter. The function returns nonzero on invalid parameter specifications. The selection of a text button defined with bae_poptextchoice can be enabled through a call to the bae_readtext function. The bae_readtext return value is then set to the bae_poptextchoice answer string parameter.
See also
Functions bae_popcolbar, bae_popcolchoice, bae_popshow, bae_poptext, bae_readtext.

bae_postprocess - Run BAE postprocess (STD)

Synopsis
void bae_postprocess(
      );
Description
The bae_postprocess function runs a BAE postprocess on the currently loaded element. On layout level, the BAE postprocess forces a connectivity update and a design rule check.

bae_progdir - Get BAE program directory path name (STD)

Synopsis
string bae_progdir(           // Returns BAE program directory path
      );
Description
The bae_progdir function returns the currently valid BAE programs directory path name. This information is useful for accessing data in the BAE programs directory (e.g., system color tables, aperture tables, etc.).

bae_prtdialog - Print string to BAE dialogue line (STD)

Synopsis
void bae_prtdialog(
      string;                 // Message string
      );
Description
The bae_prtdialog function displays the specified message string in the BAE status line.
See also
Function perror.

bae_querydist - Query BAE point to polygon distance (STD)

Synopsis
int bae_querydist(            // Returns status
      double;                 // Query X coordinate (STD2)
      double;                 // Query Y coordinate (STD2)
      & double;               // Query distance return value (STD2)
      );
Description
The bae_querydist gets the distance between the point specified through the X and Y coordinate parameters and the internal distance query polygon previously stored with the bae_storedistpoly function. The resulting distance is returned with the last function parameter. The distance value is positive for points outside the distance query polygon and negative for points inside the distance query polygon. The function returns zero if no error occurred or nonzero on error (missing distance query polygon).
See also
Function bae_storedistpoly.

bae_readedittext - BAE text input/display (STD)

Synopsis
string bae_readedittext(      // Returns answer string
      string;                 // Prompt string
                              //    ! prefix: Multiline text input/edit
                              //    otherwise: Single line text input
      string;                 // Default answer string
      int [0,[;               // Maximum input string length
      );
Description
The bae_readedittext function activates a text edit dialog with the prompt string being displayed in the dialog title bar. A multiline edit window instead of a single-line text edit box is activated if the first prompt string character is a quotation mark (!). The size of the dialog window can be changed if in multiline edit mode. The text edit box contents is initialyzed with the specified default answer string. The edit dialog provides an OK button for accepting the input and an Abort button for cancelling the text input operation. The maximum input/aswer string length is limited through the third function parameter. Abort causes the default answer string instead of the current edit text to be returned to the caller. The multiline text edit dialog provides additional buttons for loading contents from selectable input files into the text edit window (Load) and for saving the current edit text to output files (Save).
Warning
BAE Demo does not provide the option for saving the edit text and also deactivates the Windows context menu function for copying the edit text onto the clipboard.
See also
Function bae_readtext.

bae_readtext - BAE text input with popup menu (STD)

Synopsis
string bae_readtext(          // Returns answer string
      string;                 // Prompt string
      int;                    // Maximum input string length
      );
Description
The bae_readtext function asks the user for a string value. The required interaction is indicated by the given prompt string. The user input string value is passed with the function return value. The maximum keyboard input string length is specified with the corresponding function parameter. Mouse click input text is returned if previously enabled with the bae_setmousetext function; such mouse click default text input is disabled through the bae_readtext call. Popup menu item selections are simultaneously enabled by bae_readtext if a popup menu was previously defined with the bae_popshow function and mouse click text input is disabled. Possible popup menu selections are defined through bae_popcolchoice and/or bae_poptextchoice. The function return value is retrieved from the corresponding answer string parameters.
Warning
The bae_readtext function deactivates all selection elements previously defined with bae_popcolchoice, bae_poptextchoice or bae_setmousetext.
See also
Functions bae_popcolchoice, bae_popshow, bae_poptextchoice, bae_readedittext, bae_setmousetext.

bae_redefmainmenu - BAE main menu redefinition start (STD)

Synopsis
int bae_redefmainmenu(        // Returns status
      );
Description
The bae_redefmainmenu function starts the (re)definition of the main menu of the currently active BAE module. The function returns (-1) on error or zero otherwise. After calling bae_redefmainmenu, the bae_defmenu (to be terminated with bae_endmenu) should be applied for defining the main menu entries. Then the bae_defselmenu (to be terminated with bae_endmenu) can be applied for configuring the submenus. Between bae_defmenu or bae_defselmenu calls and the call to bae_endmenu the bae_defmenutext function should be applied for defining the menu entries. The menu definition initiated with bae_redefmenu must be terminated by a call to the bae_endmainmenu function. The bae_resetmenuprog function can be used to reset all menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_defmenu, bae_defmenuprog, bae_defmenutext, bae_defselmenu, bae_endmainmenu, bae_endmenu, bae_redefmenu, bae_resetmenuprog.

bae_redefmenu - Redefine BAE menu item (STD)

Synopsis
int bae_redefmenu(            // Returns status
      int [0,999];            // Menu number
      int [0,99];             // Menu line
      string;                 // Menu text
      int;                    // BAE menu function code (STD4)
      int;                    // Menu entry processing key:
                              //    8000000h = always available
                              //    7FFFFFFh = available for each element type
                              //    else     = (combined) DDB class processing key
      );
Description
The bae_redefmenu function assigns the specified menu text and the BAE menu function to the given menu entry. The menu number specifies the number of the main menu, whilst the menu line designates the position in the according submenu. The menu entry processing key activates ghost menu configurations. The processing key is a coded integer value as retrieved and/or defined using the bae_getclassbitfield and bae_getmenubitfield functions (the hex value 80000000h can be used to allow for application in any case). The function returns (-1) on error or zero otherwise. The bae_resetmenuprog function can be used to reset all menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_defmenuprog, bae_getclassbitfield, bae_getmenubitfield, bae_redefmenu, bae_resetmenuprog.

bae_resetmenuprog - Reset BAE menu definitions (STD)

Synopsis
void bae_resetmenuprog(
      );
Description
The bae_resetmenuprog function resets all key and menu assignments, thus restoring the default menu configuration of the currently active BAE module.
See also
Functions bae_deffuncprog, bae_defkeyprog, bae_defmenu, bae_defmenuprog, bae_defmenutext, bae_defselmenu, bae_redefmainmenu, bae_redefmenu.

bae_sendmsg - Send BAE HighEnd message (STD/HighEnd)

Synopsis
int bae_sendmsg(              // Returns status
      string;                 // Message text string
      int [0,1];              // Send to projects members only flag
      );
Description
The bae_sendmsg function is only available in BAE HighEnd. The function return value is nonzero if called outside BAE HighEnd or on invalid parameter specifications. bae_sendmsg sends the specified message string to the BAE HighEnd message system. The second parameter controls whether the message should be send to all other BAE modules started in the same session or only to those BAE program instances which are currently processing elements from the same DDB file. A BAE HighEnd session is started with a BAE call and includes any other BAE program instance subsequently started with the New Task function from the BAE main menu or with the Next SCM Window function from the Schematic Editor. Each BAE HighEnd module receiving a message automatically activates the User Language program named bae_msg. If bae_msg is not available, the system tries to start an interpreter-specific User Language program (scm_msg in the Schematic Editor, ged_msg in the Layout Editor, ar_msg in the Schematic Editor, etc.). The bae_getmsg function must be used in the *_msg User Language program to retrieve pending messages. Pending messages are only available during the execution of the *_msg User Language program, i.e., any message not retrieved by *_msg is lost. The message text string can be used to trigger certain actions in the destination program instances.
See also
Function bae_getmsg.

bae_setanglelock - Set BAE angle lock flag (STD)

Synopsis
int bae_setanglelock(         // Returns status
      int [0,1];              // Required angle lock flag (STD9)
      );
Description
The bae_setanglelock function sets the current BAE angle lock mode (0=angle unlocked, 1=angle locked). The function returns nonzero if an invalid angle lock flag value has been specified.
See also
Function bae_getanglelock.

bae_setbackgrid - Set BAE display grid (STD)

Synopsis
int bae_setbackgrid(          // Returns status
      double [0.0,[;          // Required X display grid (STD2)
      double [0.0,[;          // Required Y display grid (STD2)
      );
Description
The bae_setbackgrid function sets the BAE X/Y display grid values. Zero grid values refer to switched-off grids. The function returns nonzero, if invalid grid values are specified.
See also
Function bae_getbackgrid.

bae_setclipboard - Store text string to (Windows) clipboard (STD)

Synopsis
int bae_setclipboard(         // Returns status
      string;                 // Text string
      );
Description
The bae_setclipboard function saves the specified text string to the Windows clipboard. The function returns zero if done, or nonzero on error.

bae_setcolor - Set BAE color value (STD)

Synopsis
int bae_setcolor(             // Returns status
      int;                    // Display item type (SCM1|LAY9|ICD9)
      int;                    // Color value (STD18)
      );
Description
The bae_setcolor function sets the color for the given display item type to the specified value. The display item type value must be set according to the currently active User Language Interpreter environment. The function returns nonzero on error.
Warning
To avoid redundant screen redraws at the color table redefinition, the bae_setcolor system function does not perform a screen redraw. I.e., it is the responsibility of the caller to trigger screen redraws as required at the end of a color table definition sequence.
See also
Function bae_getcolor.

bae_setcoorddisp - Set BAE coordinate display mode (STD)

Synopsis
int bae_setcoorddisp(         // Returns status
      int [0,1];              // Required coordinate display mode (STD7)
      );
Description
The bae_setcoorddisp function sets the current BAE coordinate display mode. The display mode is passed with the parameter, where 0 designates mm display units (micrometer in IC Design) and 1 designates Inch display units (mil units in IC Design). The function returns nonzero for invalid display mode parameters or zero otherwise.
See also
Function bae_getcoorddisp.

bae_setdblpar - Set BAE double parameter (STD)

Synopsis
int bae_setdblpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = maximum dialog box width
                              //    1 = maximum dialog box height
                              //    2 = display zoom factor
                              //    3 = Rubberband corner radius (STD2)
                              //    4 = Rubberband X vector coordinate (STD2)
                              //    5 = Rubberband Y vector coordinate (STD2)
                              //    6 = fixed X pick coordinate (STD2)
                              //    7 = fixed Y pick coordinate (STD2)
                              //  [ 8 = System parameter - no write access ]
                              //  [ 9 = System parameter - no write access ]
                              //    10 = Screen pick aperture (STD2)
                              //    11 = Element selection preview area relative size [0.05, 0.95]
                              //  [ 12 = System parameter - no write access ]
                              //  [ 13 = System parameter - no write access ]
      double;                 // Parameter value
      );
Description
The bae_setdblpar function is used to set Bartels AutoEngineer double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The bae_getdblpar function can be used to query parameter values set with bae_setdblpar.
See also
Functions bae_getdblpar, bae_getintpar, bae_getstrpar, bae_setintpar, bae_setstrpar.

bae_setgridlock - Set BAE grid lock flag (STD)

Synopsis
int bae_setgridlock(          // Returns status
      int [0,1];              // Required grid lock flag (STD8)
      );
Description
The bae_setgridlock function sets the current BAE grid lock mode (0=grid unlocked, 1=grid locked). The function returns nonzero if an invalid grid lock flag value was specified.
See also
Function bae_getgridlock.

bae_setgridmode - Set BAE grid dependency mode (STD)

Synopsis
int bae_setgridmode(          // Returns status
      int [0,255];            // Automatic gid setting mode:
                              //    0x01: input grid = 0.25 × display grid
                              //    0x02: input grid = 0.50 × display grid
                              //    0x04: input grid = 1.00 × display grid
                              //    0x08: input grid = 2.00 × display grid
                              //    0x10: display grid = 0.25 × input grid
                              //    0x20: display grid = 0.50 × input grid
                              //    0x40: display grid = 1.00 × input grid
                              //    0x80: display grid = 2.00 × input grid
      );
Description
The bae_setgridmode function sets the BAE grid dependency mode. The function returns nonzero if an invalid grid dependency mode was specified.
See also
Function bae_getgridmode.

bae_setinpgrid - Set BAE input grid (STD)

Synopsis
int bae_setinpgrid(           // Returns status
      double [0.0,[;          // Required X input grid (STD2)
      double [0.0,[;          // Required Y input grid (STD2)
      );
Description
The bae_setinpgrid function sets the BAE X/Y input grid values. Zero grid values refer to switched-off grids. The function returns nonzero if invalid grid values are specified.
See also
Function bae_getinpgrid.

bae_setintpar - Set BAE integer parameter (STD)

Synopsis
int bae_setintpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Input coordinate range check mode:
                              //        0 = range check enabled
                              //        1 = range check disabled
                              //    1 = Module change autosave mode:
                              //        0 = autosave without prompt
                              //        1 = prompt before autosave
                              //    2 = Display disable mode:
                              //        0 = display enabled check
                              //        1 = display disabled
                              //  [ 3 = Menu/mouse mode: ]
                              //  [     system parameter write-protected ]
                              //    4 = Workspace text color mode:
                              //        0 = standard colors
                              //        1 = inverted standard colors
                              //        2 = workspace related colors
                              //    5 = Load display mode:
                              //        0 = display overview after load
                              //        1 = handle load display in bae_load
                              //    6 = File dialog view:
                              //        0 = old BAE style file selection
                              //        1 = Explorer style default view
                              //        2 = Explorer style list view
                              //        3 = Explorer style details
                              //        4 = Explorer style small icons
                              //        5 = Explorer style large icons
                              //        6 = Use default style and size
                              //    7 = Element selection box mode:
                              //        0 = display name only
                              //        1 = display name and date
                              //    8 = Element selection sort mode:
                              //        0|1 = sort by name
                              //        2 = sort numerically
                              //        3 = sort by date
                              //    9 = Inverted placement visibility flag:
                              //        0 = placed elements visible
                              //        1 = unplaced elements visible
                              //  [ 10 = Last file system error: ]
                              //  [     system parameter write-protected ]
                              //    11 = Command history disable flag:
                              //        0 = Command history enabled
                              //        1 = Command history disabled
                              //    12 = Popup menu mouse warp mode:
                              //        0 = No popup menu mouse warp
                              //        1 = First popup menu entry mouse warp
                              //        2 = Preselected menu entry mouse warp
                              //        +4 = Mouse position restore warp
                              //        +8 = Element pick position warp
                              //    13 = Save disable flag:
                              //        0 = save enabled
                              //        1 = save disabled
                              //    14 = Mouse rectangle min. size:
                              //        ]0,[ = min. rectangle size
                              //    15 = Menu selection mouse info display flag:
                              //        0 = no continuous info display
                              //        1 = continuous info display
                              //    16 = Next dialog box id
                              //    17 = Last created tooltip id
                              //    18 = Polygon drop count
                              //    19 = Polygon check disabled flag:
                              //        0 = Enable polygon check
                              //        1 = Disable polygon check
                              //    20 = Cursor key grid mode:
                              //        0 = Input grid
                              //        1 = Pixel grid
                              //    21 = Unsaved plan flag
                              //    22 = Element batch load mode:
                              //        0 = no batch load
                              //        1 = Batch load
                              //        2 = batch load, restore zoom window
                              //    23 = Grid lines display:
                              //        0 = Dot grid
                              //        1 = Line grid
                              //    24 = Display mirroring flag
                              //    25 = Input grid display flag
                              //    26 = Mouse function repeat mode:
                              //        0 = Repeat menu function
                              //        +1 = Repeat keystroke function
                              //        +2 = Repeat context menu function
                              //  [ 27 = Maximum Undo/Redo count: ]
                              //  [     system parameter write-protected ]
                              //    28 = Menu tree view mode:
                              //        0 = No menu tree view window
                              //        1 = Left attached menu tree view window
                              //        2 = Right attached menu tree view window
                              //    29 = Menu tree view pixel width
                              //    30 = Message history disabled flag
                              //    31 = Element load message mode:
                              //        0 = Standard message
                              //        1 = User message
                              //        2 = User error message
                              //    32 = Pick marker display mode:
                              //        0 = Circle marker
                              //        1 = Diamond marker
                              //    33 = Mouse drag status:
                              //        0 = No mouse drag
                              //        1 = Request mouse drag
                              //        2 = Mouse dragged
                              //        3 = Request mouse drag release
                              //    34 = Menu function repeat request flag
                              //    35 = Function aborted flag
                              //    36 = Plan selection preview flag
                              //    37 = File error display mode:
                              //        0 = Status message only
                              //        1 = Confirm message box
                              //    38 = Element selection reference display mode:
                              //        0 = Display project file references
                              //        1 = Display library file references
                              //    39 = Mouse double-click mode:
                              //        0 = Map double-click and select 0 to right mouse button
                              //        1 = Ignore double-click
                              //        2 = Map double-click to right mouse button
                              //    40 = Mouse pick double-click mode:
                              //        0 = Map double-click to right mouse button
                              //        1 = Ignore double-click
                              //  [ 41 = Dialog control support flags: ]
                              //  [     system parameter write-protected ]
                              //    42 = Progress box display mode:
                              //        0 = No progress box window
                              //        1 = Display progress window
                              //    43 = Progress box abort request flag:
                              //    44 = Middle mouse button disable flag:
                              //  [ 45 = Current undo items count: ]
                              //  [     system parameter write-protected ]
                              //  [ 46 = File drag and drop operation flag.: ]
                              //  [     system parameter write-protected ]
                              //    47 = Autoraise BAE window flag
                              //  [ 48 = Menu function active count ]
                              //  [     system parameter write-protected ]
                              //  [ 49 = Internal polygon list point count ]
                              //  [     system parameter write-protected ]
                              //    50 = Alternate configuration file priority
                              //    51 = Dialog position save mode:
                              //        0 = Store absolute coordinates
                              //        1 = Store main window relative coordinates
                              //        2 = Store main window monitor absolute coordinates
                              //    52 = Message box default button index:
                              //        (-1) = No default (Abort or No)
                              //        0-2 = Default button index
      int;                    // Parameter value
      );
Description
The bae_setintpar function is used to set Bartels AutoEngineer integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The bae_getintpar function can be used to query parameter values set with bae_setintpar.
See also
Functions bae_getdblpar, bae_getintpar, bae_getstrpar, bae_setdblpar, bae_setstrpar.

bae_setmoduleid - Set BAE module id (STD)

Synopsis
int bae_setmoduleid(          // Status
      string;                 // Module id
      );
Description
The bae_setmoduleid sets a name/identification for the currently active BAE program module. The function returns zero if the module id was successfully assigned or nonzero on error.
See also
Function bae_getmoduleid.

bae_setmousetext - Set BAE mouse click input text (STD)

Synopsis
int bae_setmousetext(         // Returns nonzero on error
      string;                 // Answer text string to be returned
      );
Description
The bae_setmousetext function enables the specified answer string to be the default mouse click return value for the next bae_readtext call. The next call to bae_readtext resets the mouse click default text.
See also
Function bae_readtext.

bae_setplanfname - Set BAE project file name (STD)

Synopsis
int bae_setplanfname(         // Returns status
      string;                 // BAE project file name
      );
Description
The bae_setplanfname function sets the BAE DDB project file name. The .ddb file name extension if a BAE project file name without file name extension is specified. The function returns zero if the BAE project file name was successfully assigned, 1 if parameter specifications are missing and/or invalid or 2 if a BAE project file name is already assigned through the currently loaded element.
See also
Function bae_planfname.

bae_setpopdash - Set BAE popup/toolbar polygon dash line parameters (STD)

Synopsis
void bae_setpopdash(
      double ]0.0,[;          // Dash base length (STD2)
      double ]-0.5,0.5[;      // Dash relative spacing
      );
Description
The bae_setpopdash function sets the base length and the relative spacing for dash lines to be created in popup menus and/or toolbars with the bae_popdrawpoly function.
See also
Function bae_popdrawpoly.

bae_setstrpar - Set BAE string parameter (STD)

Synopsis
int bae_setstrpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Current element comment text
                              //    1 = Current element specification
                              //  [ 2 = System parameter - no write access ]
                              //  [ 3 = System parameter - no write access ]
                              //    4 = Crosshair info text
                              //    5 = Tooltip text
                              //  [ 6 = System parameter - no write access ]
                              //    7 = Menu text of currently active funktion
                              //    8 = Current menu item element text
                              //    9 = Current element load user message
                              //    10 = Clipboard text string
                              //    11 = Next module call file argument
                              //    12 = Next module call element argument
                              //    13 = Next module call command/type argument
                              //    14 = Last output file name
                              //  [ 15 = System parameter - no write access ]
                              //    16 = Toolbar button character/resource item
                              //  [ 17 = System parameter - no write access ]
                              //  [ 18 = System parameter - no write access ]
                              //    19 = Alternate configuration data directory
                              //    20 = Local data column
                              //    21 = Global data column
      string;                 // Parameter value
      );
Description
The bae_setstrpar function is used to set Bartels AutoEngineer string system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The bae_getstrpar function can be used to query parameter values set with bae_setstrpar.
See also
Functions bae_getdblpar, bae_getintpar, bae_getstrpar, bae_setdblpar, bae_setintpar.

bae_settbsize - Define/display BAE toolbar area (STD)

Synopsis
void bae_settbsize(
      double [0.0,[;          // Toolbar size
      int [0,3];              // Toolbar attachment mode:
                              //    0 = horizontally attached to
                              //         lower workspace boundary
                              //    1 = vertically attached to
                              //         right workspace boundary
                              //    2 = horizontally attached to
                              //         upper workspace boundary
                              //    3 = vertically attached to
                              //         left workspace boundary
      );
Description
The bae_settbsize function defines and/or displays a toolbar. The first parameter specifies the desired toolbar size depending on the attachment mode, i.e., with vertical attachment the toolbar size is interpreted as column count, whilst with horizontal attachment the toolbar size is interpreted as row count. A zero toolbar size specification can be used to fade out a currently visible toolbar. The dimension of the graphic area available for displaying toolbars can be retrieved with the bae_mtpsize function. The bae_tbsize function can be used to retrieve the current toolbar dimensions. The bae_popsetarea function activates either the toolbar or the standard popup menu for subsequent popup operations. The bae_popclrtool function can be used to clear and/or deactivate all elements from the current toolbar area.
See also
Functions bae_mtpsize, bae_popclrtool, bae_popsetarea, bae_tbsize.

bae_storecmdbuf - Store BAE command to command history (STD)

Synopsis
int bae_storecmdbuf(          // Returns status
      int [0,[;               // Command store mode
                              //    0 : append command to history
      string;                 // Command (sequence) string
      string;                 // Command notification text
      );
Description
The bae_storecmdbuf function adds the specified command to the current BAE command history. The command store mode is used to specify the location for storing the command in the history and/or whether or how the command history should be reorganized. The command (sequence) string and the command notification text (as displayed in the title bar) are specified through the second and third function parameter. The function returns zero if the assignment was successful or non-zero otherwise.
See also
Function bae_getcmdbuf.

bae_storedistpoly - Store internal BAE distance query polygon (STD)

Synopsis
int bae_storedistpoly(        // Status
      );
Description
The bae_storedistpoly function stores the internal polygon created with bae_clearpoints and bae_storepoint as distance query polygon. The bae_querydist can then be used to query the distance between a given point and the distance query polygon. The bae_cleardistpoly function can be used to delete the distance query polygon. The function returns zero if no error occurred, (-1) if the internal distance query polygon is already defined or (-2) in case of invalid polygon data.
See also
Functions bae_cleardistpoly, bae_clearpoints, bae_querydist, bae_storepoint.

bae_storeelem - Store BAE element (STD)

Synopsis
int bae_storeelem(            // Returns status
      string;                 // File name
      string;                 // Element name
      );
Description
The bae_storeelem function stores the currently loaded BAE element to the specified file (i.e., this function is equivalent to Save Element As function from the File menu). The function returns 0 if the element has been successfully stored, 1 on invalid function parameters, 2 if no BAE element is currently loaded or (-1) on file access errors.

bae_storekeyiact - Store BAE key-press interaction to queue (STD)

Synopsis
void bae_storekeyiact(
      int [0,3];              // Automatic interaction mode (STD21)
      int;                    // Key character code (ASCII)
      );
Description
The bae_storekeyiact function stores a key-press interaction to the interaction queue to be passed to a bae_callmenu-activated BAE menu function. The given key character code is automatically passed if the interaction flag is set, otherwise an interactive user input is required.
See also
Functions bae_peekiact, bae_storemenuiact, bae_storemouseiact, bae_storetextiact.

bae_storemenuiact - Store BAE menu interaction to queue (STD)

Synopsis
void bae_storemenuiact(
      int [0,3];              // Automatic interaction mode (STD21)
      int;                    // Menu line number (0..n-1)
      int [1,3];              // Mouse key (STD17)
      );
Description
The bae_storemenuiact function stores a menu interaction to the interaction queue to be passed to a bae_callmenu-activated BAE menu function. The given menu selection with mouse-click is passed automatically passed if the interaction flag is set, otherwise an interactive user input is required.
See also
Functions bae_peekiact, bae_storekeyiact, bae_storemouseiact, bae_storetextiact.

bae_storemouseiact - Store BAE mouse interaction to queue (STD)

Synopsis
void bae_storemouseiact(
      int [0,3];              // Automatic interaction mode (STD21)
      double;                 // Mouse X coordinate (STD2)
      double;                 // Mouse Y coordinate (STD2)
      int [0,15];             // Mouse coordinate mode:
                              //    0 = use given coordinates with snap to input grid
                              //    1 = use old mouse coordinates
                              //    2 = use given coordinates gridless
                              //    +4 = set mouse pointer to specified position
                              //    +8 = activate BAE window
      int [0,3];              // Mouse key code (STD17)
      [];                     // Keyboard input
      );
Description
The bae_storemouseiact function stores a mouse interaction to the interaction queue to be passed to a bae_callmenu-activated BAE menu function. The given positioning with mouse-click is automatically passed if the interaction flag is set, otherwise an interactive user input is required. A character must be passed to the keyboard input parameter if the mouse key code is set to zero.
See also
Functions bae_callmenu, bae_peekiact, bae_storekeyiact, bae_storemenuiact, bae_storetextiact.

bae_storepoint - Store point to internal BAE polygon (STD)

Synopsis
int bae_storepoint(           // Returns status
      double;                 // Point X coordinate (STD2)
      double;                 // Point Y coordinate (STD2)
      int [0,2];              // Point type (STD15)
      );
Description
The bae_storepoint function stores the specified point to the internal polygon point list. The function returns nonzero if invalid point parameters have been specified. The internal polygon point list is required for generating polygons or traces using the module-specific *_storepoly and/or *_storepath functions or the bae_storedistpoly function. The internal BAE polygon can be deleted/cleared with the bae_clearpoints function.
See also
Functions bae_clearpoints, bae_getpolyrange, bae_storedistpoly.

bae_storetextiact - Store BAE text input interaction to queue (STD)

Synopsis
void bae_storetextiact(
      int [0,3];              // Automatic interaction mode (STD21)
      string;                 // Input text string
      );
Description
The bae_storetextiact function stores a text input interaction to the interaction queue to be passed to a bae_callmenu-activated BAE menu function. The given text string is automatically passed if the interaction flag is set, otherwise an interactive user input is required.
See also
Functions bae_peekiact, bae_storekeyiact, bae_storemenuiact, bae_storemouseiact.

bae_swconfig - Get BAE software configuration (STD)

Synopsis
int bae_swconfig(             // Returns software configuration code:
                              //    (-1) = invalid configuration class,
                              // for configuration class 0:
                              //    0 = unknown system
                              //    1 = Bartels ACAD-PCB 
                              //    2 = BAE Professional 
                              //    3 = BAE HighEnd 
                              // for configuration class 1:
                              //    0 = not BAE Demo software
                              //    1 = BAE Demo software
                              //    2 = BAE FabView software
                              // for configuration class 2:
                              //    nonzero = BAE Economy software
                              // for configuration class 3:
                              //    0 = BAE standard menu screen
                              //    1 = BAE Windows standard menu
                              //    2 = BAE Windows pull-down menu
                              //    3 = BAE Motif standard menu
                              //    4 = BAE Motif pull-down menu
                              // for configuration class 4:
                              //    nonzero = BAE Light software
                              // for configuration class 5:
                              //    0 = no BAE Schematics software
                              //    1 = BAE Schematics 
                              //    2 = BAE HighEnd Schematics
                              // for configuration class 6:
                              //    BAE version build number
      int;                    // Configuration class:
                              //    0 = BAE software system query
                              //    1 = BAE Demo software check
                              //    2 = BAE Economy software check
                              //    3 = BAE user interface type query
                              //    4 = BAE Light software check
                              //    5 = BAE Schematics software check
                              //    6 = BAE version build number query
      );
Description
The bae_swconfig function returns the currently active BAE software configuration. This information is required for performing correct menu selections using bae_defmenuprog, bae_callmenu and bae_store*iact calls in different software configurations such as BAE Professional, BAE HighEnd, BAE Economy and/or BAE Light, or in different user interfaces such as BAE standard user interface or BAE pull-down user interface under DOS/X11, Windows or Motif.
See also
Function bae_swversion.

bae_swversion - Get BAE software version (STD)

Synopsis
string bae_swversion(         // Returns software version string
                              //    or operating system setting
      int;                    // Software version query mode:
                              //    0 = BAE version number
                              //    1 = BAE release year (format YY)
                              //    2 = BAE release year (format YYYY)
                              //    3 = Operating system specific
                              //         pattern for arbitrary string match
                              //         (e.g., * under Linux, .* under MS-DOS)
                              //    4 = Operating system specific
                              //         directory name delimiter
                              //         (e.g., / under Linux, \ under MS-DOS)
      );
Description
The bae_swversion function returns BAE software version information or operating system specific BAE settings according to the specified software version query mode.
See also
Function bae_swconfig.

bae_tbsize - Get BAE toolbar dimensions (STD)

Synopsis
void bae_tbsize(
      & double;               // Returns toolbar text columns
      & double;               // Returns toolbar text rows
      );
Description
The bae_tbsize function retrieves the size of the toolbar area currently defined with the bae_settbsize function. The toolbar width is returned with the toolbar text columns parameter, whilst the toolbar height is returned with the toolbar text rows parameter. The bae_charsize function can be utilized to convert these values to standard length units.
See also
Functions bae_charsize, bae_mtpsize, bae_settbsize.

bae_twsize - Get BAE text screen workspace size (STD)

Synopsis
void bae_twsize(
      & int;                  // Returns text column count
      & int;                  // Returns text row count
      );
Description
The bae_twsize function determines the current size of the BAE text screen workarea. The text screen size is returned through the parameters, with the first parameter returning the text column count, and the second parameter returning the text row count. These functions are useful for dynamically adapting output routines to the BAE graphic environment.
See also
Function bae_mtpsize.

bae_wswinlx - Get BAE workspace window left boundary (STD)

Synopsis
double bae_wswinlx(           // Left workspace window boundary (STD2)
      );
Description
The bae_wswinlx function returns the left boundary coordinate of the currently visible workspace window.

bae_wswinly - Get BAE workspace window lower boundary (STD)

Synopsis
double bae_wswinly(           // Lower workspace window boundary (STD2)
      );
Description
The bae_wswinly function returns the lower boundary coordinate of the currently visible workspace window.

bae_wswinux - Get BAE workspace window right boundary (STD)

Synopsis
double bae_wswinux(           // Right workspace window boundary (STD2)
      );
Description
The bae_wswinux function returns the right boundary coordinate of the currently visible workspace window.

bae_wswinuy - Get BAE workspace window upper boundary (STD)

Synopsis
double bae_wswinuy(           // Upper workspace window boundary (STD2)
      );
Description
The bae_wswinuy function returns the upper boundary coordinate of the currently visible workspace window.

bae_wsmouse - Get BAE workspace mouse position (STD)

Synopsis
void bae_wsmouse(
      & double;               // Returns mouse X coordinate (STD2)
      & double;               // Returns mouse Y coordinate (STD2)
      & int;                  // Returns mouse state:
                              //    Bit 0 : Beyond left workspace boundary
                              //    Bit 1 : Beyond right workspace boundary
                              //    Bit 2 : Beyond lower workspace boundary
                              //    Bit 3 : Beyond upper workspace boundary
                              //    Bit 4 : Left mouse button pressed
                              //    Bit 5 : Right mouse button pressed
                              //    Bit 6 : Middle mouse button pressed
      );
Description
The bae_wsmouse function retrieves the current mouse coordinates within the graphic workarea. The mouse state return parameter can be used to designate which mouse buttons are currently pressed or whether the mouse coordinates exceed any of the workspace boundaries.
See also
Function bae_popmouse.

catext - Concatenate file name extension (STD)

Synopsis
void catext(
      & string;               // File name
      string;                 // File name extension
      );
Description
The catext function appends the specified file name extension to the file name provided with the first function parameter if that file name doesn't have this extension yet.
See also
Function catextadv.

catextadv - Optionally concatenate file name extension (STD)

Synopsis
void catextadv(
      & string;               // File name
      string;                 // File name extension
      int;                    // Extension mode:
                              //   0 = Apply extension only if
                              //        no extension yet
                              //   1 = Assume file name contains
                              //        none or specified extension
                              //   2 = Force specified extension
      );
Description
The catextadv function optionally appends the specified file name extension to the specified file name. The extension mode parameter control whether and/or under which circumstances the extension is appended.
See also
Function catext.

ceil - Ceiling function (STD)

Synopsis
double ceil(                  // Returns result value
      double;                 // Input value
      );
Description
The ceil function calculates and returns the smallest "integer" greater than or equal to the specified input double value.

clock - Get elapsed processor time (STD)

Synopsis
double clock(                 // Returns elapsed CPU time (seconds)
      );
Description
The clock function returns (in seconds) the CPU time elapsed since the start of the currently active BAE program module. This value should be used only for comparison purposes.

con_clear - Delete internal logical net list (STD)

Synopsis
void con_clear(
      );
Description
The con_clear function deletes the net list data previously stored with con_storepart and/or con_storepin from main memory. con_clear should always be applied before the first call to con_storepart to avoid net list mix with previously stored net data. The con_clear function should also be called as soon as the net list data is not needed any more, e.g., after finishing a net list transformation since otherwise you might run short of main memory.
See also
Functions con_storepart, con_storepin, con_write.

con_compileloglib - Compile logical library definition (STD)

Synopsis
int con_compileloglib(        // Returns status
      string;                 // DDB destination file name
      string;                 // Logical library definition file name
      string;                 // Logical library definition
      );
Description
The con_compileloglib function compiles the given logical library definition(s) and stores the compiled loglib definition(s) to the DDB destination file specified with the first function parameter. The logical library definition(s) must be provided according to the loglib utility program input format specification. con_compileloglib compiles either the logical library definition file specified with the second function parameter or the logical library definition passed through the third function parameter. The NULL keyword can be specified to ignore either of these parameters. The function returns zero if the compilation was successful or nonzero otherwise.
See also
Functions con_compileloglib, con_getlogpart, lay_deflibname, scm_defloglname; BAE utility program loglib.

con_deflogpart - Define a logical library part entry (STD)

Synopsis
int con_deflogpart(           // Returns status
      string;                 // DDB destination file name
      string;                 // Logical library part name
      string[];               // Physical library part name
      int [0,1];              // Default assignment flag
      );
Description
The con_deflogpart function stores the given logical library part definition to the name-specified DDB destination file. The defined assignment of a physical library part to a logical part is requested by the BAE Packager for transferring logical to physical net lists. The library entry defined through con_deflogpart is an 1-to-1 assignment, i.e., the Packager does not perform any pin name transformations. Note that gates, pin/gate swaps, power supply pins or attribute assignments cannot be defined with con_deflogpart. A virtual part assignment is defined if an empty string is specified for the physical library part name. Alternate package types are defined if a list of multiple strings is given for the physical library part name. The $plname attribute can be utilized for physical part name assignments if the default assignment flag is set. The function returns zero on successful library part definition, (-1) on missing and/or invalid parameters or (-2) on library file access errors.
See also
Functions con_deflogpart, con_getlogpart; BAE utility program loglib.

con_getddbpattrib - Get part/pin attribute from DDB file (STD)

Synopsis
int con_getddbpattrib(        // Returns status
      string;                 // DDB file name
      string;                 // Part name
      string;                 // Pin name
      & string;               // Attribut name
                              //   or empty string for plan name
                              //   or ! for first attribute
                              //   or !$attrname for next attribute
      & string;               // Attribute value
      );
Description
The con_getddbpattrib function gets a part or pin attribute value from a DDB file. The function returns 1 if the attribute value has been found, zero if the attribute does not exist or (-1) on file access errors. Part attributes are searched if an empty pin name is specified; otherwise pin attributes are searched. The selected attribute name is returned with the attribute name function parameter if a placeholder (! or !$attrname) is specified for the attribute name.
See also
Function con_setddbpattrib.

con_getlogpart - Get a logical library part definition (STD)

Synopsis
int con_getlogpart(           // Returns status
      string;                 // LOGLIB DDB file name
      string;                 // Logical library part name
      int;                    // Output columns
      & string;               // Returns logical library definition
      );
Description
The con_getlogpart function extracts ASCII-formatted logical library part definition of the name-specified logical part. The function returns zero on successful part definition extraction, (-1) on missing and/or invalid parameters, (-2) if the DDB file is not available, (-3) if the logical library part is not available or (-4) on logical library part load errors. The LOGLIB DDB file name is supposed to be a job file name or the default Packager layout library name which can be determined using either the scm_defloglname or the lay_deflibname function.
See also
Functions con_compileloglib, con_deflogpart, lay_deflibname, scm_defloglname; BAE utility program loglib.

con_setddbpattrib - Store part/pin attribute to DDB file (STD)

Synopsis
int con_setddbpattrib(        // Returns status
      string;                 // DDB file name
      string;                 // Part name
      string;                 // Pin name
      string;                 // Attribute name
      string;                 // Attribute value
      );
Description
The con_setddbpattrib function sets a part or pin attribute value in the given DDB file. The function returns nonzero on error. The part name is required; the specified part must be defined in the net list of the given DDB file. The pin name is optional. The attribute value is considered a part attribute value if an empty string is specified for the pin name; otherwise, a pin attribute assignment is assumed. Neither part nor pin names can contain upper case letters. The attribute name must start with the percent sign ($) and must not contain upper case letters. The attribute value can be an empty string for resetting previously assigned attribute values. Attribute value strings can be stored with a maximum length of up to 40 characters. For PA_NILVAL attribute value specifications, the attribute value assignment for the specified attribute is removed to mimic the behaviour of No Value button in the Schematic Editor
See also
Function con_getddbpattrib.

con_storepart - Store part to internal logical net list (STD)

Synopsis
int con_storepart(            // Returns status
      string;                 // Logical part name
      string;                 // Logical part library name
      );
Description
The con_storepart function stores the given logical part to the internal logical net list kept in main memory. The function returns zero if the part has been successfully stored, (-1) on missing and/or invalid parameters or (-2) if the part is already defined. The internal logical net list can be written to a DDB file using the con_write function.
Warning
Main memory is allocated when using the con_store* functions. The con_clear function should be called as soon as the net data is not needed any more, or otherwise you might run short of main memory.
See also
Functions con_clear, con_storepin, con_write.

con_storepin - Store pin to internal logical net list (STD)

Synopsis
int con_storepin(             // Returns status
      string;                 // Logical part name
      string;                 // Logical part pin name
      string;                 // Net name
      );
Description
The con_storepin function stores the given logical part pin to the internal logical net list kept in main memory. The corresponding part must be stored already with the con_storepart function. The pin is not connected if an empty string is specified for the net name; otherwise the pin is connected to the specified net. The net entry is automatically generated if no net with the given name exists. The function returns zero if the part pin has been successfully stored, (-1) on missing and/or invalid parameters, (-2) if the part is not yet defined, (-3) if the pin is already connected to the net list or (-4) on net list overflow. The internal logical net list can be written to a DDB file using the con_write function.
Warning
Main memory is allocated when using the con_store* functions. The con_clear function should be called as soon as the net data is not needed any more, or otherwise you might run short of main memory.
See also
Functions con_clear, con_storepart, con_write.

con_write - Write internal logical net list to file (STD)

Synopsis
int con_write(                // Returns status
      string;                 // DDB file name
      string;                 // Net list element name
      );
Description
The con_write function stores internal logical net list generated with the con_store* function to the specified net list element name in the given DDB file. con_write also deletes the internal logical net list from memory. The function returns zero if the net list has been successfully written, (-1) on missing and/or invalid parameters, (-2) if no internal net list data is available or (-3) on net list write errors. The net list format produced by con_write is identical to the format generated by the Schematic Editor of the Bartels AutoEngineer, i.e., the net lists generated with con_write can be transformed to the Bartels AutoEngineer layout system using the Packager.
Warning
The con_* functions provide powerful tools for transforming third party net lists to the Bartels AutoEngineer. It is strongly recommended to check destination files before storing net lists with the con_write function to avoid conflicts with other net list data already defined in the destination file.
See also
Functions con_clear, con_storepart, con_storepin.

convstring - Convert string (STD)

Synopsis
string convstring(            // Returns converted string
      string;                 // Input string
      int;                    // Conversion mode:
                              //    0 = Get file name without extension
                              //    1 = Get file name without directory path
                              //    2 = Get file name without extension and directory path
      );
Description
The convstring function converts the input string according to the specified conversion mode and returns the converted string.

cos - Cosine (STD)

Synopsis
double cos(                   // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The cos function calculates and returns the cosine value of the given angle value. The input angle value must be in radians.

cosh - Hyperbolic cosine (STD)

Synopsis
double cosh(                  // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The cosh function calculates and returns the hyperbolic cosine value of the given angle value. The input angle value must be in radians.

cvtangle - Convert an angle value (STD)

Synopsis
double cvtangle(              // Returns angle value
      double;                 // Input angle value
      int [0,3];              // Input angle units
      int [0,3];              // Output angle units
      );
Description
The cvtangle function converts the specified angle value from input units to output units and returns the resulting angle value. Valid input/output angle unit codes are 0 for internal units (radians, STD3), 1 for degree units (180/pi radians), 2 for radians (STD3) or 3 for grad units (200/pi radians).

cvtlength - Convert a length value (STD)

Synopsis
double cvtlength(             // Returns length value
      double;                 // Input length value
      int [0,4];              // Input length units
      int [0,4];              // Output length units
      );
Description
The cvtlength function converts the specified length value from input units to output units and returns the resulting length value. Valid input/output length unit codes are 0 for internal units (meter, STD2), 1 for inch units, 2 for millimeter units (mm), 3 for mil units (1/1000 inch) or 4 for micrometer units (um).

ddbcheck - Check DDB file/element availability (STD)

Synopsis
int ddbcheck(                 // Returns query status
      string;                 // DDB file name
      int;                    // DDB element class (STD1)
                              //    or (-1) for valid DDB file check
      string;                 // Element name or empty string for any class element check
      );
Description
The ddbcheck function checks whether an element with the specified DDB class and element name exists in the DDB file specified with the DDB file name parameter. If (-1) is specified instead of a valid DDB class code, then ddbcheck only checks whether the specified file is a DDB file. If an empty element name string is specified, then ddbcheck only checks whether the DDB file contains any element of the specified DDB class. The function returns zero if the DDB object was found and/or accessible or (-1) otherwise.
See also
Functions ddbclassscan, ddbelemrefcount, ddbelemrefentry,

ddbclassid - Get DDB class identifier (STD)

Synopsis
string ddbclassid(            // Returns DDB class identifier or empty string
      int ]0,[;               // DDB element class (STD1)
      );
Description
The ddbclassid function returns the DDB class identifier for the specified DDB class code. An empty string is returned on invalid/unknown DDB class specifications.

ddbclassscan - Scan DDB class elements (STD)

Synopsis
int ddbclassscan(             // Returns scan status
      string;                 // DDB file name
      int ]0,[;               // Element class code (STD1)
      * int;                  // Element name callback function
      );
Description

The ddbclassscan function scans all elements matching the specified DDB class in the given DDB file. A user-defined callback function (see below) is automatically activated for each element scanned, unless the keyword NULL is specified for the corresponding parameter. The function returns either the number of scanned elements or (-1) on invalid parameter specifications and/or errors from the callback function.

Element name callback function definition
int callbackfunction(         // Continue scan request flag
      string ename            // Element name
      )
{
      // Element name callback function statements
      :
      return(scanstatus);
}

The element name callback function return value should be 1 for scan continue request, 0 for scan stop request or (-1) on error.

See also
Functions ddbcheck, ddbelemrefcount, ddbelemrefentry.

ddbcopyelem - Copy DDB file element (STD)

Synopsis
int ddbcopyelem(              // Returns status
      string;                 // DDB source file name
      string;                 // DDB destination file name
      int ]0,[;               // DDB database class code (STD1)
      string;                 // DDB element name
      int [0,1];              // Delete allowed (merge source) flag:
                              //    0 = do not overwrite existing
                              //        elements in destination file
                              //    1 = allow overwriting of existing
                              //        elements in destination file
      );
Description
The ddbcopyelem function copies the named DDB element of the specified DDB database class from the DDB source file to the DDB destination file. The DDB element name is preserved during the copy, i.e., the source and destination files must be different. The copy includes all dependent and/or referenced elements of the selected DDB element. The merge source switch parameter designates whether existing elements in the destination file can be overwritten (merge source; source file is master) or not (merge destination; destination file is master). The function returns zero if the copy operation was successful or (-1) otherwise (invalid/missing parameters or DDB file access failure).
Warnings
The ddbcopyelem function is not subject to the Undo/Redo facility since it works on DDB file level. It is strongly recommended to use this function with care to prevent from unintentionally overwriting BAE design and/or system data.
See also
Functions ddbdelelem, ddbrenameelem.

ddbdelelem - Delete DDB file element (STD)

Synopsis
int ddbdelelem(               // Returns status
      string;                 // DDB file name
      int ]0,[;               // DDB database class code (STD1)
      string;                 // DDB element name
      );
Description
The ddbdelelem function deletes the named DDB file element of the specified DDB database class code from the given DDB file. The function returns zero if the delete operation was successful or (-1) otherwise (invalid/missing parameters or DDB file access failure).
Warnings
The ddbdelelem function is not subject to the Undo/Redo facility since it works on DDB file level. It is strongly recommended to use this function with care to prevent from unintentionally deleting BAE design and/or system data.
See also
Functions ddbcopyelem, ddbrenameelem.

ddbelemrefcount - Get DDB file element reference count (STD)

Synopsis
int ddbelemrefcount(          // Returns reference count or (-1)
      string;                 // DDB file name
      int ]0,[;               // DDB database class code (STD1)
      string;                 // DDB element name
      );
Description
The ddbelemrefcount function retrieves the number of library elements referenced by the specified DDB element. The DDB element is specified with the corresponding DDB file name, DDB class code and element name function parameters. The function returns (-1) if the specified DDB element does not exist or cannot be accessed. The ddbelemrefentry function can be used to retrieve the DDB database class codes and the element names of selected library references of a DDB element.
See also
Functions ddbelemcheck, ddbclassscan, ddbelemrefentry.

ddbelemrefentry - Get DDB file element reference entry (STD)

Synopsis
int ddbelemrefentry(          // Returns reference count or (-1)
      string;                 // DDB file name
      int ]0,[;               // DDB database class code (STD1)
      string;                 // DDB element name
      int ]0,[;               // Reference entry list index
      & int ]0,[;             // Reference entry DDB database class code (STD1)
      & string;               // Reference entry name
      );
Description
The ddbelemrefentry function retrieves the DDB database class code and the element name of the library element referenced by the DDB element specified with the DDB file name, DDB database class code and element name function parameters. The reference entry to be queried is specified with the reference list index parameter. The ddbelemrefcount function can be used to retrieve the number of DDB element library reference entries. This value also designates the valid reference list index range to be specified for selecting a specific DDB element reference entry. The function returns zero if the query was successful or (-1) otherwise.
See also
Functions ddbcheck, ddbclassscan, ddbelemrefcount.

ddbgetelemcomment - Get DDB file element comment (STD)

Synopsis
int ddbgetelemcomment(        // Returns status
      string;                 // DDB file name
      int ]0,[,               // DDB database class (STD1)
      string;                 // DDB element name
      & string;               // Returns comment string
      );
Description
The ddbgetelemcomment function is used to query DDB file element comments which have been assigned with the ddbsetelemcomment function. The functions returns zero if the query was successful or (-1) otherwise (missing/invalid parameters or DDB access failure).
See also
Function ddbsetelemcomment.

ddbgetlaypartpin - Get DDB file layout part pin data (STD)

Synopsis
int ddbgetlaypartpin(         // Returns status:
                              //    ( 0) = no error, pin query successful
                              //    (-1) = DDB file access error
                              //    (-2) = Invalid parameters
                              //    (-3) = Layout part symbol not found
                              //    (-4) = Pin not defined
      string;                 // DDB file name
      string;                 // Layout part symbol name
      int [0,[;               // Pin index
      & string;               // Pin name
      & string;               // Pin symbol name
      & double;               // Pin X position (STD2)
      & double;               // Pin Y position (STD2)
      & double;               // Pin rotation angle (STD3)
      & int;                  // Pin mirror mode (STD14)
      );
Description
The ddbgetlaypartpin function can be used to query layout part symbol pin information on DDB file level. Repetitive function calls with incremented pin index and the pin not defined return value as abort criteria can be applied for iterating all pins of an existing layout part symbol.
See also
Functions ddbcheck, ddbclassscan, ddbelemrefcount, ddbelemrefentry.

ddbrenameelem - Rename DDB file element (STD)

Synopsis
int ddbrenameelem(            // Returns status
      string;                 // DDB file name
      int ]0,[,               // DDB database class (STD1)
      string;                 // Old DDB element name
      string;                 // New DDB element name
      );
Description
The ddbrenameelem changes the element name of the specified DDB file element. The function returns zero if the rename operation was successful or (-1) otherwise (invalid/missing parameters or DDB file access failure).
Warnings
The ddbrenameelem function is not subject to the Undo/Redo facility since it works on DDB file level. It is strongly recommended to use this function with care to prevent from unintentionally renaming BAE design and/or system data.
See also
Functions ddbcopyelem, ddbdelelem.

ddbsetelemcomment - Set DDB file element comment (STD)

Synopsis
int ddbsetelemcomment(        // Returns status
      string;                 // DDB file name
      int ]0,[,               // DDB database class (STD1)
      string;                 // DDB element name
      string;                 // Comment string
      );
Description
The ddbsetelemcomment function can be used to assign comment texts to DDB file elements for subsequent queries with the ddbgetelemcomment function. The functions returns zero if the assignement was successful or (-1) otherwise (missing/invalid parameters or DDB access failure). ddbsetelemcomment sets DDB element comments not only in DDB files but also in main memory if the processed DDB element is currently loaded in the Bartels AutoEngineer.
See also
Function ddbgetelemcomment.

ddbupdtime - Get DDB file element update time (STD)

Synopsis
int ddbupdtime(               // Returns status
      string;                 // Input DDB file name
      int [100,[;             // Input DDB element class code (STD1)
      string;                 // Input DDB element name
      & int;                  // Returns update time seconds
      & int;                  // Returns update time minutes
      & int;                  // Returns update time hours
      & int;                  // Returns update time days
      & int;                  // Returns update time months
      & int;                  // Returns update time year
      );
Description
The ddbupdtime function gets the date and time of the last change performed on the specified DDB file element. The function returns 1 on success, 0 if the DDB file element has not been found or (-1) on file access error or invalid parameters.

dirscan - Scan directory (STD)

Synopsis
int dirscan(                  // Returns scan status
      string;                 // Directory path name
      string;                 // File name extension:
                              //    .EXT = denotes extension
                              //    .*   = all files/subdirectories
      * int;                  // File name callback function
      );
Description
The dirscan function scans the specified directory for all file and/or subdirectory names matching the file name extension. A user-defined callback function (see below) is activated automatically for each file name scanned, unless the keyword NULL is specified for the corresponding parameter. The function returns either the number of scanned file names or (-1) on invalid parameter specifications and/or errors from the callback function.
File name callback function
int callbackfunction(         // Continue scan request flag
      string fname            // File name
      )
{
      // File name callback function statements
      :
      return(scanstatus);
}

The file name callback function return value should be 1 for scan continue request, 0 for scan stop request, or (-1) on error.


existddbelem - Check DDB file element (STD)

Synopsis
int existddbelem(             // Returns status
      string;                 // Input DDB file name
      int [100,[;             // Input DDB element class code (STD1)
      string;                 // Input DDB element name
      );
Description
The existddbelem function checks if the specified DDB file element exists. The function returns 1 if the DDB file element has been found, 0 if the DDB file element has not been found or (-1) on file access error or invalid parameters.

exit - Terminate a program immediately (STD)

Synopsis
void exit(
      int;                    // Return status
      );
Description
The exit function terminates the currently active User Language program immediately and passes the specified status code to the program caller.
Warning
The return status is not evaluated by the Bartels User Language Interpreter.
See also
Function ulsystem_exit.

exp - Exponential function (STD)

Synopsis
double exp(                   // Returns result value
      double;                 // Input value
      );
Description
The exp function calculates and returns the exponential value of the given input value.

fabs - Absolute value of a double (STD)

Synopsis
double fabs(                  // Returns result value
      double;                 // Input value
      );
Description
The fabs function calculates and returns the absolute value of the given double value.

fclose - Close a file (STD)

Synopsis
int fclose(                   // Returns status
      int;                    // File handle
      );
Description
The fclose function closes the file specified with the given file handle. The function returns nonzero on file close errors.

fcloseall - Close all files opened by the program (STD)

Synopsis
int fcloseall(                // Returns status
      );
Description
The fcloseall function closes all files opened by the currently active User Language program. The function returns nonzero on file close errors.

feof - Test for end-of-file (STD)

Synopsis
int feof(                     // Returns status
      int;                    // File handle
      );
Description
The feof function checks if the end of the file specified with the given file handle is reached. The function returns nonzero on end-of-file or zero otherwise.

fgetc - Read next character from file (STD)

Synopsis
int fgetc(                    // Returns character code (or -1 if EOF)
      int;                    // File handle
      );
Description
The fgetc function reads the next character from the file specified with the given file handle. The fucntion returns the read character code on success or (-1) on file read errors or end-of-file (these states should be distinguished with the feof function; the file function error handling mode must be set accordingly with the fseterrmode function).

fgets - Read next line of text from file (STD)

Synopsis
int fgets(                    // Returns status
      & string;               // Returns text string
      int;                    // Maximum text string length
      int;                    // File handle
      );
Description
The fgetc function reads the next line of text from the file specified with the given file handle. Reading stops after a newline character is encountered or if the number of characters stored to the result string exceeds the maximum text string length. The return value is nonzero on file read errors or end-of-file (these states should be distinguished with the feof function; the file functions error handling mode must be set accordingly with the fseterrmode function).

filemode - Get file mode (STD)

Synopsis
int filemode(                 // Return file name
      string;                 // File name
      );
Description
The filemode return the access mode of the specified file. The return value is 0 for write access, 1 for read-only access, or (-1) on file access failure.
See also
Functions filesize, filetype.

filesize - Get file size (STD)

Synopsis
int filesize(                 // File size in bytes or (-1) on error
      string;                 // File name
      );
Description
The filesize function returns the size of the specified file in bytes or (-1) on file access failure.
See also
Functions filemode, filetype.

filetype - Get file type (STD)

Synopsis
int filetype(                 // Returns file type:
                              //    (-1) = file access failure
                              //    ( 0) = directory
                              //    ( 1) = regular file
                              //    ( 2) = character mode file
      string;                 // File name
      );
Description
The filetype function returns the type of the specified file or (-1) if file access failure.
See also
Functions filemode, filesize.

floor - Floor function (STD)

Synopsis
double floor(                 // Returns result value
      double;                 // Input value
      );
Description
The floor function calculates and returns the largest "integer" not greater than the specified input double value.

fmod - Floating point remainder (STD)

Synopsis
double fmod(                  // Returns result value
      double;                 // Dividend
      double;                 // Divisor
      );
Description
The fmod function calculates and returns the floating point remainder of the division of the two input values. The result value has the same sign like the dividend. If the division result cannot be represented, the result value is undefined.

fopen - Open a file (STD)

Synopsis
int fopen(                    // Returns status
      string;                 // File name
      int [0,14];             // File access mode:
                              //    0 = r read (the only valid BAE Demo mode without |8)
                              //    1 = w write
                              //    2 = a append
                              //    3 = rb read binary
                              //    4 = wb write binary
                              //    5 = ab append binary
                              //    |8 = autoclose (for BAE Demo write tests)
      );
Description
The fopen function opens the file with the specified file name and provides the required file access. The file access mode is 0 for file read access, 1 for file write access or 2 for file append access. On write access, the file is generated if it does not yet exist. The function returns (-1) on file open errors; on success, the return value is the file handle to be used for subsequent file access functions.
Limitation
When used in BAE Demo software configurations, fopen allows for file read access only.

fprintf - Print to a file using format (STD)

Synopsis
int fprintf(                  // Returns status
      int;                    // File handle
      string;                 // Format string
      []                      // Output parameter list
      );
Description

The fprintf function writes the data contained in the output parameter list to the file specified with the file handle. The format string contains information on how to format the output. The function returns nonzero on file write errors or zero otherwise.

Format string

The format string transforms the subsequent parameter values and performs a formatted output according to the format control information specified with the format string. The format string can contain normal characters and format elements. Normal character sequences are written unchanged whilst a format element causes transformation and formatted output of the next unprocessed output parameter value. Each format element starts with the percent sign % and is delimited by a format control character. The following table lists the valid format control characters for output data type specifications:

CharacterOutput Data Type
dDecimal integer format
oOctal integer format
xHexadecimal integer format (lowercase)
XHexadecimal integer format (uppercase)
uUnsigned decimal integer format
cCharacter format
sString format
eScientific floating point format (lowercase)
EScientific floating point format (uppercase)
fFixed floating point format
ge or f, with shorter form to be used
GE or f, with shorter form to be used
%Print percent sign %

The following output format specifications can be used between the percent sign and the format control character (n = numeric value):

CharacterOutput Format
- left justify (default: right justify)
+ sign output with positive numeric values
SPACE blank output with positive numeric values
# octal output with leading 0
or hexadecimal output with leading 0x or 0X
or output with decimal point for e, E, f, g, G
or zeros after decimal point for g, G
n fieldwidth; i.e., minimum output length
.n precision; i.e., length of output string (with s)
or number of digits after decimal point (with f, g, G)
l long int decimal format (with d, o, x, X)

With e, E, f, g and G, six digits after the decimal point are printed on default. If the * character appears instead of the fieldwidth or precision specification then the corresponding value is taken from the next unprocessed function parameter. A percent sign can be printed by specifying %%. Control characters delimited by a backslash (\) are treated like normal characters.

Warning
The number and types of the parameter values passed to fprintf must match the number of percent sign / format control character pairs specified with the format stringl; otherwise garbage might be printed.
See also
Functions printf, sprintf.

fputc - Write a character to a file (STD)

Synopsis
int fputc(                    // Returns status
      char;                   // Character
      int;                    // File handle
      );
Description
The fputc function writes the given character to the file specified with the file handle. The function returns nonzero on file write error or zero otherwise.

fputs - Write a string to a file (STD)

Synopsis
int fputs(                    // Returns status
      string;                 // String
      int;                    // File handle
      );
Description
The fputs function writes the given string to the file specified with the file handle. The function returns nonzero on file write error or zero otherwise.

frexp - Break double into fraction and exponent (STD)

Synopsis
double frexp(                 // Returns fraction value
      double;                 // Input value
      & int;                  // Returns exponent value
      );
Description
The frexp function breaks the input double value fraction and exponent and returns the calculated fraction value; the exponent is returned with the second parameter.

fseterrmode - Set the file functions error handling mode (STD)

Synopsis
int fseterrmode(              // Returns status
      int [0,1];              // Error handling mode
      );
Description
The fseterrmode function sets the file functions error handling mode. The file error mode 1 causes the interpreter environment to handle file errors. The file error mode 0 leaves the User Language program with the file error handle task. The initial file error handling mode on User Language program calls is 1.
Warning
The file error handling mode should be set to 0, when using the functions fgetc and/or fgets. Otherwise a User Language program might fault with file read errors when reaching end-of-file (see also functions fgetc, fgets).

get_date - Get the current system date (STD)

Synopsis
void get_date(
      & int;                  // Returns day of the month (1..31)
      & int;                  // Returns month of the year (0..11)
      & int;                  // Returns year since 1900
      );
Description
The get_date function returns with its parameters the current system date.

get_time - Get the current system time (STD)

Synopsis
void get_time(
      & int;                  // Returns hours since midnight (0..23)
      & int;                  // Returns minutes after hour (0..59)
      & int;                  // Returns seconds after minute (0..59)
      );
Description
The get_time function returns with its parameters the current system time.

getchr - Get a character from standard input (STD)

Synopsis
char getchr(                  // Returns character
      );
Description
The getchr function activates a character input request (from keyboard) and returns the input character value.

getcwd - Get current working directory path name (STD)

Synopsis
string getcwd(                // Returns path name
      );
Description
The getcwd function returns the path name of the current working directory.

getenv - Get environment variable (STD)

Synopsis
int getenv(                   // Returns status
      string;                 // Variable name
      & string;               // Variable value
      );
Description
The getenv function searches the environment variable list for an entry matching the specified variable name and returns the variable value with the corresponding parameter. The function returns zero if the variable is defined or nonzero otherwise (in which case the variable value parameter is left unchanged).
See also
Function putenv.

getextprog - Get file type specific application (STD)

Synopsis
int getextprog(               // Returns status
      string;                 // File name extension
      & string;               // Command string
      );
Description
The getextprog gets the application command string for opening file types with the specified file name extension. The function returns zero if the query was successful or (-1) if no application/command was found for the specified file name extension.

getstr - Get a line of text from standard input (STD)

Synopsis
int getstr(                   // Returns status
      & string;               // Returns text string
      int;                    // Maximum text string length
      );
Description
The getstr function activates a string input request (from keyboard). Input characters are stored to the return text string parameter until the return/enter key Return/Enter Key (CR) key is pressed or the maximum text string length is reached. The function returns nonzero if invalid parameters have been specified.

isalnum - Test for alphanumeric character (STD)

Synopsis
int isalnum(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isalnum function returns nonzero if the input character is alphanumeric or zero otherwise.

isalpha - Test for alphabetic character (STD)

Synopsis
int isalpha(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isalpha function returns nonzero if the input character is alphabetic or zero otherwise.

iscntrl - Test for control character (STD)

Synopsis
int iscntrl(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The iscntrl function returns nonzero if the input character is a control character or zero otherwise.

isdigit - Test for numeric character (STD)

Synopsis
int isdigit(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isdigit function returns nonzero if the input character is numeric or zero otherwise.

isgraph - Test for visible character (STD)

Synopsis
int isgraph(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isgraph function returns nonzero if the input character is visible or zero otherwise.

islower - Test for lowercase alphabetic character (STD)

Synopsis
int islower(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The islower function returns nonzero if the input character is lowercase alphabetic or zero otherwise.

isprint - Test for printing character (STD)

Synopsis
int isprint(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isprint function returns nonzero if the input character is a printing character (including space) or zero otherwise.

ispunct - Test for punctuation character (STD)

Synopsis
int ispunct(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The ispunct function returns nonzero if the input character is a punctuation character (i.e., a printing character that is not a digit, letter or space) or zero otherwise.

isspace - Test for whitespace character (STD)

Synopsis
int isspace(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isspace function returns nonzero if the input character is a whitespace character (i.e., a space ' ', a form feed \f, a horizontal tab \t, a newline \n, a carriage return \r or a vertical tab \v) or zero otherwise.

isupper - Test for uppercase alphabetic character (STD)

Synopsis
int isupper(                  // Returns boolean test result
      char;                   // Input character
      );
Description
The isupper function returns nonzero if the input character is uppercase alphabetic or zero otherwise.

isxdigit - Test for hexadecimal numeric character (STD)

Synopsis
int isxdigit(                 // Returns boolean test result
      char;                   // Input character
      );
Description
The isxdigit function returns nonzero if the input character is hexadecimal numeric or zero otherwise.

kbhit - Test if key hit (STD)

Synopsis
int kbhit(                    // Keyboard state
      );
Description
The kbhit function returns the current state of the keyboard input. A zero value is returned if no key was pressed. A nonzero return value signals a key was pressed. The key code remains in the keyboard input buffer and can be read with getchr or other keyboard input functions.
See also
Function kbstate.

kbstate - Shift/control/alt key state query (STD)

Synopsis
int kbstate(                  // Keyboard state (bit values):
                              //    0x***1 = Shift pressed
                              //    0x***2 = Ctrl pressed
                              //    0x**1* = Left Alt key pressed
                              //    0x**2* = Right Alt key pressed
      );
Description
The kbstate function can be used to check whether Shift, Ctrl and/or Alt keys are currently pressed.
See also
Function kbhit.

launch - Pass command to operating system without waiting for completion (STD)

Synopsis
int launch(                   // Startup status
      string;                 // Command string
      );
Description
The launch function activates and/or executes the command specified in the command string parameter. The command is used to start and/or execute an application, and control is regained by BAE immediately after passing the command to the Windows operating system (the called application runs independentely from BAE). The function returns zero if the command was successfully launched or nonzero otherwise.
Limitations
The launch function does not work in BAE Demo software configurations.
Requirements

Executing MS-DOS (child) processes through the DOS Extender requires enough conventional memory to be available for running the executable. Conventional memory must be controlled with the -MINREAL and -MAXREAL variables of the Phar Lap 386|DOS Extender. For running User Language programs using the launch function, the corresponding User Language Interpreter environments must be re-configured by applying Phar Lap's redistributed CFIG386 tool as in

>  cfig386 <EXEFILE> -maxreal 0ffffh Return/Enter Key (CR)

where <EXEFILE> must be set to the appropriate User Language Interpreter executable(s) (scm.exe, ged.exe, neurrut.exe, cam.exe, gerview.exe and/or ced.exe).

Warnings

Note that the launch function introduces basic multi-processing/multi-tasking features which are not fully supported on PC-based systems or can cause some problems on network-based workstation systems (depending on whichever OS command is to be executed).

It is strongly recommended to redirect DOS command standard output to temporary files (and use some file view User Language function for display); otherwise DOS standard output overwrites the BAE graphic user interface.

Erroneous DOS command calls cause error output to the screen, thus overwriting the BAE graphic interface. Due to the fact that DOS lacks from some substantial standard features such as redirect error output, this problem can only be solved by refraining and/or preventing from running erroneous DOS commands, e.g., by pre-checking the consistency of each DOS command to be called.

It is strongly recommended to refrain and/or prevent from calling interactive DOS commands and/or application software with the launch function since otherwise the system will "hang up" due to the fact that DOS standard input cannot be redirected from the BAE graphic user interface. It is also strongly recommended to refrain and/or prevent from directly calling UNIX commands which expect some user input (such as more, vi, etc.); this problem can be solved by a command cast to background (&) command shell start where the desired command should be called from (which however might cause a terminal device connection problem under remote login).

See also
Function system.

ldexp - Multiply by a power of 2

Synopsis
double ldexp(                 // Returns result value
      double;                 // Input value
      & int;                  // Exponent
      );
Description
The ldexp function calculates and returns the result of (input double value) multiplied with (2 power exponent value).

localtime - Get local processor system date and time (STD)

Synopsis
double localtime(             // Returns elapsed CPU time (in seconds)
      & int;                  // Returns seconds after minute (0..59)
      & int;                  // Returns minutes after hour (0..59)
      & int;                  // Returns hours since midnight (0..23)
      & int;                  // Returns day of month (1..31)
      & int;                  // Returns month of year (0..11)
      & int;                  // Returns years since 1900
      & int;                  // Returns days since Sunday (0..6)
      & int;                  // Returns days of year (0..365)
      );
Description
The localtime functions returns with its parameters the system time and date (including weekday and day of year). The function returns the elapsed CPU time (in seconds).

log - Natural logarithm; base e (STD)

Synopsis
double log(                   // Returns result value
      double ]0.0,[;          // Input value
      );
Description
The log function calculates and returns the natural logarithm (base e) for the given non-negative input double value.

log10 - Common logarithm; base ten (STD)

Synopsis
double log10(                 // Returns result value
      double ]0.0,[;          // Input value
      );
Description
The log function calculates and returns the common logarithm (base ten) for the given non-negative input double value.

mkdir - Create directory (STD)

Synopsis
int mkdir(                    // Returns status
      string;                 // Directory path name
      );
Description
The mkdir creates a directory with the specified directory path name. The functions returns zero if the directory was successfully created or (-1) if the creation of the directory failed due to missing or wrong parameters or directory access error.

modf - Break double into integer and fractional parts (STD)

Synopsis
double modf(                  // Returns fractional value
      double;                 // Input value
      & double;               // Returns integer value
      );
Description
The modf function breaks the given input double value into integer and fractional parts. The resulting "integer" value is passed with the second parameter. The resulting fractional part is passed with the function return value.

namestrcmp - Name string compare (STD)

Synopsis
int namestrcmp(               // Returns comparison result
      string;                 // First name
      string;                 // Second name
      );
Description
The namestrcmp function compares the specified input strings. A case-insensitive character-by-character alphanumeric comparison is applied. The function returns zero if the strings are equal, (-1) if the first string is smaller than the second string, or 1 if the first string is greater than the second string.
See also
Functions numstrcmp, strcmp.

numstrcmp - Numeric string compare (STD)

Synopsis
int numstrcmp(                // Returns comparison result
      string;                 // First input string
      string;                 // Second input string
      );
Description
The numstrcmp function compares the specified input strings. The function returns zero if the strings are equal, (-1) if the first string is smaller than the second string or 1 otherwise. numstrcmp operates like the strcmp function unless for numeric parts of the compare strings for which numeric comparison is applied. I.e., this results in sequences such as R1, R2, ..., R10, R11 (instead of R1, R10, R11, ..., R2).
See also
Functions namestrcmp, strcmp.

perror - Print error message (STD)

Synopsis
void perror(
      string;                 // Message string
      );
Description
The perror function displays the specified message string in the status line of the BAE user interface. The status line display is inverted for a short moment (single blink effect) to attract the user's attention. The status line is cleared if an empty message string is passed to the function.
See also
Function bae_prtdialog.

pow - Raise a double to a power (STD)

Synopsis
double pow(                   // Returns result value
      double;                 // Base input value
      double;                 // Exponent input value
      );
Description
The pow function calculates and returns the value of (base input value) power (exponent input value).

printf - Print to standard output using format (STD)

Synopsis
void printf(
      string;                 // Format string
      []                      // Parameter list
      );
Description
The fprintf function writes the data contained in the output parameter list to the BAE text output workarea. The format string contains information on how to format the output (see also description of the fprintf function).
See also
Functions fprintf, sprintf.

programid - Get current program name (STD)

Synopsis
string programid(             // Returns program name
      );
Description
The programid function returns the name of the currently active User Language program.

putchr - Write a character to standard output (STD)

Synopsis
int putchr(                   // Returns status
      char;                   // Character
      );
Description
The putchr function writes the specified character to the BAE text output workarea. The function returns nonzero on error.

putenv - Set environment variable (STD)

Synopsis
int putenv(                   // Returns status
      string;                 // Variable name
      string;                 // Variable value
      );
Description
The putenv function assigns a value to the specified operating system environment variable. The function returns zero if the assignment was successfull or (-1) if the variable was not found.
See also
Function getenv.

puts - Write a string to standard output (append NL) (STD)

Synopsis
int puts(                     // Returns status
      string;                 // String
      );
Description
The puts function writes the specified string to the BAE text output workarea and appends a newline. The function returns nonzero on error.

putstr - Write a string to standard output (STD)

Synopsis
int putstr(                   // Returns status
      string;                 // String
      );
Description
The puts function writes the specified string to the BAE text output workarea. The function returns nonzero on error.

quicksort - Sort index list (STD)

Synopsis
int quicksort(                // Returns status
      & void;                 // Index list (integer array)    
      int;                    // Index count
      * int;                  // Element compare function
      );
Description
The quicksort function sorts the specified index list. The return value is 0 if the list was successfully sorted, or (-1) on error.
Element compare callback function
int sortfuncname(
      int idx1,               // Index 1
      int idx2,               // Index 2
      )
{
      // Compare index 1 to index 2
      :
      return(compareresult);
}

The return value of the element compare function must be (-1) if the first index is smaller than the second index, 1 if the first index is greater than the second index, or 0 if both index values are equeal.


remove - Delete a file or directory (STD)

Synopsis
int remove(                   // Returns status
      string;                 // Path name
      );
Description
The remove function deletes the file or directory with the specified path name. The function returns nonzero on error.

rename - Change the name of a file (STD)

Synopsis
int rename(                   // Returns status
      string;                 // Old file name
      string;                 // New file name
      );
Description
The rename function changes the name of a file. The function returns nonzero on error.

rewind - Seek to the beginning of a file (STD)

Synopsis
void rewind(
      int;                    // File handle
      );
Description
The rewind function sets the file pointer of the file specified with the given file handle to the beginning of this file.

rulecompile - Compile a rule definition (STD)

Synopsis
int rulecompile(              // Returns status
      string;                 // Destination file name
      string;                 // Rule name
      string;                 // Rule code
      );
Description
The rulecompile function compiles the specified rule code and saves the compiled rule with the given name to the destination file. The function returns zero on success or non-zero on error.
See also
Function rulesource.

rulesource - Get rule definition source code (STD)

Synopsis
int rulesource(               // Returns status
      string;                 // Rule database file name
      string;                 // Rule name
      & string;                 // Rule source code
      );
Description
The rulesource function retrieves the source code for the named rule definition from the specified rule database file. The rule definition source code is returned as string through the corresponding function parameter. The functions returns zero if the query was successful, (-1) if parameters are missing or invalid, (-2) if the rule database access failed, (-3) if the rule definition wasn't found or (-5) if the rule definition access failed.
See also
Function rulecompile.

scanddbenames - Scan DDB file element names (STD)

Synopsis
int scanddbenames(            // Returns scan status
      string;                 // DDB file name
      int [0,[;               // DDB element class (STD1) or zero for cache flush
      & string;               // Input/output element name
      );
Description
The scanddbenames function scans the DDB file element following the one specified (the name of the scanned element is passed with the element name parameter). The first DDB file element is scanned if the input element name is an empty string. The scan works only in the specified DDB element class. The function returns 1 if an element has been found, 0 if no next element has been found or (-1) on DDB file access errors or invalid parameters.

scandirfnames - Scan directory file names (STD)

Synopsis
int scandirfnames(            // Returns scan status
      string;                 // Directory path name
      string;                 // Name extension:
                              //    .EXT = extension .EXT
                              //    .*   = all files/subdirectories
      & string;               // Input/output name
      );
Description
The scandirfnames function scans the specified directory for the file or directory name entry following the input name specification; the name of the scanned file or directory is passed with the output file name parameter. The first directory name entry is scanned on empty string name input. The scan works only in the specified extension match. The function returns 1 if a name entry has been found, 0 if no next name entry has been found or (-1) on directory access errors or invalid parameters.

setprio - Set BAE process priority (STD)

Synopsis
void setprio(
      int;                    // Process priority value
                              // - Unix/Linux:
                              //   nice priority value
                              // - Windows:
                              //   <0 = HIGH_PRIORITY_CLASS 
                              //    0 = NORMAL_PRIORITY_CLASS 
                              //   >0 = IDLE_PRIORITY_CLASS 
                              // - otherwise ignored
      );
Description
The setprio function sets the priority of the current BAE process according to the specified process priority value.

sin - Sine (STD)

Synopsis
double sin(                   // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The sin function calculates and returns the sine value of the given angle value. The input angle value must be in radians.

sinh - Hyperbolic Sine (STD)

Synopsis
double sinh(                  // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The sinh function calculates and returns the hyperbolic sine value of the given angle value. The input angle value must be in radians.

sprintf - Print to string using format (STD)

Synopsis
int sprintf(                  // Returns decoded character count
      & string;               // Output string
      string;                 // Format string
      string;                 // Format string
      []                      // Parameter list
      );
Description
The sprintf function writes the data contained in the output parameter list to the output string, i.e., sprintf performs a format conversion in memory. The format string contains information on how to format the output (see also the description of the fprintf function). The function returns the number of successfully decoded characters, i.e., the length of the resulting output string.
See also
Functions fprintf, printf.

sqlcmd - SQL command execution (STD)

Synopsis
int sqlcmd(                   // Returns status
      string;                 // Database file name
      string;                 // SQL command
      * int;                  // Data return function
      );
Description

The sqlcmd function is used to control the data transfer from and to a relational database system initialized with sqlinit. This is done via a SQL like query language. The first parameter of the function sqlcmd specifies the name of the database file to be opened for usage. The second parameter specifies the SQL command to be executed for database access. The selected data fields are returned to the caller via the data callback function specified with the third parameter. If no data callback function is used the third function parameter should be set to NULL. The function returns nonzero on missing or invalid parameters or on SQL database errors. In case of a database error, the exact error reason can be determined by the sqlerr function.

SQL Commands

The database query language interpreted by sqlcmd is a restricted subset of the Structured Query Language (SQL) for relational databases. The following basic commands are supported:

create table
drop table
insert into table values
quickinsert into table values
index table
select from table
delete from table
help

The following data types are supported for the representation of data:

KeywordData Type
integerInteger values in range [-2147483648, 2147483647]
float Float values in range [-10^308, 10^308] with a precision of about 15 leading digits
string Strings (enclosed with apostrophes)
booleanLogical value (FALSE or TRUE)
date Date; on input dd/mm/yyyy, on output yyyymmdd
Command create table

The create command generates a database table structure. The command requires a table name and a list of field names and corresponding data types. The field name sequence defined with this list is used for data field output unless an explicit output field order is specified. The syntax of the create command is:

create table tablename ( name1 type1, ..., namen typen ) ;

An index is generated for each database field. Indices are automatically during database queries. The user has not to care about the optimal use of indices. The index for string variables is restricted to the first 39 characters.

Command drop table

The drop command deletes a table structure with table all entries from the database file. The syntax of the drop command is:

drop table tablename ;
Command insert into

The insert command stores a data record to a table. The specified values must match the table definition in number and data type sequence. The syntax of the insert command is:

insert into tablename values ( val1, ..., valn ) ;
Command quickinsert insert into

The quickinsert is similar to the insert command. However, unlike insert, quickinsert does not update any field indices after storing data records into a database table. The index table command (see below) can be used for field index updates after (multiple) quickinsert applications. Performing a single index table call is much quicker than updating indices through repeated insert calls. I.e., quickinsert and index table are useful for quickly inserting large numbers of records into a database. Please note however that data entered with quickinsert is not included in any query results until a index table takes place.

Command index table

The index table command is used to create the field indices for data records which have been inserted into a database table with the quickinsert command (see above). The syntax of the index command is:

index table tablename ;
Command select from

The select command provides a query to the database contents. The set of output records can be restricted to records matching some condition using the optional where clause. All records are returned if no where clause is specified. The syntax of the select command is:

select [ field1, ..., fieldn ] from table1, ..., tablen
       [ where ... ] ; 

The specification of output fields is optional. All database fields are be returned in the order of their definition if no output fields are given. If an output field is defined in more than one table, then this ambiguity must be resolved by the specification of the field name in the form table.field. The same specification must be given, when referring to that field in the where clause. The where clause consists of comparisons which can be combined with the logical operators AND (logical and), OR (logical or) and NOT (logical negation). The comparison operators = (equal), <> (not equal), > (greater than), >= (greater than or equal), < (less than) and <= (less than or equal) are valid for all data types. The PREVTO (select previous similar to pattern string) and NEXTTO (select next similar to pattern string) operators and the string pattern match operator LIKE are additionally provided for the string data type. The right side of these operators represents a pattern string which can contain the wildcard characters % (specifying arbitrary substring) and ? (specifying arbitrary character). The operators of a comparison expression must be type compatible, i.e., of the same data type. The only exception to this rule is the combination of integer and float data types. Terms can consist of operators combining data field references and constants. The operators are + (addition), - (subtraction), * (multiplication), / (division), % (division modulo), UPPER (string conversion to upper case) and LOWER (string conversion to lower case). The following table lists the valid combinations of operators and data types of referenced data fields or constants:

OperatorData Type
+ integer, float, string
- integer, float
* integer, float
/ integer, float
% integer, float
UPPER()string
LOWER()string

The data types date and boolean can be combined by none of the defined operators.

Command delete from

The delete command deletes data records from a database table. The syntax of the delete command is:

delete from tablename [ where ... ] ;

The optional where clause syntax accords to the where clause of the select command. The delete command deletes the data records from a table matching the condition specified with the where clause. All data records of the specified table are deleted if no where clause is specified.

Command cache

The cache command can be used for optionally keeping SQL databases open for multiple read/write SQL operations. These features can be used to avoid time-consuming database open and close operations between multiple SQL read/write operations. Facilitating the SQL cache can increase the performance of certain applications dramatically, especially if SQL databases are accessed over a network. The syntax of cache supports the following commands:

cache read on ;
cache write on ;
cache off ;
Command help

The help command can be used for retrieving information about the database table structures. The syntax of the help command is:

help [ tablename ] ;

The data retrieved with the help command is returned to the caller by the data callback function. The table name specification is optional. If no table name is given, then the help command returns the names of the defined database tables via the table name parameter of the data callback function, i.e., the data callback function is called once per table. If a table name is given, then the help command returns the table field names and data types via the corresponding parameters of the data callback function, i.e. the data callback function is called once for each table field.

Data return function
int datafunc(
      string dstr,            // String or date
      int  dint,              // Integer or logical value
      double ddbl,            // Float value
      int dval,               // Data valid flag:
                              //   0 = invalid data
                              //   1 = valid data
      int dtype,              // Data field type:
                              //   2 = integer
                              //   3 = float
                              //   4 = string
                              //   5 = date (format "yyyymmdd")
                              //   6 = logical value (0=FALSE,1=TRUE)
      string dtable,          // Table name
      string dfield,          // Data field name
      int didx                // Data output field index
      )
{
      // Data return function statements
      :
      return(errstat);
}

The data callback function is used to return selected data fields to the caller of sqlcmd. The function is automatically called once for each data field. Hence this function is called fifty times if 10 data records with 5 data fields each are selected. The index of the data output field specifies the position of the output field in the current record. It ranges from 1 to the number of defined data output fields. The return value of the data callback function should be zero if no (semantic) error occurred. In case of an error, a nonzero value must be returned to abort the database query.

Warning
The sqlcmd function operates directly on database file level and is therefore not attached to the Undo/Redo mechanism.
See also
Functions sqlerr, sqlinit.
Example

Definition of a table named partdata with the symname (String), val (String) and partno (String) data fields in the partdata.dat database file:

if (sqlinit("partdata.dat",1)!=0)
{
    perror("SQL Init error!");
    exit(0);
}
if (sqlcmd("partdata.dat",
 "create table partdata (symname string,val string,partno string);",
 NULL)!=0)
{
    perror("SQL Query error!");
    exit(0);
}

Data insertion:

if (sqlcmd("partdata.dat",
 "insert into partdata values ('r','470','STK100470');",NULL)!=0)
{
    perror("SQL Data input error!");
    exit(0);
}

Data query:

if (sqlcmd("partdata.dat",
 "select partno from partdata where symname='r' AND val='470';",
 datafunc)!=0)
{
    perror("SQL Query error!");
    exit(0);
}
:
int datafunc(dstr,dint,ddbl,dval,dtype,dtable,dfield,didx)
string dstr;
int dint;
double ddbl;
int dval,dtype;
string dtable,dfield;
int didx;
{
        printf("Part Number : %s\n");
}

Data delete:

if (sqlcmd("partdata.dat",
 "delete from partdata where symname='r';",NULL)!=0)
{
    perror("SQL Delete error!");
    exit(0);
}


sqlerr - SQL error status query (STD)

Synopsis
void sqlerr(
      & int;                  // Error code
      & string;               // Error item string
      );
Description
The sqlerr function is used to determine the error reason after an unsuccessful call of the sqlcmd function.
Diagnosis

The error reason can be determined by the parameters returned by the sqlerr function. The error item string identifies the element which caused the error. The following table lists the possible error codes:

Error CodeMeaning
0SQL command executed without errors
1SQL command read error (internal)
2SQL command too complex (more than 2000 terms)
3Invalid numeric expression
4SQL command file not found (internal)
5SQL command item too long (more than 200 characters)
6SQL command syntax error at <c>
7General SQL command parser error
8Error creating database
9File access error
10Too many open files
11File <d> is of wrong type/not a database
12Database file structure is damaged
13Database file structure is invalid
14Key <k> not found
15Key <k> already defined
16File <d> not found
17Table element <t>.<f> has invalid data type
18Too many table elements
19Data entry length exceeds database limit
20Multiple table delete not allowed
21Command contains illegal type combination
22Output field <f> undefined/not in any table
23Output field <f> defined in different tables
24Output table <t> undefined in from table list
25Table <t> already defined
26Database class limit exceeded
27Table <t> not found
28Error from data callback function
29No delete record found
30Unknown/new database format
31Query field not in table(s)
32Query field in multiple tables
33File read access denied
34File write access denied
35General database error

Depending on the error condition the error item string can describe a command element <c>, a database file <d>, a key <k>, a table <t> or a data field <f>.

See also
Functions sqlcmd, sqlinit.

sqlinit - SQL database initialization (STD)

Synopsis
int sqlinit(                  // Returns status
      string;                 // Database file name
      int;                    // Database init mode
      );
Description
The sqlinit function initializes and/or creates a database system for further access by the sql* functions. The database init mode can be zero for initializing an existing database file (.ddb, .dat) or 1 to create and initialize a new database file. The function return value is zero on successful initialization, 1 if the database file is already initialized or another value if an error occurred on initializing the database file. Databases processed with the sql* functions are stored in Bartels AutoEngineer DDB format. This introduces powerful features for including relational databases with AutoEngineer library or design data. PPS data can be stored together with layout design data or part attributes can be set with data retrieved from a separate database. The relational database system uses the DDB classes ranged from 4096 to 8191. DDB class 4096 contains the structure of the defined tables. DDB class 4097 is used to manage free DDB classes; this class contains just one entry named info, which is created by the sqlinit function. The existence of this entry can be used to check whether a database is initialized or not. The DDB classes 4352 to 8191 are assigned dynamically when storing user-defined table records and indices. The number of DDB classes used by each table corresponds to the number of table fields plus 1.
See also
Functions sqlcmd, sqlerr.

sqrt - Square root (STD)

Synopsis
double sqrt(                  // Returns result value
      double [0.0,[;          // Input value
      );
Description
The sqrt function calculates and returns the square root of the given double input value.

strcmp - String compare (STD)

Synopsis
int strcmp (                  // Returns comparison result
      string;                 // First string
      string;                 // Second string
      );
Description
The strcmp function compares the two input strings. A character-by character alphanumeric comparison is applied. The function returns zero if the strings are equal, (-1) if the first string is smaller than the second string or 1 otherwise.
See also
Functions namestrcmp, numstrcmp.

strcspn - String prefix length not matching characters (STD)

Synopsis
int strcspn(                  // Returns match position
      string;                 // Test string
      string;                 // Suffix match pattern
      );
Description
The strcspn function returns the number of test string characters not matching any character contained in the suffix match pattern string. The test string is searched from start.

strdelchr - Delete characters from string (STD)

Synopsis
void strdelchr(
      & string;               // Input/output string
      string;                 // Delete character set
      int;                    // Delete start position
      int;                    // Delete end position
      );
Description
The strdelchr function deletes from the input string all characters contained in the delete character set. The string is scanned from delete start to delete end position.

strextract - Extract sub-string from another string (STD)

Synopsis
string strextract(            // Returns extracted string
      string;                 // Input string
      int;                    // Extract start position (0 - strlen-1)
      int;                    // Extract end position (0 - strlen-1)
      );
Description
The strextract function extracts and returns the substring of the input string, which starts at the specified extract start position (counting from zero) and ends at the extract end position. The extract start and end positions are automatically adjusted to the input string boundaries. A reverse string extraction is applied, if the end position is smaller than the start position.

strextractfilepath - Extract directory name from a file path name string (STD)

Synopsis
string strextractfilepath(    // Returns directory name
      string;                 // Path name
      );
Description
The strextractfilepath function extracts and returns the directory name from the specified path name.
See also
Function strgetpurefilename.

strgetconffilename - Get environment variable expanded configuration file name (STD)

Synopsis
string strgetconffilename(    // Returns configuration file path name
      string;                 // Environment variable name
      string;                 // File base name
      int;                    // Directory preference:
                              //    0 : Prefer program directory
                              //    1 : Prefer all users directory
                              //    2 : Prefer user directory
      );
Description
The strgetconffilename returns the configuration file path name defined through the specified environment variable. The configuration file search is carried out in different configuration file directories according to the specified directory preference.
See also
Function strgetvarfilename.

strgetvarfilename - Get environment variable expanded file name string (STD)

Synopsis
string strgetvarfilename(     // Returns file name
      string;                 // Environment variable name
      );
Description
The strgetvarfilename function returns the file and/or path name defined through the specified environment variable.
See also
Function strgetconffilename.

strgetpurefilename - Extract file name from file path name string (STD)

Synopsis
string strgetpurefilename(    // Returns file name
      string;                 // Path name
      );
Description
The strgetpurefilename function extracts and returns the file name from the specified path name.
See also
Function strextractfilepath.

strlen - String length (STD)

Synopsis
int strlen(                   // Returns string length
      string;                 // Test string
      );
Description
The strlen function determines and returns the length of the specified test string (the NUL delimiter character is ignored).

strlistitemadd - Add string to string list (STD)

Synopsis
void strlistitemadd(
      & string;               // Comma-separated string list
      string;                 // String
      );
Description
The strlistitemadd adds the specified string in the comma-separated string list.
See also
Function strlistitemchk.

strlistitemchk - Search string in string list (STD)

Synopsis
int strlistitemchk(           // Search result
      string;                 // Comma-separated string list
      string;                 // Search string
      );
Description
The strlistitemchk searches the specified search string in the comma-separated string list. The functions returns zero if the search string is not in the string list, 1 if the search string is in the string list, or 2 if the search string matches the full length string list.
See also
Function strlistitemadd.

strlower - Convert string to lower case (STD)

Synopsis
void strlower(
      & string;               // Input/output string
      );
Description
The strlower function transforms the uppercase characters of the input string to lowercase.

strmatch - Test for string pattern match (STD)

Synopsis
int strmatch(                 // Returns string match flag
      string;                 // Test string
      string;                 // Pattern string (can contain wildcards)
      );
Description
The strmatch function checks, whether the test string matches the pattern string. The pattern string can contain wildcards. The * character refers to any character sequence and ? refers to any single character. The function returns nonzero if the test string matches the pattern string or zero otherwise.

strnset - Fill part or all of string with any character (STD)

Synopsis
void strnset(
      & string;               // Input/output string
      char;                   // Fill character
      int;                    // Fill count
      );
Description
The strnset function replaces the leftmost characters of the input string with the specified fill character. The number of characters to be changed is specified with the fill count.

strreverse - Reverse string (STD)

Synopsis
void strreverse(
      & string;               // Input/output string
      );
Description
The strreverse function reverses the character sequence of the given input string.

strscannext - Forward find characters in string (STD)

Synopsis
int strscannext(              // Returns match position
      string;                 // Test string
      string;                 // Match character set
      int;                    // Scan start position (1 - strlen)
      int;                    // Stop-on-match flag:
                              //    0 = continue on match
                              //    1 = stop on match
      );
Description
The strscannext function scans the test string for characters contained in the match character set. The scan starts from the specified scan start position (counting from 0) and proceeds towards the end of the test string. If the stop-on-match flag is set (1), the scan stops at the first character matching the match character set. If the stop-on-match flag is not set (0), the scan stops at the first character not matching the match character set. The function returns the match character position (or the test string length plus 1 on mismatch). The scan start position is automatically adjusted to the input string boundaries.

strscanprior - Backward find characters in string (STD)

Synopsis
int strscanprior(             // Returns match position
      string;                 // Test string
      string;                 // Match character set
      int;                    // Scan start position
      int;                    // Stop-on-match flag:
                              //    0 = continue on match
                              //    1 = stop on match
      );
Description
The strscanprior function scans the test string for characters contained in the match character set. The scan starts from the specified scan start position and proceeds towards the beginning of the test string. If the stop-on-match flag is set (1), the scan stops at the first character matching the match character set. If the stop-on-match flag is not set (0), the scan stops at the first character not matching the match character set. The function returns the match character position (or zero on mismatch). The scan start position is automatically adjusted to the input string boundaries.

strset - Fill string with any character (STD)

Synopsis
void strset(
      & string;               // Input/output string
      char;                   // Fill character
      );
Description
The strset function replaces all characters of the input string with the specified fill character.

strspn - String prefix length matching characters (STD)

Synopsis
int strspn(                   // Returns mismatch position
      string;                 // Test string
      string;                 // Prefix match pattern
      );
Description
The strspn returns the number of test string characters matching characters contained in the prefix match pattern string. The test string is searched from start.

strupper - Convert string to uppercase (STD)

Synopsis
void strupper(
      & string;               // Input/output string
      );
Description
The strupper transforms the lowercase characters of the input string to uppercase.

syngetintpar - Get BNF/scanner integer parameter (STD)

Synopsis
int syngetintpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = String-Kontrollzeichenauswertungsmodus
                              //    1 = Activate comment text callback function
                              //    2 = Any identifier character flag
      & int;                  // Returns parameter value
      );
Description
The syngetintpar function is used to query User Language BNF/syntax scanner integer parameters previously set with synsetintpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions synparsefile, synparseincfile, synparsestring, synsetintpar.

synparsefile - BNF/parser input file scan (STD)

Synopsis
synparsefile(                 // Returns scan status
      string;                 // Input file name
      [];                     // Optional comment callback function
      );
Description
The synparsefile function activates a parser for scanning the name-specified input file. The input file is processed according to the data format described with the BNF definition of the corresponding User Language program. The BNF-defined parser action functions automatically called. The synscanline and synscanstring functions can be utilized in parser action functions to query the current input scan line number and the current input scan string. On request, the input scan string can be subject to semantic tests. The synparsefile function is terminated if the end of the input file is reached or if a syntax error (or a semantic error encountered by a parser action function) has occurred.
Comment Callback Function

The second function parameter allows for the specification of a comment text callback function. This function is activated if the corresponding scanner/parser parameter has been set with the synsetintpar function. The callback function definition is as follows:

int commentfuncname(
      string commentstring,   // Comment without comment delimiters
      )
{
      // Function statements
      :
      return(stat);
}

The parser is stopped if the comment callback function returns a value other than zero. Otherwise the parser continues.

Diagnosis

The synparsefile function return value denotes a certain scan status according to the following table:

Return ValueMeaning
0No error
1No BNF definition available
2Parser (synparsefile) is already active
3File open error
4Too many open files
5Fatal read/write error
6Scan item too long
7Syntax error
8Unexpected end of file
9Stack overflow (BNF too complex)
10Stack underflow (BNF erroneous)
11Error from parser action function
See also
Functions syngetintpar, synparseincfile, synparsestring, synscaneoln, synscanigncase, synscanline, synscanstring, synsetintpar, and chapter 2.6.4 of this manual.

synparseincfile - BNF/parser include file scan (STD)

Synopsis
int synparseincfile(          // Returns status
      string;                 // Include file name
      );
Description
The synparseincfile function can be utilized for processing include files when parsing input files with the synparsefile function. The parser starts reading at the beginning of the name-specified include file when calling the synparseincfile function. The EOFINC terminal symbol is returned if the end of the include file is reached, and reading continues where it was interrupted in the previously processed file. The function returns zero if no error occurred, (-1) on include file open errors or (-2) if the parser (i.e., the synparsefile function) is not currently active.
Warning
The EOFINC terminal symbol is required in the BNF definition whenever the synparseincfile function is used; otherwise the parser issues an unexpected symbol syntax error when reaching the end of an include file. The EOFINC terminal symbol is obsolete if the synparseincfile function is not applied.
See also
Functions syngetintpar, synparsefile, synparsestring, synscaneoln, synscanigncase, synscanline, synscanstring, synsetintpar, and chapter 2.6.4 of this manual.

synparsestring - BNF/parser input string scan (STD)

Synopsis
synparsestring(               // Returns scan status
      string;                 // Input string
      [];                     // Optional comment callback function
      );
Description
The synparsestring function activates a parser for scanning the given input string. The input string is processed according to the data format described with the BNF definition of the corresponding User Language program. The BNF-defined parser action functions are automatically called. In these parser action functions, the synscanline and synscanstring functions can be utilized for getting the current input scan line number and the current input scan string. On request, the input scan string can be subject to semantic tests. The synparsestring function is terminated if the end of the input string is reached or if a syntax error (or a semantic error encountered by a parser action function) has occurred.
Comment Callback Function

The second function parameter allows for the specification of a comment text callback function. This function is activated if the corresponding scanner/parser parameter has been set with the synsetintpar function. The callback function definition is as follows:

int commentfuncname(
      string commentstring,   // Comment without comment delimiters
      )
{
      // Function statements
      :
      return(stat);
}

The parser is stopped if the comment callback function returns a value other than zero. Otherwise the parser continues.

Diagnosis

The synparsestring function return value denotes a certain scan status according to the following table:

Return ValueMeaning
0No error
1No BNF definition available
2Parser (synparsestring) is already active
3File open error
4Too many open files
5Fatal read/write error
6Scan item too long
7Syntax error
8Unexpected end of string
9Stack overflow (BNF too complex)
10Stack underflow (BNF erroneous)
11Error from parser action function
See also
Functions syngetintpar, synparsefile, synparseincfile, synscaneoln, synscanigncase, synscanline, synscanstring, synsetintpar, and chapter 2.6.4 of this manual.

synscaneoln - BNF/scanner end-of-line recognition (STD)

Synopsis
int synscaneoln(              // Return status
      int [0,1];              // Scanner end-of-line recognition mode:
                              //    0 = deactivate EOLN recognition
                              //    1 = activate EOLN recognition
      );
Description
The synscaneoln function is used to enable and/or disable the end-of-line recognition for the BNF parser activated with the synparsefile function. The end-of-line recognition is disabled on default. The function returns nonzero on error.
Warning
The usage of the EOLN terminal symbol in a BNF definition is only valid if the end-of-line recognition is activated; otherwise end-of-line characters cause parser syntax errors.
See also
Functions synparsefile, synparseincfile, synparsestring, synscanigncase, synscanline, synscanstring, and chapter 2.6.4 of this manual.

synscanigncase - BNF/scanner keyword case-sensitivity mode setting (STD)

Synopsis
int synscanigncase(           // Return status
      int [0,1];              // Keyword case-sensitivity mode:
                              //    0 = match case
                              //    1 = ignore case
      );
Description
The synscanigncase function is used to disable and/or enable keyword case-sensitivity for the BNF parser activated with the synparsefile function. On default, keyword case-sensitivity is activated. The function returns nonzero on error.
See also
Functions synparsefile, synparseincfile, synparsestring, synscaneoln, synscanline, synscanstring, and chapter 2.6.4 of this manual.

synscanline - BNF/scanner input line number (STD)

Synopsis
int synscanline(              // Returns current scan line number
      );
Description
The synscanline function returns the input file line number currently processed by the synparsefile function. The synscanline function can be utilized in referenced parser action user functions to trace the scan process.
See also
Functions synparsefile, synparseincfile, synparsestring, synscaneoln, synscanigncase, synscanstring, and chapter 2.6.4 of this manual.

synscanstring - BNF/scanner input string (STD)

Synopsis
string synscanstring(         // Returns current scan string
      );
Description
The synscanstring function returns the string currently scanned by the synparsefile function. The synscanstring function can be utilized in referenced parser action user functions to check and store certain scanner input data.
See also
Functions synparsefile, synparseincfile, synparsestring, synscaneoln, synscanigncase, synscanline, and chapter 2.6.4 of this manual.

synsetintpar - Set BNF/scanner integer parameter (STD)

Synopsis
int synsetintpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = String control character interpretation mode
                              //    1 = Activate comment text callback function
                              //    2 = Any identifier character flag
      int;                    // Parameter value
      );
Description
The synsetintpar function is used to set User Language BNF/syntax scanner integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The syngetintpar function can be used to query parameter values set with synsetintpar.
See also
Functions syngetintpar, synparsefile, synparseincfile, synparsestring.

system - Pass command to operating system and wait for completion (STD)

Synopsis
int system(                   // Completion status
      string;                 // Command string
      );
Description
The system function activates and/or executes the command specified in the command string parameter. The command string is passed to the operating system command shell, and BAE waits until command execution is completed. The function returns the status code returned by the operating system, the command interpreter or the executed program (whichever is last to execute before passing control back to BAE). A zero return value usually denotes successful execution, whilst nonzero return values notify errors and/or warnings.
Limitations
The system function does not work in BAE Demo software configurations.
Requirements

Executing MS-DOS (child) processes through DOS Extender requires enough conventional memory to be available for running the executable. Conventional memory must be controlled with the -MINREAL and -MAXREAL variables of the Phar Lap 386|DOS Extender. For running User Language programs using the system function, the corresponding User Language Interpreter environments must be re-configured by applying Phar Lap's redistributed CFIG386 tool as in

>  cfig386 <EXEFILE> -maxreal 0ffffh Return/Enter Key (CR)

where <EXEFILE> must be set to the appropriate User Language Interpreter executable(s) (scm.exe, ged.exe, neurrut.exe, cam.exe, gerview.exe and/or ced.exe).

Warnings

Note that the system function introduces basic multi-processing/multi-tasking features which are not fully supported on PC-based systems or can cause some problems on network-based workstation systems (depending on whichever OS command is to be executed).

It is strongly recommended to redirect DOS command standard output to temporary files (and use some file view User Language function for display); otherwise, DOS standard output overwrites the BAE graphic user interface.

Erroneous DOS command calls cause error output to the screen, thus overwriting the BAE graphic interface. Due to the fact that DOS lacks from some substantial standard features such as redirect error output, this problem can only be solved by refraining and/or preventing from running erroneous DOS commands, e.g., by pre-checking the consistency of each DOS command to be called.

It is strongly recommended to refrain and/or prevent from calling interactive DOS commands and/or application software with the system function since otherwise the system will "hang up" due to the fact that DOS standard input cannot be redirected from the BAE graphic user interface. It is also strongly recommended to refrain and/or prevent from directly calling UNIX commands which expect some user input (such as more, vi, etc.); this problem can be solved by a command cast to background (&) command shell start where the desired command should be called from (which however might cause a terminal device connection problem under remote login).

See also
Function launch.

tan - Tangent (STD)

Synopsis
double tan(                   // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The tan function calculates and returns the tangent value of the given angle value. The input angle value must be in radians.

tanh - Hyperbolic tangent (STD)

Synopsis
double tanh(                  // Returns result value
      double;                 // Input angle value (STD3)
      );
Description
The tanh function calculates and returns the hyperbolic tangent value of the given angle value. The input angle value must be in radians.

tolower - Convert uppercase to lowercase character (STD)

Synopsis
char tolower(                 // Returns lowercase character
      char;                   // Input character
      );
Description
The tolower function converts and returns the specified uppercase alphabetic input character to lowercase (or returns the input character unchanged if not uppercase alphabetic).

toupper - Convert lowercase to uppercase character (STD)

Synopsis
char toupper(                 // Returns uppercase character
      char;                   // Input character
      );
Description
The toupper function converts and returns the specified lowercase alphabetic input character to uppercase (or returns the input character unchanged if not lowercase alphabetic).

uliptype - Get User Language interpreter environment (STD)

Synopsis
int uliptype(                 // Interpreter type:
                              //    0x0000 = invalid/unknown
                              //    0x0080 = SCM - Schematic Editor 
                              //    0x0040 = GED - Layout Editor 
                              //    0x0010 = AR - Autorouter 
                              //    0x0008 = CAM - CAM Processor 
                              //    0x0004 = CED - Chip Editor 
                              //    0x1000 = CV - CAM View 
      );
Description
The uliptype function returns the type of the currently active User Language Interpreter environment.

ulipversion - Get User Language interpreter version (STD)

Synopsis
int ulipversion(              // Returns interpreter version
      );
Description
The ulipversion function returns the internal version number of the currently active User Language Interpreter environment.

ulproginfo - Get User Language program info (STD)

Synopsis
int ulproginfo(               // Returns status
      string;                 // Program name
      & int;                  // Program version
      & int;                  // Program caller type
      );
Description
The ulproginfo function gets the program version and the program caller type of a name-specified User Language program. The program version is the internal version number of the User Language Compiler used for compiling the program. The program caller type is a bit-mask value designating the User Language Interpreter environments compatible for executing the User Language program. The ulproginfo function can be utilized together with the ulip* functions to check whether a certain User Language program can be executed in the current User Language Interpreter environment.
See also
Functions uliptype, ulipversion.

ulsystem - Run another User Language program (STD)

Synopsis
int ulsystem(                 // Returns status
      string;                 // Program name
      & int;                  // Program counter
      );
Description
The ulsystem function executes the User Language program with the specified program name. The function returns nonzero if an error occurred whilst loading or running the program (see below for diagnosis). On error, the program counter parameter returns the address of the machine program instruction, which caused the error (to be compared with the listing file generated by the User Language Compiler).
Diagnosis

The ulsystem function can return the following return values:

Return ValueMeaning
0Program successfully executed
1DDB/database access error
2Program already loaded
3Program not found
4Incompatible User Language Program Version
5Incompatible index/function references
6Stack underflow
7Stack overflow
8Division by zero
9Error calling system function
10System function not available
11System function not implemented
12User function not found
13Invalid data type for user function
14Invalid parameter list for user function
15Error accessing array variable
16Invalid array variable index
17General file access error
18General file read error
19General file write error
See also
Function ulsystem_exit.

ulsystem_exit - Run a User Language program after exiting current User Language program (STD)

Synopsis
void ulsystem_exit(
      string;                 // Program name
      );
Description
The ulsystem function executes the User Language program with the specified program name after exiting the current User Language program.
See also
Functions exit, ulsystem.

vardelete - Delete global User Language variable (STD)

Synopsis
int vardelete(                // Returns status
      string;                 // Variable name
      );
Description
The vardelete function is used for deleting a global User Language variable previously defined with varset. The function returns zero if the variable has been successfully deleted or (-1) if no variable with the specified name is defined.
See also
Functions varget, varset.

varget - Get global User Language variable value (STD)

Synopsis
int varget(                   // Returns status
      string;                 // Variable name
      & void;                 // Variable value
      );
Description
The varget function is used for retrieving the value of global User Language variable previously defined with varset. The function return value is zero if the query was successful, (-1) if no variable with the specified name is defined or (-2) if the data type of the variable does not match the data type of the variable value return parameter.
See also
Functions vardelete, varset.

varset - Set global User Language variable value (STD)

Synopsis
int varset(                   // Returns status
      string;                 // Variable name
      void;                   // Variable value
      );
Description
The varset functions defines a global User Language variable with the specified variablen name and assigns the provided variable value. The variable value must match a basic data type (int, double, char or string), i.e., complex and/or combined data types such as arrays, structures or index types are not allowed. The function returns zero on successful variable definition, (-1) for invalid variable name specifications or (-2) if the variable value does not match a basic data type. Global User Language variable definitions are not deleted when the User Language program exits, i.e., they stay resident until they are explicitly deleted with the vardelete function or until the currently active BAE program module is exited. The varget function can be used to retrieve the value of a global User Language variable previously defined with varset. Global User Language variables can be used to exchange data between User Language programs which run at different times in the same BAE module.
See also
Functions vardelete, varget.
 

C.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.

 

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 CodeMeaning
0Rule System operation completed without errors
1Rule System out of memory
2Rule System internal error <e>
3Rule System function parameter invalid
128Rule System DB file create error
129Rule System DB file read/write error
130Rule System DB file wrong type
131Rule System DB file structure bad
132Rule System DB file not found
133Rule System DB file other error (internal error)
134Rule System rule <r> not found in rule database
135Rule System rule bad DB format (internal error <e>)
136Rule System object not found
137Rule System object double defined (internal error)
138Rule System incompatible variable <v> definition
139Rule 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:

?dfor querying int values
?ffor querying double values
?sfor 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:

%dfor specifying int values
%ffor specifying double values
%sfor 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.
 

C.4 PCB Design System Functions

This section describes (in alphabetical order) the PCB design system functions of the Bartels User Language. See Appendix C.1 for function description notations.

 

C.4.1 Layout Data Access Functions

The following User Language system functions are assigned to caller type LAY; i.e., they can be called from the Layout Editor, the Autorouter and the CAM Processor interpreter environment of the Bartels AutoEngineer:


lay_defelemname - Layout setup default element name (LAY)

Synopsis
string lay_defelemname(       // Returns default layout element name
      );
Description
The lay_defelemname function returns the default layout element name defined in the BAE setup file.

lay_deflibname - Layout setup default library name (LAY)

Synopsis
string lay_deflibname(        // Returns default library name
      );
Description
The lay_deflibname function returns the default layout library name defined in the BAE setup file.

lay_defusrunit - Layout setup default user units (LAY)

Synopsis
int lay_defusrunit(           // Returns default user units (STD7)
      );
Description
The lay_defusrunit function returns the default user units mode defined in the BAE setup file (1=Inch, 0=mm).

lay_doclayindex - Layout documentary layer display index (LAY)

Synopsis
int lay_doclayindex(          // Documentary layer display index
      int [0,99];             // Documentary layer number
      );
Description
The lay_doclayindex function returns the documentary layer display index for the specified documentary layer, or (-1) if an invalid documentary layer number was specified.
See also
Functions lay_doclayname, lay_doclayside, lay_doclaytext.

lay_doclayname - Layout setup documentary layer name (LAY)

Synopsis
string lay_doclayname(        // Returns documentary layer name
      int [0,99];             // Documentary layer number
      );
Description
The lay_doclayname function returns the documentary layer name defined in the BAE setup file for the specified documentary layer number.
See also
Functions lay_doclayindex, lay_doclayside, lay_doclaytext.

lay_doclayside - Layout setup documentary layer side mode (LAY)

Synopsis
int lay_doclayside(           // Returns documentary layer side mode:
                              //    (-2) = invalid layer number
                              //    (-1) = none
                              //    ( 0) = side 1
                              //    ( 1) = side 2
                              //    ( 2) = both sides
      int [0,99];             // Documentary layer number
      );
Description
The lay_doclayside function returns the documentary layer side mode defined in the BAE setup file for the specified documentary layer number. Documentary layer side mode (-1) refers to None (i.e., Side 1, Side 2 and Both Sides are selectable), mode 0 refers to Side 1, mode 1 refers to Side 2, mode 3 refers to Both Sides. The function returns (-2) if an invalid layer number has been specified.
See also
Functions lay_doclayindex, lay_doclayname, lay_doclaytext.

lay_doclaytext - Layout setup documentary layer text mode (LAY)

Synopsis
int lay_doclaytext(           // Returns doc. layer text mode (LAY2)
      int [0,99];             // Documentary layer number
      );
Description
The lay_doclaytext function returns the documentary layer text mode (LAY2) defined in the BAE setup file for the specified documentary layer. The function returns (-1) if an invalid layer number has been specified.
See also
Functions lay_doclayindex, lay_doclayname, lay_doclayside.

lay_figboxtest - Check layout element rectangle cross (LAY)

Synopsis
int lay_figboxtest(           // Returns status
      & index L_FIGURE;       // Element
      double;                 // Rectangle left border (STD2)
      double;                 // Rectangle lower border (STD2)
      double;                 // Rectangle right border (STD2)
      double;                 // Rectangle upper border (STD2)
      );
Description
The lay_figboxtest function checks if the given figure list element crosses the given rectangle. The function return nonzero if the element boundaries cross the given rectangle.

lay_findconpart - Find layout part index of a named part (LAY)

Synopsis
int lay_findconpart(          // Returns status
      string;                 // Part name
      & index L_CPART;        // Returns part index
      );
Description
The lay_findconpart function searches the layout connection list part index with the specified part name. The function returns zero if the part has been found or nonzero otherwise.
See also
Functions lay_findconpartpin, lay_findcontree.

lay_findconpartpin - Find layout part pin index of a named part pin (LAY)

Synopsis
int lay_findconpartpin(       // Returns status
      string;                 // Pin name
      index L_CPART;          // Net list part index
      & index L_CPIN;         // Returns net list part pin index
      );
Description
The lay_findconpartpin function searches a layout connection list part for the part pin index with the specified pin name. The function returns zero if the part pin has been found or nonzero otherwise.
See also
Functions lay_findconpart, lay_findcontree.

lay_findcontree - Find layout net index of a named net (LAY)

Synopsis
int lay_findcontree(          // Returns status
      string;                 // Net name
      & index L_CNET;         // Returns net index
      );
Description
The lay_findcontree function searches the layout connection list net index with the specified net name. The function returns zero if the net has been found or nonzero otherwise.
See also
Functions lay_findconpart, lay_findconpartpin.

lay_getplanchkparam - Get layout DRC parameters (LAY)

Synopsis
void lay_getplanchkparam(
      & double;               // Returns distance trace - trace (STD2)
      & double;               // Returns distance trace - copper (STD2)
      & double;               // Returns distance copper - copper (STD2)
      & double;               // Trace default width (STD2)
      & string;               // Block name
      int [-6,99];            // Signal layer code (LAY1)
                              //  (layer!=(-1) only allowed for BAE HighEnd)
      int [0,0[;              // DRC block number
      );
Description
The lay_getplanchkparam function is used to retrieve minimum clearance parameter settings for the design rule check (DRC). The DRC parameter values are returned with the corresponding function parameters. BAE Professional, BAE Economy and BAE Light allow only for the query of global parameters for layer code -1 (All Layers) and DRC parameter block 0. BAE HighEnd also allows for querying DRC parameter blocks with layer-specific clearance distance values being assigned to any signal layer (layer codes 0 to 99), the top signal layer (layer code -5) and inside signal layers (layer code -5). The DRC block 0 is always defined and contains the global DRC parameters, and there is always a DRC parameter preference defined for layer code -1 (All Layers).
See also
Function lay_setplanchkparam.

lay_getpowplanetree - Get layout power plane tree number (LAY)

Synopsis
int lay_getpowplanetree(      // Returns net tree number or (-1)
      double;                 // X coordinate (STD2)
      double;                 // Y coordinate (STD2)
      int;                    // Power layer number (LAY1)
      double;                 // Drill diameter (STD2)
      );
Description
The lay_getpowplanetree function returns the net tree number of the signal connected via the specified power layer coordinate. lay_getpowplanetree checks the given power layer. The specified drill diameter is taken under consideration for distance calculations. This function can be utilized for designating power layer net connections when using split power planes. The function returns (-1) if no signal is connected at the given power layer coordinate or if an invalid power layer number was specified.
Warning
The coordinate values passed to lay_getpowplanetree are interpreted as absolute coordinates on the currently loaded element. This means that scan offsets must be considered on coordinate checks when calling lay_getpowplanetree indirectly via lay_scan* functions.

lay_getpowpolystat - Layout power layer polygon status query (LAY)

Synopsis
int lay_getpowpolystat(       // Returns status
      index L_FIGURE;         // Figure list element - power layer polygon
      & int;                  // Returns flag:
                              //    polgyon crosses/touches board outline
      & int;                  // Returns flag:
                              //    polygon crosses other power layer polygon(s)
      );
Description
The lay_getpowpolystat checks the status of the specified power layer polygon (split power plane). The return flags indicate whether the power layer polygon touches or crosses the board outline and/or any other power layer polygon. The function returns zero if the query was successful, (-1) for invalid parameters/environment or (-2) if the specified figure list element is not a power layer polygon.

lay_getrulecnt - Get rule count for specific object (LAY)

Synopsis
int lay_getrulecnt(           // Returns rule count or (-1) on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      );
Description
The lay_getrulecnt function is used for determining the number of rules attached to a specific object. The object can be the currently loaded element (object class code 0 with int value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid L_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid L_POOL index type value passed for the object ident code). The function returns a (non-negative) rule count or (-1) on error. The rule count determines the valid range for rule list indices to be passed to the lay_getrulename function for getting object-specific rule names. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_getrulecnt function.
See also
Functions lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_getrulename - Get rule name from specific layout object (LAY)

Synopsis
int lay_getrulename(          // Returns nonzero on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      int [0,[;               // Rule name list index
      & string;               // Rule name result
      );
Description
The lay_getrulename function is used to get the name of an index-specified rule assigned to the specified object. The object can be the currently loaded element (object class code 0 with int value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid L_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid L_POOL index type value passed for the object ident code). The rule name list index to be specified can be determined using the lay_getrulecnt function. The rule name is returned with the last function parameter. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_getrulename function.
See also
Functions lay_getrulecnt, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_getscclass - Get currently scanned layout class (LAY)

Synopsis
int lay_getscclass(           // Returns layout element class:
                              //    0 = Layout
                              //    1 = Part
                              //    2 = Padstack
                              //    3 = Pad
                              //    (-1) otherwise
      );
Description
The lay_getscclass function returns the currently scanned layout element class. lay_getscclass is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool only. The function returns (-1) if no scan function is active or if no layout element is currently scanned.
See also
Functions lay_scanall, lay_scanfelem, lay_scanpool.

lay_getscpartrpidx - Get currently scanned layout part (LAY)

Synopsis
index L_NREF lay_getscpartrpidx   // Returns layout part index or (-1)
      );
Description
The lay_getscpartrpidx function returns the named reference index of the currently scanned layout part. This allows for designating the layout part to which the currently scanned trace, polygon, text, pin, etc. belongs to. lay_getscpartrpidx is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool only. The function returns (-1) if no scan function is active or if no part is currently scanned.
See also
Functions lay_scanall, lay_scanfelem, lay_scanpool.

lay_getscrefpidx - Get currently scanned layout library element (LAY)

Synopsis
index L_POOL lay_getscrefpidx     // Returns pool index or (-1) if outside macro
      );
Description
The lay_getscrefpidx function returns the currently scanned macro reference pool index. This allows for designating the layout library element to which the currently scanned trace, polygon, text, etc. belongs to. lay_getscrefpidx is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool only. The function returns (-1) if no scan function is active or if no macro is currently scanned.
See also
Functions lay_scanall, lay_scanfelem, lay_scanpool.

lay_getscstkcnt - Get layout scan function stack depth (LAY)

Synopsis
int lay_getscstkcnt(          // Returns scan stack depth
      );
Description
The lay_getscstkcnt function returns the current layout scan function stack depth. I.e., lay_getscstkcnt can be used for control purposes in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool.
See also
Functions lay_scanall, lay_scanfelem, lay_scanpool.

lay_getsctextdest - Get scanned layout text line destination (LAY)

Synopsis
int lay_getsctextdest(        // Returns status
      & double;               // Returns text line destination X coordinate (STD2)
      & double;               // Returns text line destination Y coordinate (STD2)
      );
Description
The lay_getsctextdest retrieves the text base line destination/end point coordinates of the currently scanned text. lay_getsctextdest is intended for use in the callback functions of lay_scanall, lay_scanfelem or lay_scanpool. The function returns 1 for successful queries or zero otherwise.
See also
Functions lay_scanall, lay_scanfelem, lay_scanpool.

lay_gettreeidx - Find layout net index of a tree (LAY)

Synopsis
int lay_gettreeidx(           // Returns status
      int;                    // Net tree number
      & index L_CNET;         // Returns net index
      );
Description
The lay_gettreeidx function searches the layout connection list net index with the specified net tree number. The function returns zero if the net has been found or nonzero otherwise.

lay_grpdisplay - Layout setup group display layer (LAY)

Synopsis
int lay_grpdisplay(           // Returns documentary layer number
      );
Description
The lay_grpdisplay function returns the group display documentary layer number defined in the BAE setup file.

lay_lastfigelem - Get last modified layout figure list element (LAY)

Synopsis
int lay_lastfigelem(          // Returns status
      & index L_FIGURE;       // Returns figure list index
      );
Description
The lay_lastfigelem function gets the last created and/or modified layout figure list element and returns the corresponding figure list index with the return parameter. The function returns zero if such an element exists or nonzero else.

lay_maccoords - Get layout (scanned) macro coordinates (LAY)

Synopsis
void lay_maccoords(
      & double;               // Macro X coordinate (STD2)
      & double;               // Macro Y coordinate (STD2)
      & double;               // Macro rotation angle (STD3)
      & int;                  // Macro mirror mode (STD14)
      & int;                  // Macro layer (LAY1 for Pad on Padstack)
      );
Description
The lay_maccoords function returns with its parameters the placement data of the currently scanned macro. This function is intended for use in the macro callback function of lay_scanall, lay_scanfelem or lay_scanpool only (otherwise zero/default values are returned).
See also
Functions lay_scanall, lay_scanfelem, lay_scanpool.

lay_macload - Load layout macro element to memory (STD)

Synopsis
int lay_macload(              // Returns status
      & index L_POOL;         // Macro pool element index
      string;                 // DDB file name
      string;                 // Element name
      int [100,[;             // Element DDB class (STD1)
      );
Description
The lay_macload function loads the specified layout library symbol to memory and returns the macro pool element index with the corresponding parameter. The function returns zero if the element was successfully loaded, (-1) on file access errors, (-2) on missing and/or invalid parameters or 1 if referenced macros (library elements) are missing. lay_macload is intended to be applied by features such as layout symbol browsers for examining library file contents. The lay_macrelease function can be used to unload and/or release macro elements from memory.
See also
Function lay_macrelease.

lay_macrelease - Unload/release layout macro element from memory (STD)

Synopsis
void lay_macrelease(          // Returns status
      index L_POOL;           // Macro pool element index
      );
Description
The lay_macrelease function unloads and/or releases the layout library symbol specified with the macro pool index parameter from memory. lay_macrelease is intended to be used together with the lay_macload function.
See also
Function lay_macload.

lay_menulaylinecnt - Get the layer menu lines count (LAY)

Synopsis
int lay_menulaylinecnt(       // Returns number of menu layer lines
      );
Description
The lay_menulaylinecnt function returns the number of menu lines currently defined with the layout signal layer menu. The layout signal layer menu can be customized using the bsetup utility program which allows for the definition of up to 12 signal layer entries with layer number and layer name.
See also
Functions lay_menulaylinelay, lay_menulaylinename.

lay_menulaylinelay - Get layer number of specified layer menu line (LAY)

Synopsis
int lay_menulaylinelay(       // Returns menu layer line layer number
      int [0,11];             // Menu line number
      );
Description
The lay_menulaylinelay function returns the layer number assigned to the specified menu line of the layout signal layer menu. The layout signal layer menu can be customized using the bsetup utility program which allows for the definition of up to 12 signal layer entries with layer number and layer name.
See also
Functions lay_menulaylinecnt, lay_menulaylinename.

lay_menulaylinename - Get name of specified layer menu line (LAY)

Synopsis
string lay_menulaylinename(   // Returns menu layer line name
      int [0,11];             // Menu line number
      );
Description
The lay_menulaylinename function returns the layer name assigned to the specified menu line of the layout signal layer menu. The layout signal layer menu can be customized using the bsetup utility program which allows for the definition of up to 12 signal layer entries with layer number and layer name.
See also
Functions lay_menulaylinecnt, lay_menulaylinelay.

lay_nrefsearch - Search named layout reference (LAY)

Synopsis
int lay_nrefsearch(           // Returns status
      string;                 // Reference name
      & index L_FIGURE;       // Returns figure list index
      );
Description
The lay_nrefsearch function searches for the specified named reference on the currently loaded layout element. The figure list index is set accordingly if the named reference is found. The function returns zero if the named reference has been found or nonzero otherwise.

lay_planmidlaycnt - Get layout inside layer count (LAY)

Synopsis
int lay_planmidlaycnt(        // Returns layout inside layer count
      );
Description
The lay_planmidlaycnt function returns the inside layer count of the currently loaded layout.
See also
Function lay_plantoplay.

lay_plantoplay - Get layout top layer (LAY)

Synopsis
int lay_plantoplay(           // Returns layout top layer (LAY1)
      );
Description
The lay_plantoplay function returns the top layer setting of the currently loaded layout element or signal layer 2 if no layout element is currently loaded.
See also
Function lay_planmidlaycnt.

lay_pltmarklay - Layout setup plot marker layer (LAY)

Synopsis
int lay_pltmarklay(           // Returns documentary layer number
      );
Description
The lay_pltmarklay function returns the plot marker documentary layer number defined in the BAE setup file.

lay_ruleerr - Layout rule system error status query (LAY)

Synopsis
void lay_ruleerr(
      & int;              // Error item code
      & string;           // Error item string
      );
Description
The lay_ruleerr function provides information on the current Rule System error state, and thus can be used to determine the error reason after an unsuccessful call to one of the Rule System management functions.
Diagnosis

The Rule System error state can be determined by evaluating the parameters returned with the lay_ruleerr function. The returned error item string identifies the error-causing element if needed. The possible error code values correspond with Rule System error conditions according to the following table:

Error CodeMeaning
0Rule System operation completed without errors
1Rule System out of memory
2Rule System internal error <e>
3Rule System function parameter invalid
128Rule System DB file create error
129Rule System DB file read/write error
130Rule System DB file wrong type
131Rule System DB file structure bad
132Rule System DB file not found
133Rule System DB file other error (internal error)
134Rule System rule <r> not found in rule database
135Rule System rule bad DB format (internal error <e>)
136Rule System object not found
137Rule System object double defined (internal error)
138Rule System incompatible variable <v> definition
139Rule 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 lay_getrulecnt, lay_getrulename, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_rulefigatt - Attach rule(s) to layout figure list element (LAY)

Synopsis
int lay_rulefigatt(           // Returns nonzero on error
      index L_FIGURE;         // Figure list element index
      void;                   // Rule name string or rule name list array
      );
Description
The lay_rulefigatt function is used to attach a new set of name-specified rules to the figure list element specified with the first function parameter. Either a single rule name (i.e., a value of 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 lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulefigatt function.
See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_rulefigdet - Detach rules from layout figure list element (LAY)

Synopsis
int lay_rulefigdet(           // Returns nonzero on error
      index L_FIGURE;         // Figure list element index
      );
Description
The lay_rulefigdet function detaches all currently attached rules from the figure list element specified with the function parameter. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulefigdet function.
See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt. lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_rulelaysatt - Attach rule(s) to layout layer stackup (LAY)

Synopsis
int lay_rulelaysatt(          // Returns nonzero on error
      int [0,111];            // Layer stackup index
      void;                   // Rule name string or rule name list array
      );
Description
The lay_rulelaysatt function is used to attach a new set of name-specified rules to the layer stackup specified by the layer stackup index. Either a single rule name (i.e., a value of type string) or a set of rule names (i.e., an array of type string) can be specified with the rule name function parameter. Note that any rules previously attached to the layer stackup will be detached before attaching the new rule set. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulelaysatt function.
See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_rulelaysdet - Detach rules from layout layer stackup (LAY)

Synopsis
int lay_rulelaysdet(          // Returns nonzero on error
      int [0,111];            // Layer stackup index
      );
Description
The lay_rulelaysdet function detaches all attached rules from the layer stackup specified by the layer stackup index. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulelaysdet function.
See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_ruleplanatt, lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_ruleplanatt - Attach rule(s) to currently loaded layout element (LAY)

Synopsis
int lay_ruleplanatt(          // Returns nonzero on error
      void;                   // Rule name string or rule name list array
      );
Description
The lay_ruleplanatt function is used to attach a new set of name-specified rules to the currently loaded element. Either a single rule name (i.e., a value of 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 will be detached before attaching the new rule set. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_ruleplanatt function.
See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet; lay_ruleplandet, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_ruleplandet - Detach rules from currently loaded layout element (LAY)

Synopsis
int lay_ruleplandet(          // Returns nonzero on error
      );
Description
The lay_ruleplandet function detaches all currently attached rules from the currently loaded element. The function returns zero on success or nonzero on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_ruleplandet function.
See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet; lay_ruleplanatt, lay_rulequery; Neural Rule System and Rule System Compiler.

lay_rulequery - Perform rule query on specific layout object (LAY)

Synopsis
int lay_rulequery(            // Returns hit count or (-1) on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      string;                 // Subject name
      string;                 // Predicate name
      string;                 // Query command string
      & void;                 // Query result
      []                      // Optional query parameters of requested type
      );
Description
The lay_rulequery function is used to perform a rule query on a specific object. The object can be the currently loaded element (object class code 0 with int value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid L_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid L_POOL index type value passed for the object ident code). The rule 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:

?dfor querying int values
?ffor querying double values
?sfor 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:

%dfor specifying int values
%ffor specifying double values
%sfor 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 lay_rulequery function returns a (non-negative) hit count denoting the number of value set entries matched by the query. The function return value is (-1) on error. The lay_ruleerr function can be used to determine the error reason after an unsuccessful call of the lay_rulequery function.

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 lay_rulequery call

    hitcount = lay_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 = lay_rulequery(0,0,"subj","pred","-?s %d",strresult,6) ;

sets hitcount to 2 and the string variable strresult to B.

See also
Functions lay_getrulecnt, lay_getrulename, lay_ruleerr, lay_rulefigatt, lay_rulefigdet, lay_rulelaysatt, lay_rulelaysdet, lay_ruleplanatt, lay_ruleplandet; Neural Rule System and Rule System Compiler.

lay_scanall - Scan all layout figure list elements (LAY)

Synopsis
int lay_scanall(              // Returns scan status
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Drill callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The lay_scanall function scans all figure list elements placed on the currently loaded layout element with all hierarchy levels. User-defined scan functions are automatically activated depending on the currently scanned element type. If a certain callback function should not be referenced, then the corresponding parameter must be set to the 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 L_MACRO macro,    // Macro index
      index L_POOL pool,      // Pool element index
      int macinws,            // Macro in workspace flag (STD10)
      string refname,         // Macro Reference name
      index L_LEVEL level     // Macro signal level
      )
{
      // Macro callback function statements
      :
      return(contscan);
}

The lay_maccoords function can be used for determining the macro placement coordinates. The return value of the macro callback function must be 1 for continue scan, 0 for stop scan or (-1) on error.

Polygon callback function
int polyfuncname(
      index L_POLY poly,      // Polygon index
      int layer,              // Polygon layer (LAY1)
      int polyinws,           // Polygon in workspace flag (STD10)
      int tree,               // Polygon tree number or (-1)
      index L_LEVEL level     // Polygon signal level
      )
{
      // Polygon callback function statements
      :
      return(errstat);
}

The return value of the polygon callback function must be zero if scan ok or nonzero on error.

Path callback function
int pathfuncname(
      index L_LINE path,      // Path index
      int layer,              // Path layer (LAY1)
      int pathinws,           // Path in workspace flag (STD10)
      index L_LEVEL level     // Path signal level
      )
{
      // Path callback function statements
      :
      return(errstat);
}

The return value of the path callback function must be zero if scan ok or nonzero on error.

Text callback function
int textfuncname(
      index L_TEXT text,      // Text index
      double x,               // Text X coordinate (STD2)
      double y,               // Text Y coordinate (STD2)
      double angle,           // Text rotation angle (STD3)
      int mirr,               // Text mirror mode (STD14)
      int layer,              // Text layer (LAY1)
      double size,            // Text size (STD2)
      string textstr,         // Text string
      int textinws            // Text in workspace flag (STD10)
      )
{
      // Text callback function statements
      :
      return(errstat);
}

The return value of the text callback function must be zero if scan ok or nonzero on error.

Drill callback function
int drillfuncname(
      index L_DRILL drill,    // Drill index
      double x,               // Drill X coordinate (STD2)
      double y,               // Drill Y coordinate (STD2)
      int drillinws,          // Drill in workspace flag (STD10)
      int tree,               // Drill tree number or (-1)
      index L_LEVEL level     // Drill signal level
      )
{
      // Drill callback function statements
      :
      return(errstat);
}

The return value of the drill callback function must be zero if scan ok or nonzero on error.

Layer check function
int laycheckfuncname(
      int layer               // Scanned layer (LAY1)
      )
{
      // Layer check function statements
      :
      return(contscan);
}

The return value of the layer check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to the interesting layers with this function.

Level check function
int levcheckfuncname(
      index L_LEVEL level     // Scanned signal level
      )
{
      // Level check function statements
      :
      return(contscan);
}

The return value of the level check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to interesting signal levels with this function.

See also
Functions lay_maccoords, lay_scanfelem, lay_scanpool.

lay_scanfelem - Scan layout figure list element (LAY)

Synopsis
int lay_scanfelem(            // Returns scan status
      index L_FIGURE;         // Figure list element index
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Drill callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The lay_scanfelem function scans the specified layout figure list element with all hierarchy levels. User-defined callback functions for the currently scanned element type are automatically activated. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword NULL. The return value of lay_scanfelem is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See lay_scanall for the scan function definitions.
See also
Functions lay_maccoords, lay_scanall, lay_scanpool.

lay_scanpool - Scan layout pool element (LAY)

Synopsis
int lay_scanpool(             // Returns scan status
      void;                   // Pool element index
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Drill callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The lay_scanpool function scans the specified layout pool element with all hierarchy levels. User-defined callback functions for the currently scanned element type are automatically activated. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword NULL. The return value of lay_scanpool is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See lay_scanall for the callback function definitions.
See also
Functions lay_maccoords, lay_scanall, lay_scanfelem.

lay_setfigcache - Fill layout figure list access cache (LAY)

Synopsis
void lay_setfigcache(
      );
Description
The lay_setfigcache function fills the layout cache for fast figure list element access.

lay_setplanchkparam - Set layout DRC parameters (LAY)

Synopsis
int lay_setplanchkparam(      // Returns status
      double ]0.0,[;          // Distance trace - trace (STD2)
      double ]0.0,[;          // Distance trace - copper (STD2)
      double ]0.0,[;          // Distance copper - copper (STD2)
      double;                 // Trace default width (STD2)
      string;                 // Block name
      int [-6,99];            // Signal layer code (LAY1)
                              //  (layer!=(-1) only allowed for BAE HighEnd)
      int [0,0[;              // DRC block number
      );
Description
The lay_setplanchkparam function sets Layout Editor clearance distance values for the design rule check (DRC). The function returns nonzero if invalid distance parameters are specified. BAE Professional, BAE Economy and BAE Light allow only for the specification of global parameters for layer code -1 (All Layers) and DRC parameter block 0. BAE HighEnd also allows for specifying DRC parameter blocks with layer-specific clearance distance values to be assigned to any signal layer (layer codes 0 to 99), the top signal layer (layer code -5) and inside signal layers (layer code -5). The DRC block 0 is always defined and contains the global DRC parameters, and there is always a DRC parameter preference defined for layer code -1 (All Layers).
See also
Function lay_getplanchkparam.

lay_toplayname - Layout setup top layer name (LAY)

Synopsis
string lay_toplayname(        // Returns top layer name
      );
Description
The lay_toplayname function returns the top signal layer name defined in the BAE setup file.

lay_vecttext - Vectorize layout text (LAY)

Synopsis
int lay_vecttext(             // Returns status
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      int [0,1];              // Text mirror mode (STD14)
      double ]0.0,[;          // Text size (STD2)
      int [0,1];              // Text physical flag:
                              //    0 = logical
                              //    1 = physical
      int [0,2];              // Layer mirror mode:
                              //    0 = mirror off
                              //    1 = mirror X
                              //    2 = mirror Y
      int [0,[;               // Text style (LAY14)
      string;                 // Text string
      * int;                  // Text vectorize function
      );
Description

The lay_vecttext function vectorizes the specified text using the currently loaded text font. The referenced text vectorize user function is automatically called for each text segment. The function returns nonzero if invalid parameters have been specified or if the referenced user function returns nonzero.

Text vectorize function
int vecfuncname(
      double x1,              // Start point X coordinate (STD2)
      double y1,              // Start point Y coordinate (STD2)
      double x2,              // End point X coordinate (STD2)
      double y2               // End point Y coordinate (STD2)
      )
{
      // Text vectorize function statements
      :
      return(errstat);
}

The return value of the text vectorize function must be zero if scan ok or nonzero on error.

 

C.4.2 Layout Editor Functions

The following User Language system functions are assigned to caller type GED; i.e., they can be called from the Layout Editor interpreter environment of the Bartels AutoEngineer:


ged_asklayer - GED layer selection (GED)

Synopsis
int ged_asklayer(             // Returns status
      & int;                  // Returns selected layer (LAY1|LAY9)
      int [0,7];              // Layer query type:
                              //    0 = Documentary layers and signal layers
                              //    1 = Signal layers
                              //    2 = Signal layers
                              //        (including Top Layer and All Layers)
                              //    3 = Documentary layers
                              //    4 = Signal and power layers
                              //    5 = arbitrary display element types
                              //    6 = Power layers
                              //    7 = Documentary, signal and power layers
      );
Description
The ged_asklayer function activates a Layout Editor layer selection menu. The layer query type designates the type of layers and/or display element types provided for selection. The function returns zero if a valid layer has been selected or (-1) if the layer selection was aborted.

ged_askrefname - GED reference name selection (GED)

Synopsis
int ged_askrefname(           // Returns status
      & string;               // Returns reference name
      & index L_CPART;        // Returns connection list part index
                              //    (on layout level only)
      int [0,2];              // Part selection mode:
                              //    0 = All parts
                              //    1 = Parts inside part group
                              //    2 = Parts outside part group
      int [0,1];              // Flag - unplaced part selection
      );
Description
The ged_askrefname function activates a dialog for selecting a reference, i.e., a part on layout level or a pin on part level. The part selection mode and the unplaced part flag can be used to restrict the list of selectable parts and/or pins. The functions returns zero if a reference was successfully selected or non-zero otherwise.

ged_asktreeidx - GED net selection (GED)

Synopsis
int ged_asktreeidx(           // Returns status
      & string;               // Returns tree name (on layout level only)
      & index L_CNET;         // Returns net index (on layout level only)
      int [0,5];              // Net selection mode:
                              //    0 = All trees, including No Net Assignment button
                              //    1 = Visible trees
                              //    2 = Invisible trees
                              //    3 = All trees
                              //    4 = Directly skip to net pick
                              //    5 = All trees, pattern input allowed
      );
Description
The ged_asktreeidx function activates a dialog for selecting a net. The net selection mode can be used to restrict the list of selectable nets. The functions returns zero if a net was successfully selected, 1 if a net delete operation (without net assignment) was performed, 2 if a net name pattern was specified, 3 if a net name was selected through net pick, or non-zero on invalid paramaters or if the selection was aborted.

ged_attachtextpos - Attach text position to layout element (GED)

Synopsis
int ged_attachtextpos(        // Returns status
      index L_FIGURE;         // Layout figure list element
      string;                 // Text string
      int;                    // Text layer (LAY1|LAY9)
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      double;                 // Text size (STD2; negative for text base line)
      int [0,1];              // Text mirror mode (STD14)
      );
Description
The ged_attachtextpos function assigns a text position modifier with the specified properties for layer, position, rotation, size and mirroring to the text string of the specified layout figure list element. The function returns zero if the assignment was successful, (-1) for invalid parameters or (-2) if the layout element provides no text position modifier for the specified text string.
See also
Function ged_storetext.

ged_delelem - Delete GED figure list element (GED)

Synopsis
int ged_delelem(              // Returns status
      & index L_FIGURE;       // Element
      );
Description
The ged_delelem function deletes the given figure list element from the figure list. The function returns zero if the element was successfully deleted or nonzero on error.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Function ged_drawelem.

ged_drawelem - Redraw GED figure list element (GED)

Synopsis
void ged_drawelem(
      index L_FIGURE;         // Element
      int [0, 4];             // Drawing mode (STD19)
      );
Description
The ged_drawelem function updates the display of the given figure list element using the specified drawing mode.
See also
Function ged_delelem.

ged_drcerrorhide - Set/reset GED DRC error acceptance mode (GED)

Synopsis
int ged_drcerrorhide(         // Returns status
      string;                 // Error Id string
      int;                    // Error hide flag
      );
Description
The ged_drcerrorhide function sets the display mode for the DRC error specified by the error id. The function returns zero if the display mode was successfully set or non-zero on error.

ged_drcpath - GED trace test placement design rule check (GED)

Synopsis
int ged_drcpath(              // Returns status
      int [0,99];             // Path signal layer number (LAY1)
      double ]0.0,[;          // Path width (STD2)
      index L_LEVEL;          // Path connectivity level index
      int [0,3];              // Path connectivity checking mode:
                              //    0 = Show violations for all non-level elements
                              //    1 = Ignore violations against own tree
                              //    2 = Show violations against any tree
                              //    3 = Show violations against any tree beside pick element
      );
Description
The ged_drcpath function performs a design rule check for a trace placement with the given parameters without actually placing the trace. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace can be successfully placed without DRC errors, a value greater or equal (1) if the trace placement would cause a DRC error or (-1) on missing/invalid environment/parameters.
See also
Functions bae_storepoint, ged_storepath.

ged_drcpoly - GED polygon test placement design rule check (GED)

Synopsis
int ged_drcpoly(              // Returns status
      int;                    // Polygon layer (LAY1)
      int [1,9];              // Polygon type (LAY4)
      string;                 // Polygon net name (for LAY4 types 4, 6 and 9)
      index L_LEVEL;          // Polygon connectivity level index
      int [0,3];              // Polygon connectivity checking mode:
                              //    0 = Show violations for all non-level elements
                              //    1 = Ignore violations against own tree
                              //    2 = Show violations against any tree
                              //    3 = Show violations against any tree beside pick element
      );
Description
The ged_drcpoly function performs a design rule check for a polygon placement with the given parameters without actually placing the polygon. The polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the polygon can be successfully placed without DRC errors, a value greater or equal (1) if the polygon placement would cause a DRC error or (-1) on missing/invalid environment/parameters.
See also
Functions bae_storepoint, ged_storepoly.

ged_drcvia - GED via test placement design rule check (GED)

Synopsis
int ged_drcvia(               // Returns status
      string;                 // Via padstack library name
      double;                 // Via X coordinate (STD2)
      double;                 // Via Y coordinate (STD2)
      index L_LEVEL;          // Via connectivity level index
      int [0,3];              // Via connectivity checking mode:
                              //    0 = Show violations for all non-level elements
                              //    1 = Ignore violations against own tree
                              //    2 = Show violations against any tree
                              //    3 = Show violations against any tree beside pick element
      );
Description
The ged_drcvia function performs a design rule check for a via placement with the given parameters without actually placing the via. The function returns zero if the via can be successfully placed without DRC errors, a value greater or equal (1) if the via placement would cause a DRC error, (-1) on missing/invalid environment/parameters or (-2) if the requested via padstack is not available.
See also
Function ged_storeuref.

ged_elemangchg - Change GED figure list element rotation angle (GED)

Synopsis
int ged_elemangchg(           // Returns status
      & index L_FIGURE;       // Element
      double;                 // New rotation angle (STD3)
      );
Description
The ged_elemangchg function changes the rotation angle of the given figure list element. The rotation angle must be in radians. The function returns zero if the element has been successfully rotated, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be rotated.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_elemfixchg - Change GED figure list element fixed flag (GED)

Synopsis
int ged_elemfixchg(           // Returns status
      & index L_FIGURE;       // Element
      int [0,1];              // New fixed flag (STD11)
      );
Description
The ged_elemfixchg function changes the fixed flag of the given figure list element. The fixed flag value 0 unfixes the element, the fixed flag value 1 fixes the element. The function returns zero if the element fixed flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be fixed.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_elemgrpchg - Change GED figure list element group flag (GED)

Synopsis
int ged_elemgrpchg(           // Returns status
      index L_FIGURE;         // Element
      int [0,6];              // New group selection status (STD13|0x4)
      );
Description
The ged_elemgrpchg function changes the group flag of the given figure list element. Setting bit 3 (0x4) of the group status parameter activates a status line message about the selected/deselected element and the total number of group-selected elements. The function returns zero if the element group flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be selected to a group.

ged_elemlaychg - Change GED figure list element layer (GED)

Synopsis
int ged_elemlaychg(           // Returns status
      & index L_FIGURE;       // Element
      int;                    // New layer (LAY1)
      );
Description
The ged_elemlaychg function changes the layer of the given figure list element. The layer can be set for polygons, traces, texts, pads (on padstack level), and drill holes. For drill holes the layer input parameter specifies the drill class code. The function returns zero if the element layer has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element layer cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_elemmirrchg - Change GED figure list element mirror mode (GED)

Synopsis
int ged_elemmirrchg(          // Returns status
      & index L_FIGURE;       // Element
      int [0,18];             // New mirror mode (STD14|LAY3)
      );
Description
The ged_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for polygons, texts and references. The function returns zero if the element mirror mode has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element mirror mode cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_elemposchg - Change GED figure list element position (GED)

Synopsis
int ged_elemposchg(           // Returns status
      & index L_FIGURE;       // Element
      double;                 // New X coordinate (STD2)
      double;                 // New Y coordinate (STD2)
      );
Description
The ged_elemposchg function changes the position of the given figure list element. Polygons and/or traces are replaced to set the first point of the polygon/trace to the specified position. The function returns zero if the element has been successfully repositioned, (-1) if the figure list element is invalid or (-2) if the figure list element position cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_elemsizechg - Change GED figure list element size (GED)

Synopsis
int ged_elemsizechg(          // Returns status
      & index L_FIGURE;       // Element
      double;                 // New size (STD2)
      );
Description
The ged_elemsizechg function changes the size of the given figure list element. The size can be changed for texts, drill holes, traces and areas. For traces, a trace width change is performed. For areas, the size parameter is interpreted as area expansion distance. The function returns zero if the element size has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element size cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_getautocornins - Get GED auto corner insert mode (GED)

Synopsis
int ged_getautocornins(       // Returns mode:
                              //    0 = Auto Corner Insert disabled
                              //    1 = Auto Corner Insert Traces
                              //    2 = Auto Corner Insert Areas
                              //    3 = Auto Corner Insert Traces & Areas
      );
Description
The ged_getautocornins function returns the Layout Editor input mode for automatically inserting corners when generating traces and/or polygons. The auto corner insert mode is selected with either option Grid+Rotation octagonal or option Rotation octagonal from the Grids+Rotation function.

ged_getdblpar - Get GED double parameter (GED)

Synopsis
int ged_getdblpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Last group placement x coordinate (STD2)
                              //    1 = Last group placement y coordinate (STD2)
                              //    2 = Default part placement angle (STD3)
                              //    3 = Copper fill isolation distance (STD2)
                              //    4 = Copper fill min. area size (STD2)
                              //    5 = Copper fill heat trap width (STD2)
                              //    6 = Copper fill heat trap isolation (STD2)
                              //    7 = Hatch line spacing (STD2)
                              //    8 = Hatch line width (STD2)
                              //    9 = Hatch line angle (STD3)
                              //    10 = Net visibility dialog net name list control element width
                              //    11 = Default text size (STD2)
                              //    12 = DRC distance violation text size (STD2)
                              //    13 = Autoplacement Part Expansion (STD2)
                              //    14 = Autoplacement Part Pin Factor [0, 1.0]
                              //    15 = Autoplacement Segment Fit [0, 1.0]
                              //    16 = Autoplacement Part Outline Offset (STD2)
                              //    17 = Default text placement angle (STD3)
                              //    18 = Autorouter Border to copper LE distance (STD2)
                              //    19 = Autorouter Heat trap to drill LE distance (STD2)
                              //    20 = Autorouter Isolation to drill LE distance (STD2)
                              //    21 = Autorouter Power plane connection LE run length (STD2)
                              //    22 = Autorouter Requested special routing grid (STD2)
                              //    23 = Autorouter Split power plane guard range (STD2)
                              //    24 = Autorouter BGA grid tolerance distance (STD2)
                              //    25 = Autorouter SMD power plane connection LE run length (STD2)
                              //    26 = Autorouter Pin to via distance (STD2)
                              //    27 = CAM Gerber standard line width (STD2)
                              //    28 = CAM Minimum distance heat trap to drilling (STD2)
                              //    29 = CAM Minimum distance isolation to drilling (STD2)
                              //    30 = CAM Heat trap to drilling distance tolerance (STD2)
                              //    31 = CAM Isolation to drilling distance tolerance (STD2)
                              //    32 = CAM Power layer border width (STD2)
                              //    33 = CAM Split power plane isolation width (STD2)
                              //    34 = Bus trace width (STD2)
                              //    35 = Bus trace spacing (STD2)
      & double;               // Returns parameter value
      );
Description
The ged_getdblpar function is used to query Layout Editor double parameters previously set with ged_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions ged_getintpar, ged_getstrpar, ged_setdblpar, ged_setintpar, ged_setstrpar.

ged_getdrcmarkmode - Get GED DRC Error Display Mode (GED)

Synopsis
int ged_getdrcmarkmode(       // DRC error display mode
      );
Description
The ged_getdrcmarkmode function returns the currently selected Layout Editor DRC error display mode. The function returns zero for error color error marker display and 1 for highlight error marker display.
See also
Function ged_setdrcmarkmode.

ged_getdrcstatus - Get GED DRC Completion Status (GED)

Synopsis
int ged_getdrcstatus(         // DRC completion status
      );
Description
The ged_getdrcstatus function return the current Layout Editor design rule check completion status. The function returns zero if only the design changes of the current program session are checked, or nonzero if a full design rule check for complete DRC error display has been applied to the currently loaded element.

ged_getgroupdata - GED group placement data query (GED)

Synopsis
int ged_getgroupdata(         // Status
      & double;               // Group base X coordinate (STD2)
      & double;               // Group base Y coordinate (STD2)
      & double;               // Group rotation angle (STD3)
      & double;               // Group scale factor
      & int;                  // Group mirror mode
      & double;               // Group quadrant X coordinate (STD2)
      & double;               // Group quadrant Y coordinate (STD2)
      & int;                  // Group quadrant mode
      & int;                  // Group area mode
      );
Description
ged_getgroupdata function can be used to retrieve the current Layout Editor group placement interaction input data. The function returns nonzero if no group placement interaction is activated.
See also
Function ged_getinputdata.

ged_gethighlnet - Get GED net highlight mode/color (GED)

Synopsis
int ged_gethighlnet(          // Returns status
      int [-1,[;              // Net tree number or -1 for highlight focus modus query
      & int;                  // Highlight mode
      & int;                  // Highlight color (bit 1 to 6, STD18) and pattern (bit 7 to 12)
      );
Description
The ged_gethighlnet function can be used to get the highlight mode and the highlight color and pattern for the specified net. The highlight mode parameter is set to nonzero if the net highlight is activated or zero if the net highlight is deactivated. The second parameter returns the highlight color (bit 1 to 6) and the highlight pattern (bit 7 to 12). The function returns nonzero if the query was successful or zero on error (net not found, invalid parameters).
See also
Function ged_highlnet.

ged_getinputdata - GED input data query (GED)

Synopsis
int ged_getinputdata(         // Status
      & double;               // Initial X coordinate (STD2)
      & double;               // Initial Y coordinate (STD2)
      & double;               // Initial width (STD2)
      & int;                  // Initial layer (LAY1)
      & double;               // Current X coordinate (STD2)
      & double;               // Current Y coordinate (STD2)
      & double;               // Current width (STD2)
      & int;                  // Current layer (LAY1)
      & void;                 // Input mode/element (LAY11)
      & void;                 // Input path level index (optional)
      & double;               // Input first segment start X coordinate (STD2) */
      & double;               // Input first segment start Y coordinate (STD2) */
      & double;               // Input first arc center X coordinate (STD2) */
      & double;               // Input first arc center Y coordinate (STD2) */
      & int;                  // Input first arc center type (STD15) */
      & double;               // Input last segment start X coordinate (STD2) */
      & double;               // Input last segment start Y coordinate (STD2) */
      & double;               // Input last arc center X coordinate (STD2) */
      & double;               // Input last arc center Y coordinate (STD2) */
      & int;                  // Input last arc center type (STD15) */
      );
Description
The ged_getinputdata function can be used to retrieve the current Layout Editor placement interaction input data. The placement data has to be interpreted according to the input interaction type and/or placement element function parameter. The function returns nonzero if no placement interaction is activated.
See also
Function ged_getgroupdata.

ged_getintpar - Get GED integer parameter (GED)

Synopsis
int ged_getintpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Pick point display mode:
                              //        0 = No pick point display
                              //        1 = Pick point display
                              //        2 = Pick point wide display
                              //        3 = Pick point edit display
                              //    1 = Automatic DRC on layout load mode:
                              //        0 = no automatic DRC
                              //        1 = automatic DRC with verification
                              //        2 = automatic DRC without verification
                              //    2 = Top layer color code
                              //    3 = Info display flag:
                              //        0 = No automatic info display
                              //        1 = Automatic info display
                              //    4 = Info display mode:
                              //        0 = No info display
                              //        1 = Complete info display
                              //        2 = Copper info only display
                              //    5 = Angle edit direction
                              //    6 = Part level element DRC mode:
                              //        0 = Complete DRC
                              //        1 = Consider part macros checked
                              //    7 = Grid corner scan mode:
                              //        0 = No grid corner scan
                              //        1 = Complete grid corner scan
                              //        2 = Current window corner scan
                              //        3 = Dynamic window corner scan
                              //    8 = Mincon update mode
                              //    9 = DRC polygon sub-type exclude bits
                              //    10 = Warning output mode:
                              //        Bit 0: Supress SCM changed warnings
                              //        Bit 1: Supress copper fill problem polygon group selection wanrnings
                              //        Bit 2: Supress variant mismatch warnings
                              //        Bit 3: Supress autorouter mode termination warnings
                              //    11 = Layer usage scan mode
                              //    12 = Area polygon edit mode:
                              //        0 = don't close polylines
                              //        1 = always close polylines
                              //        2 = polyline close prompt
                              //    13 = DRC distance display pattern
                              //    14 = Trace edit pick mode:
                              //        0 = snap to input grid
                              //        1 = pin/trace snap at first trace corner
                              //    15 = Area mirror visibility mode:
                              //        0 = Normal area mirror visibility
                              //        1 = Disable area mirror visibility
                              //    16 = Trace net deletion query limit
                              //    17 = Plot preview mode:
                              //        0 = none
                              //        1 = plotter pen width
                              //    18 = DRC distance display mode:
                              //        0 = none
                              //        1 = trace distance line
                              //        2 = area distance line
                              //        3 = trace distance pattern
                              //        4 = area distance pattern
                              //    19 = Text layer mirroring mode:
                              //        0 = no layer mirroring
                              //        1 = documentary layer mirroring
                              //        2 = signal and documentary layer mirroring
                              //    20 = Default part mirroring mode
                              //    21 = Autosave interval
                              //    22 = Part airline display mode:
                              //        0 = No airlines
                              //        1 = Static airlines
                              //        2 = Dynamic airlines
                              //    23 = Angle lock toggle mode:
                              //        0 = Pick side default
                              //        1 = Grid toggle
                              //        2 = Shorter side toggle
                              //        3 = Edit direction
                              //    24 = Copper fill heat trap mode:
                              //        0 = Direct Connect
                              //        1 = Pin & Via Heat Traps
                              //        2 = Pin Heat Traps
                              //        3 = Via Heat Traps
                              //        |4 = No Neighbour Pins Flag
                              //        |8 = Heat Trap Trace Flag
                              //        |16 = Only Unconnected Layers
                              //    25 = Copper fill trace mode:
                              //        0 = Round Corners
                              //        1 = Octagonal Corners
                              //        2 = Octagonal Circles
                              //        3 = Octagonal Corners & Circles
                              //    26 = Copper fill island mode:
                              //        0 = Keep Islands
                              //        1 = Delete Islands
                              //        2 = Select Islands
                              //    27 = Copper fill inside area mode:
                              //        0 = Inner Fill Area Fill
                              //        1 = Inner Fill Area Keepout
                              //        |2 = Keepout Areas without Distance
                              //    28 = Copper fill max. heat trap junctions
                              //    29 = Copper fill acute angle mode:
                              //        0 = Acute Angles flat
                              //        1 = Acute Angles round
                              //    30 = Copper fill hatch mode:
                              //        0 = Line Hatching
                              //        1 = Grid Hatching
                              //        |2 = Create Editable Paths
                              //    31 = Net visibility dialog box mode:
                              //        0 = Single column net name list display
                              //        1 = Multi-column net name list display
                              //    32 = Group move display mode:
                              //        0 = Moving Picture Off
                              //        1 = Display Group Layer Only
                              //        2 = Moving Picture On
                              //        3 = Moving Picture All
                              //    33 = Group trace selection mode:
                              //        0 = Select Traces & Vias
                              //        1 = Select Traces Only
                              //        2 = Select Vias Only
                              //    34 = Pick preference layer selection (LAY1)
                              //    35 = Clipboard text placement request flag
                              //    36 = Edit direction
                              //    37 = Mincon Area Mode (Bit Patterns):
                              //        0 = No Area Mincon
                              //        |1 = Copper Area Mincon
                              //        |2 = Connected Copper Area Mincon
                              //    38 = Group angle lock mode:
                              //        0 = Keep group angle lock
                              //        1 = Automatically release group angle lock
                              //    39 = Autoplacement Optimizer Passes
                              //    40 = Autoplacement Part Swap On/Off Flag
                              //    41 = Autoplacement Pin/Gate Swap On/Off Flag
                              //    42 = Autoplacement Mirroring Mode:
                              //        0 = No SMD mirroring
                              //        1 = SMD Mirroring
                              //        2 = SMD 2-Pin Mirroring
                              //        3 = Only SMD Mirroring
                              //    43 = Autoplacement Rotation Mode:
                              //        0 = 0-90 Degree Rotation
                              //        1 = 0-270 Degree Rotation
                              //        2 = 0 Degree Rotation
                              //        3 = 90 Degree Rotation
                              //        4 = 0 XOR 90 Degree Rotation
                              //    44 = Autoplacement Retry Passes
                              //    45 = Autoplacement SMD Rotation Mode:
                              //        0 = 0-90 Degree Rotation
                              //        1 = 0-270 Degree Rotation
                              //        2 = 0 Degree Rotation
                              //        3 = 90 Degree Rotation
                              //        4 = 0 XOR 90 Degree Rotation
                              //    46 = Autoplacement Part Outline Layer (LAY1)
                              //    47 = Group visibility mode:
                              //        0 = Select all elements
                              //        1 = Select visible elements only
                              //    48 = Default text mirror mode and text mode (STD14|LAY14)
                              //    49 = Autorouter Number of optimization runs
                              //    50 = Autorouter Optimizer characteristic
                              //    51 = Autorouter Max. number of vias per connection
                              //    52 = Autorouter Router via delay at 1/10"
                              //    53 = Autorouter Router pin channel delay
                              //    54 = Autorouter Cross direction delay
                              //    55 = Autorouter Direction change delay
                              //    56 = Autorouter Path packing delay
                              //    57 = Autorouter Statistical delay base
                              //    58 = Autorouter Max. rip-ups per con.
                              //    59 = Autorouter Max. rip-up level
                              //    60 = Autorouter Max. number of rip-up retries
                              //    61 = Autorouter Router via grid index
                              //    62 = Autorouter Bus structure delay
                              //    63 = Autorouter Re-route area 1 delay
                              //    64 = Autorouter Re-route area 2 delay
                              //    65 = Autorouter Skip existing path delay
                              //    66 = Autorouter Router cleaning run enable
                              //    67 = Autorouter Optim. cleaning run enable
                              //    68 = Autorouter Power connection vector unroutes
                              //    69 = Autorouter Automatic save enable
                              //    70 = Autorouter Corner connection output enable
                              //    71 = Autorouter Unroute output sort mode
                              //    72 = Autorouter Corner mitring mode
                              //    73 = Autorouter Existing traces orientation mode
                              //    74 = Autorouter Standard connection layer delay
                              //    75 = Autorouter Bus connection layer delay
                              //    76 = Autorouter Wave limitation offset
                              //    77 = Autorouter Gridless via check mode
                              //    78 = Autorouter Input error checking mode
                              //    79 = Autorouter Trace to pin entry mode
                              //    80 = Autorouter Requested subgrid factor
                              //    81 = Autorouter Router off-grid delay
                              //    82 = Autorouter Bus recognition and routing mode
                              //    83 = Autorouter SMD pin-via pass enable
                              //    84 = Autorouter Pin/gate swap mode
                              //    85 = Autorouter Requested gridless routing mode
                              //    86 = Autorouter Incremental output mode
                              //    87 = Autorouter Router prefered grid shift
                              //    88 = Autorouter Router prefered grid delay
                              //    89 = Autorouter Outside net area delay
                              //    90 = Autorouter Last optimization par. change mode
                              //    91 = Autorouter Auto rip-up parameter mode
                              //    92 = Autorouter Prefered routing direction mode
                              //    93 = Autorouter Optimizer order mode
                              //    94 = Autorouter Via rip-up flag
                              //    95 = Autorouter Routing window border size
                              //    96 = Autorouter BGA fan out enable flag
                              //    97 = Autorouter Fan out gridded check mode
                              //    98 = Autorouter Alternate via shift mode
                              //    99 = Autorouter Full via evaluation mode
                              //    100 = Autorouter Micro via mode
                              //    101 = Autorouter Forced dir. max. derivation
                              //    102 = Autorouter Routing frame window flag
                              //    103 = Autorouter Requested pad entry subgrid
                              //    104 = Autorouter Power layer via mode
                              //    105 = Autorouter Via check mode
                              //    106 = Autorouter Large net connection count
                              //    107 = Autorouter Autorouting active flag
                              //    108 = CAM Heat trap base angle
                              //    109 = Single corner edit flag
                              //    110 = Resize with round corners flag
                              //    111 = Hidden DRC errors display flag
                              //    112 = DRC violation elements scan flag
                              //    113 = Part placement trace move mode
                              //        0 = No trace move
                              //        1 = Trace end move
                              //        2 = Trace segment move
                              //    114 = Polygon edit autocomplete flag
                              //    115 = Board Outline alternative documentary layer (LAY1)
                              //    116 = Trace join query mode:
                              //        0 = Never join traces
                              //        1 = Always join traces
                              //        2 = Query for trace join
                              //    117 = Trace display class bits (LAY15)
                              //    118 = Text display class bits (LAY15)
                              //    119 = Copper polygon display class bits (LAY15)
                              //    120 = Forbidden area polygon display class bits (LAY15)
                              //    121 = Border polygon display class bits (LAY15)
                              //    122 = Connected copper polygon display class bits (LAY15)
                              //    123 = Documentary line display class bits (LAY15)
                              //    124 = Documentary area display class bits (LAY15)
                              //    125 = Copper fill with cutout polygon display class bits (LAY15)
                              //    126 = Hatched copper polygon display class bits (LAY15)
                              //    127 = Split power plane polygon display class bits (LAY15)
                              //    128 = Flag - Color table saved
                              //    129 = Airline color mode:
                              //        0 = Use unroutes color
                              //        1 = Use layer color
                              //    130 = Airline clipping mode:
                              //        0 = No unroutes clipping
                              //        1 = Clip unroutes without workspace target
                              //    131 = Trace collision mode:
                              //        -1 = Query for operation
                              //        0 = Ignore collisions
                              //        1 = Delete colliding traces
                              //        2 = Delete colliding segments
                              //        3 = Cut colliding segments
                              //    132 = Layout trace merge query mode:
                              //        0 = Never merge layout traces
                              //        1 = Always merge layout traces
                              //        2 = Query merge mode
                              //    133 = Part trace merge query mode:
                              //        0 = Never merge part traces
                              //        1 = Always merge part traces
                              //        2 = Query merge mode
                              //    135 = Element move polygon display mode:
                              //        0 = Display outline
                              //        1 = Display filled
                              //    136 = Group move airline display mode:
                              //        0 = Airline Display Off
                              //        1 = Display Group Part Pin Airlines
                              //    137 = Trace collision distance check mode:
                              //        0 = Use DRC distance for collision check
                              //        1 = Consider only crossings as collision
                              //    138 = Trace segment bundle pick mode:
                              //        0 = Continuous segment pick
                              //        1 = Pick first and last bundle segment
                              //    139 = Trace segment insert pick mode:
                              //        0 = 3 click selection
                              //        1 = 2 click selection
                              //    140 = Part edit DRC:
                              //        0 = no part edit online DRC
                              //        1 = part edit online DRC
                              //    141 = Drill tool table optimization flag
                              //    142 = Bus trace count
                              //    143 = Edit bus trace count
                              //    144 = Bus trace creation mode:
                              //        0 = Create trace bundle
                              //        1 = Create seperate traces
                              //    145 = Bus trace corner mode:
                              //        0 = Create angle corners
                              //        1 = Create arc corners
                              //    146 = Silk screen layer (LAY1)
                              //    147 = Macro outline display mode:
                              //        0 = No macro outline display
                              //        1 = Display macro outline at moved references
                              //        2 = Display macro outlines
      & int;                  // Returns parameter value
      );
Description
The ged_getintpar function is used to query Layout Editor integer parameters previously set with ged_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions ged_getdblpar, ged_setintpar, ged_getstrpar, ged_setdblpar. ged_setstrpar.

ged_getlaydefmode - Get GED default layer mode (GED)

Synopsis
int ged_getlaydefmode(        // Default layer mode:
                              //    0 = automatic layer default disabled
                              //    1 = used edit layer as layer default
                              //    2 = last used layer as layer default
      );
Description
The ged_getlaydefmode function returns the current Layout Editor default layer mode.
See also
Functions ged_getlayerdefault, ged_setlaydefmode, ged_setlayerdefault.

ged_getlayerdefault - Get GED default layer (GED)

Synopsis
int ged_getlayerdefault(      // Layer (LAY1)
      );
Description
The ged_getlayerdefault function returns the current Layout Editor default layer.
See also
Functions ged_getlaydefmode, ged_setlaydefmode, ged_setlayerdefault.

ged_getmincon - Get GED Mincon function type (GED)

Synopsis
int ged_getmincon(            // Returns Mincon function type (LAY10)
      );
Description
The ged_getmincon function returns the currently selected Layout Editor Mincon function type, i.e., the airline display mode (LAY10).

ged_getpathwidth - Get GED path standard widths (GED)

Synopsis
void ged_getpathwidth(
      & double;               // Returns small standard width (STD2)
      & double;               // Returns wide standard width (STD2)
      );
Description
The ged_getpathwidth function parameters return the Layout Editor standard widths for small and wide traces.

ged_getpickmode - Get GED element pick mode (GED)

Synopsis
int ged_getpickmode(          // Element pick mode:
                              //    0 = Pick preference layer pick
                              //    1 = Pick with element selection
                              //    2 = Exclusive pick preference layer pick
      );
Description
ged_getpickmode function returns the currently selected Layout Editor element pick mode.
See also
Funktion ged_setpickmode.

ged_getpickpreflay - Get GED pick preference layer (GED)

Synopsis
int ged_getpickpreflay(       // Returns pick preference layer (LAY1)
      );
Description
The ged_getpickpreflay function returns the currently active Layout Editor pick preference layer for element selection (LAY1).

ged_getpowlayerrcnt - Get GED power layer error count (GED)

Synopsis
int ged_getpowlayerrcnt(      // Powe layer error count
      );
Description
The ged_getpowlayerrcnt function returns the current Layout Editor power layer error count.

ged_getsegmovmode - Get GED trace segment move mode (GED)

Synopsis
int ged_getsegmovmode(        // Returns trace segment move mode:
                              //    0 = Move without neighbours
                              //    1 = Move with neighbours
                              //    2 = Adjust neighbours
                              //    3 = Adjust neighbours without vias
                              //    8 = Adjust next neighbours only
                              //    |4 = Open trace ends follow segment movement
      );
Description
The ged_getsegmovmode function returns the current Layout Editor trace segment move mode.
See also
Function ged_setsegmovmode.

ged_getstrpar - Get GED string parameter (GED)

Synopsis
int ged_getstrpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Last placed named reference name
                              //    1 = Last placed named reference macro name
                              //    2 = Last placed text string
                              //    3 = Default library name
                              //    4 = Next free name
                              //    5 = Drill naming base
                              //    6 = Drill part macro name pattern
                              //    7 = Drill padstack macro name pattern
                              //    8 = Input prompt override string
                              //    9 = Last placed macro library
                              //    10 = Autosave path name
      & string;               // Returns parameter value
      );
Description
The ged_getstrpar function is used to query Layout Editor string parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions ged_getdblpar, ged_getintpar, ged_setdblpar, ged_setintpar, ged_setstrpar.

ged_getviaoptmode - Get GED trace via optimization mode (GED)

Synopsis
int ged_getviaoptmode(        // Returns trace via optimization mode:
                              //    0 = Via optimization
                              //    1 = Keep vias
      );
Description
The ged_getviaoptmode function returns the current Layout Editor trace via optimization mode.
See also
Function ged_setviaoptmode.

ged_getwidedraw - Get GED wide line display start width (GED)

Synopsis
double ged_getwidedraw(       // Returns width value (STD2)
      );
Description
The ged_getwidedraw function returns the current Layout Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.

ged_groupselect - GED group selection (GED)

Synopsis
int ged_groupselect(          // Number of changes or (-1) on error
      int [0,9];              // Element selection type:
                              //    0 = select by element type
                              //    1 = select by element layer
                              //    2 = select by element fixed flag
                              //    3 = select by element visibility
                              //    4 = select by element not on layer
                              //    5 = select by element tree/net number
                              //    6 = select by element negated tree/net number
                              //    7 = select elements connected to tree number
                              //    8 = select elements not connected to tree
                              //    9 = select by element polygon type
                              //    10 = select by element glued mode
      int;                    // Element selection value according to type:
                              //    0 - element type (0|LAY6)
                              //    1,4 - element layer (LAY1)
                              //    2 - element fixed flag (STD11)
                              //    3 - element visible flag (0|1)
                              //    5,6 - element tree/net number
                              //    7, 8 - tree/net number
                              //    9 - element polygon type (LAY4)
                              //    10 - element glued mode (STD11 | STD12)
      int [0,2];              // New group selection status (STD13)
      );
Description
The ged_groupselect function changes the group flag of all elements of the specified type and/or value. The function returns the number of elements (de)selected or (-1) on error (i.e., on invalid and/or incompatible parameter specifications). Element selection value zero for element type selection is used for selecting elements of any type.
Warning
Internal layout element types such as the standard via definition(s) are excluded from group (de)selections with ged_groupselect to prevent from unintentionally modifying and/or deleting such elements and/or definitions when subsequently using other group functions.

ged_highlnet - Set GED net highlight mode/color (GED)

Synopsis
int ged_highlnet(             // Returns status
      int [-1,[;              // Net tree number
      int [0,[;               // Highlight off/on flag || (color/patterndef << 1)
      );
Description
The ged_highlnet function sets the highlight mode of the net specified by the given net tree number. The least significant bit of the highlight parameter designates whether the net should be highlighted (value 1) or not (value 0). The other bits the highlight parameter can be used to specify a highlight color code (bit 2 to 6) and/or a highlight display pattern (bit 7 to 12). The function returns nonzero if an invalid net tree number and/or highlight mode value has been specified.
See also
Function ged_gethighlnet.

ged_layergrpchg - Select GED group by layer (GED)

Synopsis
int ged_layergrpchg(          // Number of elements
      int [0,[;               // Layer number (LAY1)
      int [0,1];              // New group selection status (STD13)
      );
Description
The ged_layergrpchg function changes the group flag of all elements placed on the specified layer. The function returns the number of elements (de)selected or (-1) on error.

ged_partaltmacro - Change GED net list part package type (GED)

Synopsis
int ged_partaltmacro(         // Returns status
      string;                 // Part name
      string;                 // New part package type name
      );
Description
The ged_partaltmacro function changes the package type of the given net list part. The function returns nonzero if the part package type has been successfully changed, (-1) for invalid input parameters, (-2) if the specified package does not contain all pins referenced by the part in the net list (package is changed anyway), (-3) if the specified part does not exist in the net list, (-4) if the new package type isn't allowed for this part, (-5) if the new package couldn't be loaded, (-6) if the new package couldn't be copied to the job file or (-7) for multiple package change requests (e.g., a to b and then b to c) in one program run.
Warning
It is strongly recommended not to use this function in L_CPART index loops since the current L_CPART index variables are invalid after calling ged_partaltmacro.

ged_partnamechg - Change GED part name (GED)

Synopsis
int ged_partnamechg(          // Returns status
      string;                 // Old name
      string;                 // New name
      );
Description
The ged_partnamechg function changes the name of part. The function returns nonzero if the part name has been successfully changed, (-1) for invalid input parameters, (-2) if the specified part is not yet placed, (-4) if the new name exists already or (-5) for multiple name change requests (e.g., a to b and then b to c) in one program run. On layout part macro level, ged_partnamechg can be used for the renaming of pins.
Warning
This function might change the net list in which case a Backannotation is subsequently required. It is strongly recommended not to use this function in L_CPART index loops since the current L_CPART index variables are invalid after calling ged_partnamechg.

ged_pickanyelem - Pick any GED figure list element (GED)

Synopsis
int ged_pickanyelem(          // Returns status
      & index L_FIGURE;       // Returns picked element
      int;                    // Pick element type set ((LAY6 except 7)<<1 or'ed)
      );
Description
The ged_pickanyelem function activates a mouse interaction for selecting a figure list element from the specified pick element type set. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element was found at the pick position.
See also
Function ged_pickelem.

ged_pickelem - Pick GED figure list element (GED)

Synopsis
int ged_pickelem(             // Returns status
      & index L_FIGURE;       // Returns picked element
      int [1,10];             // Pick element type (LAY6 except 7)
      );
Description
The ged_pickelem function activates an interactive figure list element pick request (with mouse). The required pick element type is specified with the second parameter. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element of the required type has been found at the pick position.
See also
Functions ged_pickanyelem, ged_setpickelem.

ged_setautocornrins - Set GED auto corner insert mode (GED)

Synopsis
int ged_setautocornins(       // Returns status
      int [0,3];              // Auto corner insert mode:
                              //    0 = Auto Corner Insert disabled
                              //    1 = Auto Corner Insert Traces
                              //    2 = Auto Corner Insert Areas
                              //    3 = Auto Corner Insert Traces & Areas
      );
Description
The ged_setautocornins function sets the Layout Editor input mode for automatically inserting corners when generating traces and/or polygons. Usually, the auto corner insert mode is selected with either option Grid+Rotation octagonal or option Rotation octagonal from the Grids+Rotation function. The function returs nonzero if an invalid octagon input mode has been specified.

ged_setdblpar - Set GED double parameter (GED)

Synopsis
int ged_setdblpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Last group placement x coordinate (STD2)
                              //    1 = Last group placement y coordinate (STD2)
                              //    2 = Default part placement angle
                              //    3 = Copper fill isolation distance (STD2)
                              //    4 = Copper fill min. area size (STD2)
                              //    5 = Copper fill heat trap width (STD2)
                              //    6 = Copper fill heat trap isolation (STD2)
                              //    7 = Hatch line spacing (STD2)
                              //    8 = Hatch line width (STD2)
                              //    9 = Hatch line angle (STD3)
                              //    10 = Net visibility dialog net name list control element width
                              //    11 = Default text size (STD2)
                              //    12 = DRC distance violation text size (STD2)
                              //    13 = Autoplacement Part Expansion (STD2)
                              //    14 = Autoplacement Part Pin Factor [0, 1.0]
                              //    15 = Autoplacement Segment Fit [0, 1.0]
                              //    16 = Autoplacement Part Outline Offset (STD2)
                              //    17 = Default text placement angle (STD3)
                              //    18 = Autorouter Border to copper LE distance (STD2)
                              //    19 = Autorouter Heat trap to drill LE distance (STD2)
                              //    20 = Autorouter Isolation to drill LE distance (STD2)
                              //    21 = Autorouter Power plane connection LE run length (STD2)
                              //    22 = Autorouter Requested special routing grid (STD2)
                              //    23 = Autorouter Split power plane guard range (STD2)
                              //    24 = Autorouter BGA grid tolerance distance (STD2)
                              //    25 = Autorouter SMD power plane connection LE run length (STD2)
                              //    26 = Autorouter Pin to via distance (STD2)
                              //    27 = CAM Gerber standard line width (STD2)
                              //    28 = CAM Minimum distance heat trap to drilling (STD2)
                              //    29 = CAM Minimum distance isolation to drilling (STD2)
                              //    30 = CAM Heat trap to drilling distance tolerance (STD2)
                              //    31 = CAM Isolation to drilling distance tolerance (STD2)
                              //    32 = CAM Power layer border width (STD2)
                              //    33 = CAM Split power plane isolation width (STD2)
                              //    34 = Bus trace width (STD2)
                              //    35 = Bus trace spacing (STD2)
      double;                 // Parameter value
      );
Description
The ged_setdblpar function is used to set Layout Editor double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ged_getdblpar function can be used to query parameter values set with ged_setdblpar.
See also
Functions ged_getdblpar, ged_getintpar, ged_getstrpar, ged_setintpar, ged_setstrpar.

ged_setdrcmarkmode - Get GED DRC error display mode (GED)

Synopsis
int ged_setdrcmarkmode(       // Returns status
      int [0,1];              // DRC error display mode:
                              //    0 = Error color error marker display
                              //    1 = Highlight color error marker display
      );
Description
The ged_setdrcmarkmode function sets the DRC error marker display mode. The functions returns nonzero for invalid display mode specifications.
See also
Function ged_getdrcmarkmode.

ged_setintpar - Set GED integer parameter (GED)

Synopsis
int ged_setintpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Pickpunktanzeigemodus:
                              //        0 = keine Pickpunktanzeige
                              //        1 = Pickpunktanzeige
                              //        2 = Pick point wide display
                              //        3 = Pick point edit display
                              //    1 = Automatic DRC on layout load mode:
                              //        0 = no automatic DRC
                              //        1 = automatic DRC with verification
                              //        2 = automatic DRC without verification
                              //  [ 2 = use bae_setcolor instead ]
                              //    3 = Info display flag:
                              //        0 = No automatic info display
                              //        1 = Automatic info display
                              //    4 = Info display mode:
                              //        0 = No info display
                              //        1 = Complete info display
                              //        2 = Copper info only display
                              //    5 = Angle edit direction
                              //    6 = Part level element DRC mode:
                              //        0 = Complete DRC
                              //        1 = Consider part macros checked
                              //    7 = Grid corner scan mode:
                              //        0 = No grid corner scan
                              //        1 = Complete grid corner scan
                              //        2 = Current window corner scan
                              //        3 = Dynamic window corner scan
                              //             updated window
                              //    8 = Mincon update mode
                              //    9 = DRC polygon sub-type exclude bits
                              //    10 = Warning output mode:
                              //        Bit 0: Supress SCM changed warnings
                              //        Bit 1: Supress copper fill problem polygon group selection wanrnings
                              //        Bit 2: Supress variant mismatch warnings
                              //        Bit 3: Supress autorouter mode termination warnings
                              //    11 = Layer usage scan mode
                              //    12 = Area polygon edit mode:
                              //        0 = don't close polylines
                              //        1 = always close polylines
                              //        2 = polyline close prompt
                              //    13 = DRC distance display pattern
                              //    14 = Trace edit pick mode:
                              //        0 = snap to input grid
                              //        1 = pin/trace snap at first trace corner
                              //  [ 15 = System parameter - no write access ]
                              //    16 = Trace net deletion query limit
                              //    17 = Plot preview mode:
                              //        0 = none
                              //        1 = plotter pen width
                              //    18 = DRC distance display mode:
                              //        0 = none
                              //        1 = trace distance line
                              //        2 = area distance line
                              //        3 = trace distance pattern
                              //        4 = area distance pattern
                              //    19 = Text layer mirroring mode:
                              //        0 = no layer mirroring
                              //        1 = documentary layer mirroring
                              //        2 = signal and documentary layer mirroring
                              //    20 = Default part mirroring mode
                              //    21 = Autosave interval
                              //    22 = Part airline display mode:
                              //        0 = No airlines
                              //        1 = Static airlines
                              //        2 = Dynamic airlines
                              //    23 = Angle lock toggle mode:
                              //        0 = Pick side default
                              //        1 = Grid toggle
                              //        2 = Shorter side toggle
                              //        3 = Edit direction
                              //    24 = Copper fill heat trap mode:
                              //        0 = Direct Connect
                              //        1 = Pin & Via Heat Traps
                              //        2 = Pin Heat Traps
                              //        3 = Via Heat Traps
                              //        |4 = No Neighbour Pins Flag
                              //        |8 = Heat Trap Trace Flag
                              //        |16 = Only Unconnected Layers
                              //    25 = Copper fill trace mode:
                              //        0 = Round Corners
                              //        1 = Octagonal Corners
                              //        2 = Octagonal Circles
                              //        3 = Octagonal Corners & Circles
                              //    26 = Copper fill island mode:
                              //        0 = Keep Islands
                              //        1 = Delete Islands
                              //        2 = Select Islands
                              //    27 = Copper fill inside area mode:
                              //        0 = Inner Fill Area Fill
                              //        1 = Inner Fill Area Keepout
                              //        |2 = Keepout Areas without Distance
                              //    28 = Copper fill max. heat trap junctions
                              //    29 = Copper fill acute angle mode:
                              //        0 = Acute Angles flat
                              //        1 = Acute Angles round
                              //    30 = Copper fill hatch mode:
                              //        0 = Line Hatching
                              //        1 = Grid Hatching
                              //        |2 = Create Editable Paths
                              //    31 = Net visibility dialog box mode:
                              //        0 = Single column net name list display
                              //        1 = Multi-column net name list display
                              //    32 = Group move display mode:
                              //        0 = Moving Picture Off
                              //        1 = Display Group Layer Only
                              //        2 = Moving Picture On
                              //        3 = Moving Picture All
                              //    33 = Group trace selection mode:
                              //        0 = Select Traces & Vias
                              //        1 = Select Traces Only
                              //        2 = Select Vias Only
                              //    34 = Pick prefered layer (LAY1) without actions
                              //    35 = Clipboard text placement request flag
                              //    36 = Edit direction
                              //    37 = Mincon Area Mode (Bit Patterns):
                              //        0 = No Area Mincon
                              //        |1 = Copper Area Mincon
                              //        |2 = Connected Copper Area Mincon
                              //    38 = Group angle lock mode:
                              //        0 = Keep group angle lock
                              //        1 = Automatically release group angle lock
                              //    39 = Autoplacement Optimizer Passes
                              //    40 = Autoplacement Part Swap On/Off Flag
                              //    41 = Autoplacement Pin/Gate Swap On/Off Flag
                              //    42 = Autoplacement Mirroring Mode:
                              //        0 = No SMD mirroring
                              //        1 = SMD Mirroring
                              //        2 = SMD 2-Pin Mirroring
                              //        3 = Only SMD Mirroring
                              //    43 = Autoplacement Rotation Mode:
                              //        0 = 0-90 Degree Rotation
                              //        1 = 0-270 Degree Rotation
                              //        2 = 0 Degree Rotation
                              //        3 = 90 Degree Rotation
                              //        4 = 0 XOR 90 Degree Rotation
                              //    44 = Autoplacement Retry Passes
                              //    45 = Autoplacement SMD Rotation Mode:
                              //        0 = 0-90 Degree Rotation
                              //        1 = 0-270 Degree Rotation
                              //        2 = 0 Degree Rotation
                              //        3 = 90 Degree Rotation
                              //        4 = 0 XOR 90 Degree Rotation
                              //    46 = Autoplacement Part Outline Layer (LAY1)
                              //    47 = Group visibility mode:
                              //        0 = Select all elements
                              //        1 = Select visible elements only
                              //    48 = Default text mirror mode and text mode (STD14|LAY14)
                              //    49 = Autorouter Number of optimization runs
                              //    50 = Autorouter Optimizer characteristic
                              //    51 = Autorouter Max. number of vias per connection
                              //    52 = Autorouter Router via delay at 1/10"
                              //    53 = Autorouter Router pin channel delay
                              //    54 = Autorouter Cross direction delay
                              //    55 = Autorouter Direction change delay
                              //    56 = Autorouter Path packing delay
                              //    57 = Autorouter Statistical delay base
                              //    58 = Autorouter Max. rip-ups per con.
                              //    59 = Autorouter Max. rip-up level
                              //    60 = Autorouter Max. number of rip-up retries
                              //    61 = Autorouter Router via grid index
                              //    62 = Autorouter Bus structure delay
                              //    63 = Autorouter Re-route area 1 delay
                              //    64 = Autorouter Re-route area 2 delay
                              //    65 = Autorouter Skip existing path delay
                              //    66 = Autorouter Router cleaning run enable
                              //    67 = Autorouter Optim. cleaning run enable
                              //    68 = Autorouter Power connection vector unroutes
                              //    69 = Autorouter Automatic save enable
                              //    70 = Autorouter Corner connection output enable
                              //    71 = Autorouter Unroute output sort mode
                              //    72 = Autorouter Corner mitring mode
                              //    73 = Autorouter Existing traces orientation mode
                              //    74 = Autorouter Standard connection layer delay
                              //    75 = Autorouter Bus connection layer delay
                              //    76 = Autorouter Wave limitation offset
                              //    77 = Autorouter Gridless via check mode
                              //    78 = Autorouter Input error checking mode
                              //    79 = Autorouter Trace to pin entry mode
                              //    80 = Autorouter Requested subgrid factor
                              //    81 = Autorouter Router off-grid delay
                              //    82 = Autorouter Bus recognition and routing mode
                              //    83 = Autorouter SMD pin-via pass enable
                              //    84 = Autorouter Pin/gate swap mode
                              //    85 = Autorouter Requested gridless routing mode
                              //    86 = Autorouter Incremental output mode
                              //    87 = Autorouter Router prefered grid shift
                              //    88 = Autorouter Router prefered grid delay
                              //    89 = Autorouter Outside net area delay
                              //    90 = Autorouter Last optimization par. change mode
                              //    91 = Autorouter Auto rip-up parameter mode
                              //    92 = Autorouter Prefered routing direction mode
                              //    93 = Autorouter Optimizer order mode
                              //    94 = Autorouter Via rip-up flag
                              //    95 = Autorouter Routing window border size
                              //    96 = Autorouter BGA fan out enable flag
                              //    97 = Autorouter Fan out gridded check mode
                              //    98 = Autorouter Alternate via shift mode
                              //    99 = Autorouter Full via evaluation mode
                              //    100 = Autorouter Micro via mode
                              //    101 = Autorouter Forced dir. max. derivation
                              //    102 = Autorouter Routing frame window flag
                              //    103 = Autorouter Requested pad entry subgrid
                              //    104 = Autorouter Power layer via mode
                              //    105 = Autorouter Via check mode
                              //    106 = Autorouter Large net connection count
                              //    107 = Autorouter Autorouting active flag
                              //    108 = CAM Heat trap base angle
                              //    109 = Single corner edit flag
                              //    110 = Resize with round corners flag
                              //    111 = Hidden DRC errors display flag
                              //    112 = DRC violation elements scan flag
                              //    113 = Part placement trace move mode
                              //        0 = No trace move
                              //        1 = Trace end move
                              //        2 = Trace segment move
                              //    114 = Polygon edit autocomplete flag
                              //    115 = Board Outline alternative documentary layer (LAY1)
                              //    116 = Trace join query mode:
                              //        0 = Never join traces
                              //        1 = Always join traces
                              //        2 = Query for trace join
                              //    117 = Trace display class bits (LAY15)
                              //    118 = Text display class bits (LAY15)
                              //    119 = Copper polygon display class bits (LAY15)
                              //    120 = Forbidden area polygon display class bits (LAY15)
                              //    121 = Border polygon display class bits (LAY15)
                              //    122 = Connected copper polygon display class bits (LAY15)
                              //    123 = Documentary line display class bits (LAY15)
                              //    124 = Documentary area display class bits (LAY15)
                              //    125 = Copper fill with cutout polygon display class bits (LAY15)
                              //    126 = Hatched copper polygon display class bits (LAY15)
                              //    127 = Split power plane polygon display class bits (LAY15)
                              //    128 = Flag - Color table saved
                              //    129 = Airline color mode:
                              //        0 = Use unroutes color
                              //        1 = Use layer color
                              //    130 = Airline clipping mode:
                              //        0 = No unroutes clipping
                              //        1 = Clip unroutes without workspace target
                              //    131 = Trace collision mode:
                              //        -1 = Query for operation
                              //        0 = Ignore collisions
                              //        1 = Delete colliding traces
                              //        2 = Delete colliding segments
                              //        3 = Cut colliding segments
                              //    132 = Layout trace merge query mode:
                              //        0 = Never merge layout traces
                              //        1 = Always merge layout traces
                              //        2 = Query merge mode
                              //    133 = Part trace merge query mode:
                              //        0 = Never merge part traces
                              //        1 = Always merge part traces
                              //        2 = Query merge mode
                              //    135 = Element move polygon display mode:
                              //        0 = Display outline
                              //        1 = Display filled
                              //    136 = Group move airline display mode:
                              //        0 = Airline Display Off
                              //        1 = Display Group Part Pin Airlines
                              //    137 = Trace collision distance check mode:
                              //        0 = Use DRC distance for collision check
                              //        1 = Consider only crossings as collision
                              //    138 = Trace segment bundle pick mode:
                              //        0 = Continuous segment pick
                              //        1 = Pick first and last bundle segment
                              //    139 = Trace segment insert pick mode:
                              //        0 = 3 click selection
                              //        1 = 2 click selection
                              //    140 = Part edit DRC:
                              //        0 = no part edit online DRC
                              //        1 = part edit online DRC
                              //    141 = Drill tool table optimization flag
                              //    142 = Bus trace count
                              //    143 = Edit bus trace count
                              //    144 = Bus trace creation mode:
                              //        0 = Create trace bundle
                              //        1 = Create seperate traces
                              //    145 = Bus trace corner mode:
                              //        0 = Create angle corners
                              //        1 = Create arc corners
                              //    146 = Silk screen layer (LAY1)
                              //    147 = Macro outline display mode:
                              //        0 = No macro outline display
                              //        1 = Display macro outline at moved references
                              //        2 = Display macro outlines
      int;                    // Parameter value
      );
Description
The ged_setintpar function is used to set Layout Editor integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ged_getintpar function can be used to query parameter values set with ged_setintpar.
See also
Functions ged_getdblpar, ged_getintpar, ged_getstrpar, ged_setdblpar, ged_setstrpar.

ged_setlaydefmode - Set GED default layer mode (GED)

Synopsis
int ged_setlaydefmode(        // Returns status
      int [0,2];              // Default layer mode:
                              //    0 = automatic layer default disabled
                              //    1 = used edit layer as layer default
                              //    2 = last used layer as layer default
      );
Description
The ged_setlaydefmode function sets the Layout Editor default layer mode. The function returns zero if the assignment was successful or non-zero on error.
See also
Functions ged_getlaydefmode, ged_getlayerdefault, ged_setlayerdefault.

ged_setlayerdefault - Set GED default layer (GED)

Synopsis
int ged_setlayerdefault(      // Returns status
      int;                    // Layer (LAY1)
      );
Description
The ged_setlayerdefault function sets the Layout Editor default layer. The function returns zero if the assignment was successful or non-zero on error.
See also
Functions ged_getlaydefmode, ged_getlayerdefault, ged_setlaydefmode.

ged_setmincon - Set GED Mincon function type (GED)

Synopsis
int ged_setmincon(            // Returns status
      int [0,8];              // Required Mincon function type (LAY10)
      );
Description
The ged_setmincon function sets the currently active Layout Editor Mincon function type, i.e., the airline display mode (LAY10). The function returns nonzero if an invalid Mincon function type value has been specified.

ged_setnetattrib - Set GED net attribute value (GED)

Synopsis
int ged_setnetattrib(         // Returns status
      string;                 // Net name
      string;                 // Attribute name
      string;                 // Attribute value
      );
Description
The ged_setnetattrib function assigns a value to the given attribute of the name-specified net. Attribute values with a maximum length of up to 40 characters can be stored. The function returns zero on successful attribute value assignment, (-1) if no valid element is loaded, (-2) on missing and/or invalid parameters, (-3) if the net has not been found or (-4) if the attribute with the given name is not defined on the specified net.

ged_setpathwidth - Set GED path standard width (GED)

Synopsis
int ged_setpathwidth(         // Returns status
      double ]0.0,[;          // Required small path width (STD2)
      double ]0.0,[;          // Required wide path width (STD2)
      );
Description
The ged_setpathwidth function sets the currently active Layout Editor standard widths for small and wide traces. The function returns nonzero if invalid an invalid width value has been specified.

ged_setpickelem - GED Defaultpickelement setzen (GED)

Synopsis
int ged_setpickelem(          // Returns status
      index L_FIGURE;         // Default pick element
      );
Description
The ged_setpickelem function sets a default element for subsequent Layout Editor pick operations. The function returns zero if done or nonzero on error.
See also
Function ged_pickelem.

ged_setpickmode - Set GED element pick mode (GED)

Synopsis
int ged_setpickmode(          // Returns status
      int [0,2];              // Element pick mode:
                              //    0 = Pick peference layer pick
                              //    1 = Pick with element selection
                              //	2 = Exclusive pick preference layer pick
      );
Description
The ged_setpickmode function sets the Layout Editor element pick mode. The function returns nonzero for invalid pick mode specifications.
See also
Function ged_getpickmode.

ged_setpickpreflay - Set GED pick preference layer (GED)

Synopsis
int ged_setpickpreflay(       // Returns status
      int;                    // Required pick preference layer (LAY1)
      );
Description
The ged_setpickpreflay function sets the currently active Layout Editor pick preference layer for element selection (LAY1). The function returns nonzero if an invalid pick preference layer has been specified.

ged_setplantoplay - Set GED layout top layer (GED)

Synopsis
int ged_setplantoplay(        // Returns status
      int [0,99];             // Required layout top layer (LAY1)
      );
Description
The ged_setplantoplay function defines the Layout Editor and/or layout element top layer setting. The function returns nonzero if an invalid signal layer has been specified.

ged_setsegmovmode - Set GED trace segment move mode (GED)

Synopsis
int ged_setsegmovmode(        // Returns status
      int [0,12];             // Trace segment move mode:
                              //    0 = Move without neighbours
                              //    1 = Move with neighbours
                              //    2 = Adjust neighbours
                              //    3 = Adjust neighbours without vias
                              //    8 = Adjust next neighbours only
                              //    |4 = Open trace ends follow segment movement
      );
Description
The ged_setsegmovmode function sets the Layout Editor trace segment move mode. The function returns zero if the assignment was successful or non-zero on error.
See also
Function ged_getsegmovmode.

ged_setstrpar - Set GED string parameter (GED)

Synopsis
int ged_setstrpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //  [ 0 = System parameter - no write access ]
                              //  [ 1 = System parameter - no write access ]
                              //    2 = Last placed text string
                              //    3 = Standard library name
                              //  [ 4 = System parameter - no write access ]
                              //    5 = Drill naming base
                              //    6 = Drill part macro name pattern
                              //    7 = Drill padstack macro name pattern
                              //    8 = Input prompt override string
                              //  [ 9 = System parameter - no write access ]
                              //    10 = Autosave path name
      string;                 // Parameter value
      );
Description
The ged_setstrpar function is used to set Layout Editor string system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ged_getstrpar function can be used to query parameter values set with ged_setstrpar.
See also
Functions ged_getdblpar, ged_getintpar, ged_getstrpar, ged_setdblpar, ged_setintpar.

ged_setviaoptmode - Set GED trace via optimization mode (GED)

Synopsis
int ged_setviaoptmode(        // Returns status
      int [0,1];              // Trace via optimization mode:
                              //    0 = Via optimization
                              //    1 = Keep vias
      );
Description
The ged_setviaoptmode function sets the Layout Editor trace via optimization mode. The function returns zero if the assignment was successful or non-zero on error.
See also
Function ged_getviaoptmode.

ged_setwidedraw - Set GED wide line display start width (GED)

Synopsis
int ged_setwidedraw(          // Returns status
      double ]0.0,[;          // Required width value (STD2)
      );
Description
The ged_setwidedraw function sets the current Layout Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value is specified.

ged_storedrill - Place GED drill hole (GED)

Synopsis
int ged_storedrill(           // Returns status
      double;                 // Drill X coordinate (STD2)
      double;                 // Drill Y coordinate (STD2)
      double ]0.0,[;          // Drill radius (STD2)
      int [0,[;               // Drill class (LAY5)
      );
Description
The ged_storedrill function stores a drill hole with the given placement parameters to the currently loaded layout element. The function returns nonzero on wrong environment or missing/invalid parameters.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_storepart - Place GED part or padstack (GED)

Synopsis
int ged_storepart(            // Returns status
      string;                 // Reference name
      string;                 // Library symbol name
      double;                 // X coordinate (STD2)
      double;                 // Y coordinate (STD2)
      double;                 // Rotation angle (STD3)
      int [0,1];              // Mirror mode (STD14)
      );
Description
The ged_storepart function stores a part (or padstack) with the given placement parameters to the currently loaded layout (or part) element. The next unplaced net list part is used if an empty string is passed for the reference name. The function returns zero if the part has been successfully placed, (1) if the part pins do not match the net list specifications, (-1) on wrong environment or missing/invalid parameters, (-2) if all parts are placed already, (-3) if the specified part is placed already, (-4) if the part cannot be loaded or (-6) if the part data could not be copied to the current job file.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ged_storepath - Place GED internal polygon as path (GED)

Synopsis
int ged_storepath(            // Returns status
      int [0,99];             // Path layer (LAY1)
      double ]0.0,[;          // Path width (STD2)
      );
Description
The ged_storepath function generates a trace on the currently loaded layout and/or part using the specified placement parameters. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is invalid.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Functions bae_storepoint, ged_drcpath.

ged_storepoly - Place GED internal polygon (GED)

Synopsis
int ged_storepoly(            // Returns status
      int;                    // Polygon layer (LAY1)
      int [1,9];              // Polygon type (LAY4)
      string;                 // Polygon net name (for LAY4 types 4, 6 and 9)
      int [0,18];             // Polygon mirror mode (LAY3)
      );
Description
The ged_storepoly function generates a polygon on the currently loaded layout element using the specified placement parameters. The polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the polygon has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is not valid for the specified polygon type.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Functions bae_storepoint, ged_drcpoly.

ged_storetext - Place GED text (GED)

Synopsis
int ged_storetext(            // Returns status
      string;                 // Text string
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      double ]0.0,[;          // Text size (STD2)
      int;                    // Text layer (LAY1)
      int;                    // Text mirror mode and style (STD14|LAY14)
      );
Description
The ged_storetext function generates a text on the currently loaded layout element using the specified placement parameters. The function return value is nonzero on wrong environment or missing/invalid parameters.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops. The input text string can be stored to a maximum of up to 40 characters; longer strings cause the function to return with an invalid parameter error code.
See also
Function ged_attachtextpos.

ged_storeuref - Place GED unnamed reference (via or pad) (GED)

Synopsis
int ged_storeuref(            // Returns status
      string;                 // Library symbol name
      double;                 // Reference X coordinate (STD2)
      double;                 // Reference Y coordinate (STD2)
      double;                 // Reference rotation angle (STD3)
      int;                    // Reference layer (LAY1)
      int [0,1];              // Reference mirror (STD14)
      );
Description
The ged_storeuref function stores an unnamed reference (via or pad) with the given placement parameters to the currently loaded layout element (layout, part or padstack). For vias, the reference mirror mode, the reference layer and the rotation angle are ignored. The function returns zero if the reference has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if the reference cannot be loaded or (-3) if the reference data could not be copied to the current job file.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
 

C.4.3 Autorouter Functions

The following User Language system functions are assigned to caller type AR; i.e., they can be called from the Autorouter interpreter environment of the Bartels AutoEngineer:


ar_asklayer - Autorouter layer selection (AR)

Synopsis
int ar_asklayer(              // Returns status
      & int;                  // Returns selected layer (LAY1|LAY9)
      int [0,5];              // Layer query type:
                              //    0 = Documentary layers and signal layers
                              //    1 = Signal layers
                              //    2 = Signal layers
                              //        (including Top Layer and All Layers)
                              //    3 = Documentary layers
                              //    4 = Signal and power layers
                              //    5 = arbitrary display element types
      );
Description
The ar_asklayer function activates an Autorouter layer selection menu. The layer query type designates the type of layers and/or display element types provided for selection. The function returns zero if a valid layer has been selected or (-1) if the layer selection was aborted.

ar_delelem - Delete Autorouter figure list element (AR)

Synopsis
int ar_delelem(               // Returns status
      & index L_FIGURE;       // Element
      );
Description
The ar_delelem function deletes the given figure list element from the figure list. The function returns zero if the element was successfully deleted or nonzero on error.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Function ar_drawelem.

ar_drawelem - Redraw Autorouter figure list element (AR)

Synopsis
void ar_drawelem(
      index L_FIGURE;         // Element
      int [0, 4];             // Drawing mode (STD19)
      );
Description
The ar_drawelem function updates the display of the given figure list element using the specified drawing mode.
See also
Function ar_delelem.

ar_elemangchg - Change Autorouter figure list element rotation angle (AR)

Synopsis
int ar_elemangchg(            // Returns status
      & index L_FIGURE;       // Element
      double;                 // New rotation angle (STD3)
      );
Description
The ar_elemangchg function changes the rotation angle of the given figure list element. The rotation angle must be in radians. The function returns zero if the element has been successfully rotated, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be rotated.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_elemfixchg - Change Autorouter figure list element fixed flag (AR)

Synopsis
int ar_elemfixchg(            // Returns status
      & index L_FIGURE;       // Element
      int [0,1];              // New fixed flag (STD11)
      );
Description
The ar_elemfixchg function changes the fixed flag of the given figure list element. The fixed flag value 0 unfixes the element, the fixed flag value 1 fixes the element. The function returns zero if the element fixed flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be fixed.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_elemlaychg - Change Autorouter figure list element layer (AR)

Synopsis
int ar_elemlaychg(            // Returns status
      & index L_FIGURE;       // Element
      int;                    // New layer (LAY1)
      );
Description
The ar_elemlaychg function changes the layer of the given figure list element. The layer can be set for polygons, traces, texts, pads (on padstack level) and drill holes. For drill holes the layer input parameter specifies the drill class code. The function returns zero if the element layer has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element layer cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_elemmirrchg - Change Autorouter figure list element mirror mode (AR)

Synopsis
int ar_elemmirrchg(           // Returns status
      & index L_FIGURE;       // Element
      int [0,18];             // New mirror mode (STD14|LAY3)
      );
Description
The ar_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for polygons, texts and references. The function returns zero if the element mirror mode has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element mirror mode cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_elemposchg - Change Autorouter figure list element position (AR)

Synopsis
int ar_elemposchg(            // Returns status
      & index L_FIGURE;       // Element
      double;                 // New X coordinate (STD2)
      double;                 // New Y coordinate (STD2)
      );
Description
The ar_elemposchg function changes the position of the given figure list element. Polygons and/or traces are replaced to set the first point of the polygon/trace to the specified position. The function returns zero if the element has been successfully repositioned, (-1) if the figure list element is invalid or (-2) if the figure list element position cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_elemsizechg - Change Autorouter figure list element size (AR)

Synopsis
int ar_elemsizechg(           // Returns status
      & index L_FIGURE;       // Element
      double;                 // New size (STD2)
      );
Description
The ar_elemsizechg function changes the size of the given figure list element. The size can be changed for texts, drill holes and traces. For traces, a trace width change is performed. The functions value is zero if the element size has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element size cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_getdblpar - Get Autorouter double parameter (AR)

Synopsis
int ar_getdblpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Net visibility dialog net name list control element width
                              //    1 = User-defined routing grid
      & double;               // Returns parameter value
      );
Description
The ar_getdblpar function is used to query Autorouter double parameters previously set with ar_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions ar_getintpar, ar_getstrpar, ar_setdblpar, ar_setintpar, ar_setstrpar.

ar_getintpar - Get Autorouter integer parameter (AR)

Synopsis
int ar_getintpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Top layer color code
                              //    1 = Mincon update mode
                              //    2 = Warning output mode:
                              //        Bit 0: Supress SCM changed warnings
                              //        Bit 1: not used in Autorouter
                              //        Bit 2: Suppress variant mismatch warnings
                              //    3 = Autosave interval
                              //    4 = Net visibility dialog box mode:
                              //        0 = Single column net name list display
                              //        1 = Multi-column net name list display
                              //    5 = Routing layer count
                              //    6 = Routing grid code:
                              //        0 = 1/20 Inch (1.27 mm) Standard
                              //        1 = 1/40 Inch (0.635 mm) Standard
                              //        2 = 1/50 Inch (0.508 mm) Standard
                              //        3 = 1/60 Inch (0.4233 mm) Standard
                              //        4 = 1/80 Inch (0.3175 mm) Standard
                              //        5 = 1/100 Inch (0.254 mm) Standard
                              //        6 = 1/40 Inch (0.635 mm) no Offset
                              //        7 = 1/60 Inch (0.4233 mm) no Offset
                              //        8 = 1/80 Inch (0.3175 mm) no Offset
                              //        9 = 1/100 Inch (0.254 mm) with Offset
                              //        -1 = Other Grid
                              //        -2 = Other Grid with Offset
                              //    7 = Mincon-Flächenmodus (Bitmuster):
                              //        0 = Kein Flächen-Mincon
                              //        |1 = Kupferflächen-Mincon
                              //        |2 = Potentialflächen-Mincon
                              //    8 = Flag - Color table saved
                              //    9 = Airline color mode:
                              //        0 = Use unroutes color
                              //        1 = Use layer color
                              //    10 = Drill tool table optimization flag
      & int;                  // Returns parameter value
      );
Description
The ar_getintpar function is used to query Autorouter integer parameters previously set with ar_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions ar_getdblpar, ar_getstrpar, ar_setdblpar, ar_setintpar, ar_setstrpar.

ar_getmincon - Get Autorouter Mincon function type (AR)

Synopsis
int ar_getmincon(             // Returns Mincon function type (LAY10)
      );
Description
The ar_getmincon function returns the currently active Autorouter Mincon function type, i.e., the airline display mode (LAY10).

ar_getpickpreflay - Get Autorouter pick preference layer (AR)

Synopsis
int ar_getpickpreflay(        // Returns pick preference layer (LAY1)
      );
Description
The ar_getpickpreflay function returns the currently active Autorouter pick preference layer for element selection (LAY1).

ar_getstrpar - Get Autorouter string parameter (AR)

Synopsis
int ar_getstrpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Autosave path name
      & string;               // Returns parameter value
      );
Description
The ar_getstrpar function is used to query Autorouter string parameter settings. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions ar_getdblpar, ar_getintpar, ar_setdblpar, ar_setintpar, ar_setstrpar.

ar_getwidedraw - Get Autorouter wide line display start width (AR)

Synopsis
double ar_getwidedraw(        // Returns width value (STD2)
      );
Description
The ar_getwidedraw function returns the current Autorouter wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.

ar_highlnet - Set Autorouter net highlight mode (AR)

Synopsis
int ar_highlnet(              // Returns status
      int [0,[;               // Net tree number
      int [0,1];              // Highlight mode (0 = off, 1 = on)
      );
Description
The ar_highlnet function sets the highlight mode of the net specified by the given net tree number. A highlight mode value of 1 highlights the net, a highlight mode value of 0 de-highlight the net. The function returns nonzero if an invalid net tree number and/or highlight mode value has been specified.

ar_partnamechg - Change Autorouter net list part name (AR)

Synopsis
int ar_partnamechg(           // Returns status
      string;                 // Old part name
      string;                 // New part name
      );
Description
The ar_partnamechg function changes the name of a net list part. The function returns nonzero if the part name has been successfully changed, (-1) for invalid input parameters, (-2) if the specified part is not yet placed, (-3) if the specified part does not exist in the net list, (-4) if the new name exists already and (-5) on multiple name change requests (e.g., a to b and then b to c) in one program run.
Warning
This function changes the net list and therefore requires a Backannotation. It is strongly recommended not to use this function in L_CPART index loops since the current L_CPART index variables are invalid after calling ar_partnamechg.

ar_pickelem - Pick Autorouter figure list element with mouse (AR)

Synopsis
int ar_pickelem(              // Returns status
      & index L_FIGURE;       // Returns picked element
      int [1,9];              // Pick element type (LAY6 except 7)
      );
Description
The ar_pickelem function activates an interactive figure list element pick request (with mouse). The required pick element type is specified with the second parameter. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element of the required type has been found at the pick position.

ar_setdblpar - Set Autorouter double parameter (AR)

Synopsis
int ar_setdblpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Net visibility dialog net name list control element width
                              //  [ 1 = System parameter - no write access ]
      double;                 // Parameter value
      );
Description
The ar_setdblpar function is used to set Autorouter double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ar_getdblpar function can be used to query parameter values set with ar_setdblpar.
See also
Functions ar_getdblpar, ar_getintpar, ar_getstrpar, ar_setintpar, ar_setstrpar.

ar_setintpar - Set Autorouter integer parameter (AR)

Synopsis
int ar_setintpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //  [ 0 = use bae_setcolor instead ]
                              //    1 = Mincon update mode
                              //    2 = Warning output mode:
                              //        Bit 0: Supress SCM changed warnings
                              //        Bit 1: not used in Autorouter
                              //        Bit 2: Supress variant mismatch warnings
                              //    3 = Autosave interval
                              //    4 = Net visibility dialog box mode:
                              //        0 = Single column net name list display
                              //        1 = Multi-column net name list display
                              //  [ 5 = System parameter - no write access ]
                              //  [ 6 = System parameter - no write access ]
                              //    7 = Mincon Area Mode (Bit Patterns):
                              //        0 = No Area Mincon
                              //        |1 = Copper Area Mincon
                              //        |2 = Connected Copper Area Mincon
                              //    8 = Flag - Color table saved
                              //    9 = Airline color mode:
                              //        0 = Use unroutes color
                              //        1 = Use layer color
                              //    10 = Drill tool table optimization flag
      int;                    // Parameter value
      );
Description
The ar_setintpar function is used to set Autorouter integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ar_getintpar function can be used to query parameter values set with ar_setintpar.
See also
Functions ar_getdblpar, ar_getintpar, ar_getstrpar, ar_setdblpar, ar_setstrpar.

ar_setmincon - Set Autorouter Mincon function type (AR)

Synopsis
int ar_setmincon(             // Returns status
      int [0,8];              // Required Mincon function type (LAY10)
      );
Description
The ar_setmincon function sets the currently active Autorouter Mincon function type, i.e., the airline display mode (LAY10). The function returns nonzero if an invalid Mincon function type value has been specified.

ar_setnetattrib - Set Autorouter net attribute value (AR)

Synopsis
int ar_setnetattrib(          // Returns status
      string;                 // Net name
      string;                 // Attribute name
      string;                 // Attribute value
      );
Description
The ar_setnetattrib function assigns a value to the given attribute of the name-specified net. Attribute values with a maximum length of up to 40 characters can be stored. The function returns zero if the attribute value assignment was successful, (-1) if no valid element is loaded, (-2) on missing and/or invalid parameters, (-3) if the net has not been found or (-4) if the attribute with the given name is not defined on the specified net.

ar_setpickpreflay - Set Autorouter pick preference layer (AR)

Synopsis
int ar_setpickpreflay(        // Returns status
      int;                    // Required pick preference layer (LAY1)
      );
Description
The ar_setpickpreflay function sets the currently active Autorouter pick preference layer for element selection (LAY1). The function returns nonzero if an invalid pick preference layer has been specified.

ar_setplantoplay - Set Autorouter layout top layer (AR)

Synopsis
int ar_setplantoplay(         // Returns status
      int [0,99];             // Required layout top layer (LAY1)
      );
Description
The ar_setplantoplay function defines the Autorouter and/or layout element top layer setting. The function returns nonzero if an invalid signal layer has been specified.

ar_setstrpar - Set Autorouter string parameter (GED)

Synopsis
int ar_setstrpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Autosave path name
      string;                 // Parameter value
      );
Description
The ar_setstrpar function is used to set Autorouter string system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The ar_getstrpar function can be used to query parameter values set with ar_setstrpar.
See also
Functions ar_getdblpar, ar_getintpar, ar_getstrpar, ar_setdblpar, ar_setintpar.

ar_setwidedraw - Set Autorouter wide line display start width (AR)

Synopsis
int ar_setwidedraw(           // Returns status
      double ]0.0,[;          // Required width value (STD2)
      );
Description
The ar_setwidedraw function sets the current Autorouter wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value has been specified.

ar_storepart - Place Autorouter part or padstack (AR)

Synopsis
int ar_storepart(             // Returns status
      string;                 // Reference name
      string;                 // Library symbol name
      double;                 // X coordinate (STD2)
      double;                 // Y coordinate (STD2)
      double;                 // Rotation angle (STD3)
      int [0,1];              // Mirror mode (STD14)
      );
Description
The ar_storepart function stores a part (or padstack) with the given placement parameters to the currently loaded layout (or part) element. The next unplaced and selected net list part is used if an empty string is passed for the reference name. The function returns zero if the part has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if all parts are already placed, (-3) if the specified part is already placed, (-4) if the part cannot be loaded, (-5) if the part pins do not match the net list specifications or (-6) if the part data could not be copied to the current job file.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_storepath - Place Autorouter internal polygon as path (AR)

Synopsis
int ar_storepath(             // Returns status
      int [0,99];             // Path layer (LAY1)
      double ]0.0,[;          // Path width (STD2)
      );
Description
The ar_storepath function generates a trace on the currently loaded layout or part using the specified placement parameters. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is invalid.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ar_storeuref - Place Autorouter unnamed reference (via or pad) (AR)

Synopsis
int ar_storeuref(             // Returns status
      string;                 // Library symbol name
      double;                 // Reference X coordinate (STD2)
      double;                 // Reference Y coordinate (STD2)
      double;                 // Reference rotation angle (STD3)
      int;                    // Reference layer (LAY1)
      int [0,1];              // Reference mirror (STD14)
      );
Description
The ar_storeuref function stores an unnamed reference (via or pad) with the given placement parameters to the currently loaded layout element (layout, part or padstack). For vias, the reference mirror mode, the reference layer and the rotation angle are ignored. The function returns zero if the reference has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if the reference cannot be loaded or (-3) if the reference data could not be copied to the current job file.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating L_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
 

C.4.4 CAM Processor Functions

The following User Language system functions are assigned to caller type CAM; i.e., they can be called from the CAM Processor interpreter environment of the Bartels AutoEngineer:


cam_askplotlayer - CAM plot layer selection (CAM)

Synopsis
int cam_askplotlayer(         // Returns status
      & int;                  // Returns selected layer (LAY1)
      );
Description
The cam_askplotlayer function activates a CAM Processor layer selection menu. The function returns zero if a valid layer has been selected or (-1) if the layer selection has been aborted.

cam_getdblpar - Get CAM double parameter (CV)

Synopsis
int cam_getdblpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    [ 0 = System parameter; write-only access ]
                              //    1 = Pixel bitmap resolution (STD2)
                              //    2 = Last bitmap plot pixel ratio
      & double;               // Returns parameter value
      );
Description
The cam_getdblpar function is used to query CAM Processor double parameters previously set with cam_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions cam_getintpar, cam_setdblpar, cam_setintpar.

cam_getdrlaccuracy - CAM drill tool tolerance query (CAM)

Synopsis
double cam_getdrlaccuracy(    // Drill tool tolerance (STD2)
      );
Description
The cam_getdrlaccuracy function returns the CAM Processor drill tool tolerance.
See also
Function cam_setdrlaccuracy.

cam_getgenpltparam - CAM general plot parameter query (CAM)

Synopsis
void cam_getgenpltparam(
      & int;                  // Plot all layers off/on (1=on, 0=off)
      & int;                  // Plot border off/on flag (1=on, 0=off)
      & int;                  // Plot rotate off/on flag:
                              //    0 = rotate 0 degree
                              //    1 = rotate 90 degree left
      & int;                  // Plot mirror mode (CAM1)
      & int;                  // Plot markers off/on flag:
                              //    0 = off
                              //    1 = on
      & double;               // Plot accuracy (STD2)
      & double;               // Plot origin X coordinate (STD2)
      & double;               // Plot origin Y coordinate (STD2)
      );
Description
The cam_getgenpltparam function returns the CAM Processor general plot parameters.

cam_getgerberapt - CAM Gerber aperture definition query (CAM)

Synopsis
int cam_getgerberapt(         // Returns status
      int [1,900];            // Aperture table index
      & int;                  // Aperture D-code:
                              //    10..999 = valid D-codes
                              //       (-1) = aperture not defined
      & int;                  // Aperture type:
                              //    0 = special aperture
                              //    1 = round aperture
                              //    2 = square aperture
                              //    3 = thermal aperture (heat trap)
                              //    4 = rectangular aperture
      & int;                  // Aperture drawing mode:
                              //    0 = aperture for all drawing modes
                              //    1 = aperture for flash structures
                              //    2 = aperture for line structures
      & double;               // Aperture dimension/X size (STD2)
      & double;               // Aperture dimension/Y size (STD2)
      );
Description
The cam_getgerberapt function gets the definition of the Gerber aperture stored at the given table index of the aperture table currently loaded to the CAM Processor. A D-code of (-1) is returned if there is no aperture defined at the specified table position. The function returns nonzero on missing or invalid parameters.

cam_getgerberparam - CAM Gerber plot parameter query (CAM)

Synopsis
void cam_getgerberparam(
      & string;               // Gerber plot file name
      & double;               // Gerber standard line width (STD2)
      & int;                  // Gerber format (CAM4)
      & int;                  // Optimized Gerber output mode:
                              //    0 = Optimization off
                              //    1 = Optimization on
      & int;                  // Gerber fill mode:
                              //    0 = line fill
                              //    1 = multi-aperture fill
                              //    2 = G36/G37 fill
      & int;                  // Gerber arc output mode:
                              //    0 = use arc interpolation
                              //    1 = use Gerber I/J arc commands
      & int;                  // Extended Gerber (RS-274-X) mode:
                              //    0 = no Extended Gerber
                              //    1 = Extended Gerber with
                              //         standard aperture table
                              //    2 = Extended Gerber with
                              //         dynamic aperture table
      );
Description
The cam_getgerberparam function returns the CAM Processor Gerber plot parameters.

cam_gethpglparam - CAM HP-GL plot parameter query (CAM)

Synopsis
void cam_gethpglparam(
      & string;               // HP-GL plot file name
      & double;               // HP-GL plot scaling factor
      & double;               // HP-GL plotter speed (-1.0=full speed)
      & double;               // HP-GL plotter pen width (STD2)
      & int;                  // HP-GL plot area fill mode:
                              //    0 = fill off
                              //    1 = fill on
      );
Description
The cam_gethpglparam function returns the CAM Processor HP-GL plot parameters.

cam_getintpar - Get CAM integer parameter (CAM)

Synopsis
int cam_getintpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Top layer color code
                              //    1 = Heat trap base angle
                              //    2 = Warning output mode:
                              //        Bit 0: Supress SCM changed warnings
                              //        Bit 1: not used in CAM Processor
                              //        Bit 2: Suppress variant mismatch warnings
                              //    3 = Area mirror visibility mode:
                              //        0 = Normal area mirror visibility
                              //        1 = Disable area mirror visibility
                              //    4 = Last pixel plot result type:
                              //        -1 = No pixel plot yet
                              //        0 = Board outline pixel ratio
                              //        1 = Element borders pixel ratio
                              //    5 = Last pixel plot total pixel count
                              //    6 = Last pixel plot copper pixel count
                              //    7 = Generic printer scale mode:
                              //        0 = Fixed scale factor
                              //        1 = Scale to paper size
                              //    8 = Flag - Color table saved
                              //    9 = Airline color mode:
                              //        0 = Use unroutes color
                              //        1 = Use layer color
                              //    10 = Bitmap outline milling mode:
                              //        0 = No Milling
                              //        1 = Draw filled outline with millings
                              //    11 = Generic printer drawing mode:
                              //        0 = Set Color
                              //        1 = Merge Color
                              //    12 = Batch output flag
                              //    13 = Drill tool table optimization flag
                              //    14 = Plot preview mode:
                              //        0 = 0 = None
                              //        1 = 1 = Plotter pen width
      & int;                  // Returns parameter value
      );
Description
The cam_getintpar function is used to query CAM Processor integer parameters previously set with cam_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions cam_getdblpar, cam_setdblpar, cam_setintpar.

cam_getplotlaycode - CAM plot layer code query (CAM)

Synopsis
int cam_getplotlaycode(       // Returns HP-GL plot pen number (CAM4)
      int;                    // Layer number (LAY1)
      );
Description
The cam_getplotlaycode function returns the layer-specific HP-GL plot pen number currently selected for multilayer plots. The layer-specific HP-GL pen number is also used for non-HP-GL multilayer plots where positive pen numbers denote layers currently selected for output and negative pen numbers denote layers not selected for output.
See also
Function cam_setplotlaycode.

cam_getpowpltparam - CAM power layer plot parameter query (CAM)

Synopsis
void cam_getpowpltparam(
      & double;               // Min. distance heat-trap to drill (STD2)
      & double;               // Min. distance isolation to drill (STD2)
      & double;               // Tolerance heat-trap to drill (STD2)
      & double;               // Tolerance isolation to drill (STD2)
      & double;               // Power layer border width (STD2)
      & double;               // Power plane isolation width (STD2)
      );
Description
The cam_getpowpltparam function returns the CAM Processor power layer plot parameters.

cam_getwidedraw - CAM wide line display start width query (CAM)

Synopsis
double cam_getwidedraw(       // Returns width value (STD2)
      );
Description
The cam_getwidedraw function returns the CAM Processor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.

cam_plotgerber - CAM Gerber photo plot output (CAM)

Synopsis
int cam_plotgerber(           // Returns status
      int;                    // Gerber plot layer (LAY1)
      string;                 // Gerber plot file name
      double [0.00001,0.01];  // Gerber standard line width (STD2)
      double ]0.00000000053,[;// Gerber plotter unit length (CAM2)
      int [0,1];              // Optimized Gerber output mode:
                              //    0 = Optimization off
                              //    1 = Optimization on
      int [0,2];              // Gerber fill mode:
                              //    0 = line fill
                              //    1 = multi-aperture fill
                              //    2 = G36/G37 fill
      int [0,1];              // Gerber arc output mode:
                              //    0 = use arc interpolation
                              //    1 = use Gerber I/J arc commands
      int [0,2];              // Extended Gerber (RS-274-X) mode:
                              //    0 = no Extended Gerber
                              //    1 = Extended Gerber with
                              //         standard aperture table
                              //    2 = Extended Gerber with
                              //         dynamic aperture table
      int [0,1];              // Error highlight reset flag:
                              //    0 = keep error highlight
                              //    1 = de-highlight errors
      & int;                  // Returns flashed structure count
      & int;                  // Returns rect. filled structure count
      & int;                  // Returns circle filled structure count
      & int;                  // Returns multi filled structure count
      & int;                  // Returns line filled structure count
      & int;                  // Returns line drawn heat-traps count
      & int;                  // Returns overdraw error count
      );
Description
The cam_plotgerber function generates the Gerber photo plot data for the specified layer and writes it to a file. The function only sets the specified Gerber standard line width, fill mode, and arc output mode plot parameters and reset the error highlight, if no output file name is specified (empty string). The function returns zero for successfully generated plots, 1 for invalid plot parameter specifications (i.e., parameter out of range, no aperture for standard line width, etc.) or (-1) on plot errors. Plot overdraw errors are automatically highlighted.

cam_plothpgl - CAM HP-GL pen plot output (CAM)

Synopsis
int cam_plothpgl(             // Returns status
      int;                    // HP-GL plot layer (LAY1)
      int [1,99];             // HP-GL pen number
      string;                 // HP-GL plot file name
      double [0.1,100];       // HP-GL scaling factor
      double [-1.0,99];       // HP-GL speed ([centimetres/second]) or:
                              //    -1.0 = full speed
      double [0.00001,0.01];  // HP-GL pen width (STD2)
      int [0,1];              // HP-GL area fill mode:
                              //    0 = fill off
                              //    1 = fill on
      int [0,1];              // Error highlight reset flag:
                              //    0 = keep error highlight
                              //    1 = de-highlight errors
      & int;                  // Returns overdraw error count
      );
Description
The cam_plothpgl function generates the HP-GL pen plot data for the specified layer and writes it to a file. The function only sets the specified HP-GL plot parameters if no output file name is specified (empty string). The function returns zero for successfully generated plots or (-1) on plot errors or invalid plot parameter specifications. Plot overdraw errors are automatically highlighted.

cam_setdblpar - Set CAM double parameter (CAM)

Synopsis
int cam_setdblpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Add extra dynamic aperture width, 0.0 clear list (STD2)
                              //    1 = Pixel bitmap resolution (STD2)
                              //    2 = Last bitmap plot pixel ratio
      double;                 // Parameter value
      );
Description
The cam_setdblpar function is used to set CAM Processor double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The cam_getdblpar function can be used to query parameter values set with cam_setdblpar.
See also
Functions cam_getdblpar, cam_getintpar, cam_setintpar.

cam_setdrlaccuracy - Set CAM drill tool tolerance (CAM)

Synopsis
int cam_setdrlaccuracy(       // Returns status
      double [0.0,0.01];      // Drill tool tolerance (STD2)
      );
Description
The cam_getdrlaccuracy function sets the CAM Processor drill tool tolerance. The function returns nonzero if invalid parameters are specified.
See also
Function cam_getdrlaccuracy.

cam_setgenpltparam - Set CAM general plot parameters (CAM)

Synopsis
int cam_setgenpltparam(       // Returns status
      int [0,4];              // Plot all layers off/on:
                              //    0 = all layer plot mode off
                              //    1 = all layer plot mode on
                              //    2 = plot connected pins/vias only
                              //    3 = plot all pins and connected vias
                              //    4 = plot all vias and connected pins
      int [0,1];              // Plot border off/on flag:
                              //    0 = off
                              //    1 = on
      int [0,1];              // Plot rotate off/on flag:
                              //    0 = rotate 0 degree
                              //    1 = rotate 90 degree left
      int [0,5];              // Plot mirror mode (CAM1)
      int [0,1];              // Plot markers off/on flag:
                              //    0 = off
                              //    1 = on
      double [0.0,0.01];      // Plot accuracy (STD2)
      double;                 // Plot origin X coordinate (STD2)
      double;                 // Plot origin Y coordinate (STD2)
      );
Description
The cam_setgenpltparam function sets the CAM Processor general plot parameters. The function returns nonzero if invalid parameters are specified.

cam_setgerberapt - Set CAM Gerber aperture definition (CAM)

Synopsis
int cam_setgerberapt(         // Returns status
      int [1,900];            // Aperture table index
      int;                    // Aperture D-code:
                              //    10..999 = valid D-codes
                              //       (-1) = delete aperture
      int [0,4];              // Aperture type:
                              //    0 = special aperture
                              //    1 = round aperture
                              //    2 = square aperture
                              //    3 = thermal aperture (heat trap)
                              //    4 = rectangular aperture
      int [0,2];              // Aperture drawing mode:
                              //    0 = aperture for all drawing modes
                              //    1 = aperture for flash structures
                              //    2 = aperture for line structures
      double [0.0,[;          // Aperture dimension/X size (STD2)
      double [0.0,[;          // Aperture dimension/Y size (STD2)
      );
Description
The cam_setgerberapt function sets the definition of the Gerber aperture at the given table index in the aperture table currently loaded to the CAM Processor. A D-code value of (-1) resets the aperture definition at the specified table position. The aperture size is ignored for special aperture types. The function returns nonzero on missing or invalid parameters.

cam_setintpar - Set CAM integer parameter (CAM)

Synopsis
int cam_setintpar(            // Returns status
      int [0,[;               // Parameter type/number:
                              //  [ 0 = use bae_setcolor instead ]
                              //    1 = heat trap base angle
                              //    2 = Warning output mode:
                              //        Bit 0: Supress SCM changed warnings
                              //        Bit 1: not used in CAM Processor
                              //        Bit 2: Suppress variant mismatch warnings
                              //  [ 3 = System parameter - no write access ]
                              //  [ 4 = System parameter - no write access ]
                              //  [ 5 = System parameter - no write access ]
                              //  [ 6 = System parameter - no write access ]
                              //    7 = Generic printer scale mode:
                              //        0 = Fixed scale factor
                              //        1 = Scale to paper size
                              //    8 = Flag - Color table saved
                              //    9 = Airline color mode:
                              //        0 = Use unroutes color
                              //        1 = Use layer color
                              //    10 = Bitmap outline milling mode:
                              //        0 = No Milling
                              //        1 = Draw filled outline with millings
                              //    11 = Generic printer drawing mode:
                              //        0 = Set Color
                              //        1 = Merge Color
                              //    12 = Batch output flag
                              //    13 = Drill tool table optimization flag
                              //    14 = Plot preview mode:
                              //        0 = 0 = None
                              //        1 = 1 = Plotter pen width
      int;                    // Parameter value
      );
Description
The cam_setintpar function is used to set CAM Processor integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The cam_getintpar function can be used to query parameter values set with cam_setintpar.
See also
Functions cam_getdblpar, cam_getintpar, cam_setdblpar.

cam_setplotlaycode - Set CAM plot layer code (CAM)

Synopsis
void cam_setplotlaycode(
      int;                    // Layer number (LAY1)
      int;                    // HP-GL plot pen number (CAM4)
      );
Description
The cam_setplotlaycode function selects and/or sets the specified layer-specific HP-GL plot pen number for multilayer plots. The layer-specific HP-GL pen number is also used for non-HP-GL multilayer plots where positive pen numbers denote layers currently selected for output and negative pen numbers denote layers not selected for output.
See also
Function cam_getplotlaycode.

cam_setpowpltparam - Set CAM power layer plot parameters (CAM)

Synopsis
int cam_setpowpltparam(       // Returns status
      double [0.0,0.01];      // Min. distance heat-trap to drill (STD2)
      double [0.0,0.01];      // Min. distance isolation to drill (STD2)
      double [0.0,0.01];      // Tolerance heat-trap to drill (STD2)
      double [0.0,0.01];      // Tolerance isolation to drill (STD2)
      double [0.0,0.02];      // Power layer border width (STD2)
      double [0.0,0.02];      // Power plane isolation width (STD2)
      );
Description
The cam_setpowpltparam function sets the CAM Processor power plot parameters. The function returns nonzero if invalid plot parameters are specified.

cam_setwidedraw - Set CAM wide line display start width (CAM)

Synopsis
int cam_setwidedraw(          // Returns status
      double ]0.0,[;          // Input width value (STD2)
      );
Description
The cam_setwidedraw function sets the current CAM Processor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value is specified.
 

C.4.5 CAM View Functions

The following User Language system functions are assigned to caller type CV; i.e., they can be called from the CAM View interpreter environment of the Bartels AutoEngineer:


cv_aptgetcolor - Get CAM View aperture color (CV)

Synopsis
int cv_aptgetcolor(           // Color value (STD18)
      int;                    // Aperture index
      int;                    // Aperture mode
      );
Description
The cv_aptgetcolor function returns the color value which is currently assigned in CAM View for displaying the specified Gerber aperture type.
See also
Function cv_aptsetcolor.

cv_aptsetcolor - Set CAM View aperture color (CV)

Synopsis
int cv_aptsetcolor(           // Returns status
      int;                    // Aperture index
      int;                    // Aperture mode
      int [-33554432,33554431];
                              // Color value (STD18) 
      );
Description
The cv_aptsetcolor function sets the color value to be used in CAM View for displaying the specified Gerber aperture type. The function returns zero if the assignment was successful or nonzero otherwise.
See also
Function cv_aptgetcolor.

cv_deldataset - Delete CAM View data set (CV)

Synopsis
int cv_deldataset(            // Returns status
      int [0,[;               // Data set index
      );
Description
The cv_deldataset function removes the specified CAM View data set from the workspace. The function returns zero if the operation was successfully completed or nonzero otherwise.
See also
Function cv_movedataset.

cv_getdblpar - Get CAM View double parameter (CV)

Synopsis
int cv_getdblpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Input X offset (STD2)
                              //    1 = Input Y offset (STD2)
                              //    2 = Heat trap isolation width (STD2)
                              //    3 = Wide line display start width (STD2)
                              //    4 = Length of one Gerber plotter unit (STD2)
      & double;               // Returns parameter value
      );
Description
The cv_getdblpar function is used to query CAM View double parameters previously set with cv_setdblpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions cv_getintpar, cv_setdblpar, cv_setintpar.

cv_getintpar - Get CAM View integer parameter (CV)

Synopsis
int cv_getintpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Gerber import layer selection mode:
                              //        0 = Assume single flash and line input layer
                              //        1 = Select both flash and line input layer
                              //    1 = Gerber layer query:
                              //        0 = Layer not used
                              //        1 = Layer used
                              //    2 = Display color table/assignment:
                              //        0 = Aperture color table/assignment
                              //        1 = Layer color table/assignment
                              //    3 = Area display mode:
                              //        0 = Filled display
                              //        1 = Outline display
                              //    4 = Via D-Code
                              //    5 = Heat trap base angle
                              //    6 = Gerber Optimization:
                              //        0 = Coordinate optimization off
                              //        1 = Coordinate optimization on
                              //    7 = Gerber Circle/Arc Mode:
                              //        0 = Arbitrary Gerber arc angles
                              //        1 = Max. 90 Gerber arc angles
                              //    8 = Input Mirror Mode:
                              //        0 = Mirroring Off
                              //        1 = Mirroring at X-Axis
                              //        2 = Mirroring at Y-Axis
                              //        3 = Mirroring at Origin
                              //    9 = Zero Supression Mode:
                              //        0 = Suppress leading zeros
                              //        1 = Suppress trailing zeros
                              //    10 = Extended Gerber:
                              //        0 = Extended Gerber (Header) off
                              //        1 = Extended Gerber (Header) on
                              //    11 = Gerber Coordinate Specification:
                              //        0 = Absolute Coordinates
                              //        1 = Incremental Coordinates with Reset
                              //        2 = Incremental Coordinates without Reset
                              //    12 = Gerber Documentary Layer Mode
                              //        0 = Flashes as Documentary Line
                              //        1 = Flashes as Documentary Area
      & int;                  // Returns parameter value
      );
Description
The cv_getintpar function is used to query CAM View int parameters previously set with cv_setintpar. The functions returns zero if the query was successful or (-1) otherwise.
See also
Functions cv_getdblpar, cv_setdblpar, cv_setintpar.

cv_movedataset - Move CAM View data set (CV)

Synopsis
int cv_movedataset(           // Returns status
      int [0,[;               // Data set index
      int;                    // Data set movement mirror flag
      double;                 // Data set movement X offset (STD2)
      double;                 // Data set movement Y offset (STD2)
      );
Description
The cv_movedataset function moves (and mirrors) the specified CAM View data set using the specified offset parameters. The function returns zero if the operation was successfully completed or nonzero otherwise.
See also
Function cv_deldataset.

cv_setdblpar - Set CAM View double parameter (CV)

Synopsis
int cv_setdblpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Input X offset (STD2)
                              //    1 = Input Y offset (STD2)
                              //    2 = Heat trap isolation width (STD2)
                              //    3 = Wide line display start width (STD2)
                              //    4 = Length of one Gerber plotter unit (STD2)
      double;                 // Parameter value
      );
Description
The cv_setdblpar function is used to set CAM View double system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The cv_getdblpar function can be used to query parameter values set with cv_setdblpar.
See also
Functions cv_getdblpar, cv_getintpar, cv_setintpar.

cv_setintpar - Set CAM View integer parameter (CV)

Synopsis
int cv_setintpar(             // Returns status
      int [0,[;               // Parameter type/number:
                              //    0 = Gerber import layer selection mode:
                              //        0 = Assume single flash and line input layer
                              //        1 = Select both flash and line input layer
                              //    1 = Gerber layer usage:
                              //        Read-only parameter!
                              //    2 = Display color table/assignment:
                              //        0 = Aperture color table/assignment
                              //        1 = Layer color table/assignment
                              //    3 = Area display mode:
                              //        0 = Filled display
                              //        1 = Outline display
                              //    4 = Via D-Code
                              //    6 = Gerber Optimization:
                              //        0 = Coordinate optimization off
                              //        1 = Coordinate optimization on
                              //    7 = Gerber Circle/Arc Mode:
                              //        0 = Arbitrary Gerber arc angles
                              //        1 = Max. 90 Gerber arc angles
                              //    8 = Input Mirror Mode:
                              //        0 = Mirroring Off
                              //        1 = Mirroring at X-Axis
                              //        2 = Mirroring at Y-Axis
                              //        3 = Mirroring at Origin
                              //    9 = Zero Supression Mode:
                              //        0 = Suppress leading zeros
                              //        1 = Suppress trailing zeros
                              //    10 = Extended Gerber:
                              //        0 = Extended Gerber (Header) off
                              //        1 = Extended Gerber (Header) on
                              //    11 = Gerber Coordinate Specification:
                              //        0 = Absolute Coordinates
                              //        1 = Incremental Coordinates with Reset
                              //        2 = Incremental Coordinates without Reset
                              //    12 = Gerber Documentary Layer Mode
                              //        0 = Flashes as Documentary Line
                              //        1 = Flashes as Documentary Area
      int;                    // Parameter value
      );
Description
The cv_setintpar function is used to set CAM View integer system parameters. The function returns zero if the parameter assignment was successful, or (-1) otherwise. The cv_getintpar function can be used to query parameter values set with cv_setintpar.
See also
Functions cv_getdblpar, cv_getintpar, cv_setdblpar.
 

C.5 IC Design System Functions

This section describes (in alphabetical order) the IC design system functions of the Bartels User Language. See Appendix C.1 for function description notations.

 

C.5.1 IC Design Data Access Functions

The following User Language system functions are assigned to caller type ICD; i.e., they can be called from the Chip Editor interpreter environment of the Bartels AutoEngineer:


icd_altpinlay - IC Design setup alternate pin layer (ICD)

Synopsis
int icd_altpinlay(            // Returns layer number (ICD1)
      );
Description
The icd_altpinlay function returns the alternate pin layer number defined in the BAE IC setup file for GDS input.

icd_cellconlay - IC Design setup internal cell connection layer (ICD)

Synopsis
int icd_cellconlay(           // Returns layer number (ICD1)
      );
Description
The icd_cellconlay function returns the layer number defined in the BAE IC setup for internal cell connections.

icd_cellscan - IC Design setup DRC on cell level mode (ICD)

Synopsis
int icd_cellscan(             // Returns cell DRC mode
      );
Description
The icd_cellscan function returns the cell DRC mode defined in the BAE IC setup (0 = no DRC for cell structures, 1 = DRC for cell structures).

icd_cellshr - IC Design setup cell keepout area shrink (ICD)

Synopsis
double icd_cellshr(           // Cell keepout area shrink value (STD2)
      );
Description
The icd_cellshr function returns the shrink value defined in the BAE IC setup for the automatic autorouter keepout area generation.

icd_ciflayname - IC Design setup CIF output layer name (ICD)

Synopsis
string icd_ciflayname(        // Returns layer name
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_ciflayname function returns the CIF output layer name defined for the given layer number (ICD1) in the BAE IC setup file.

icd_cstdsiz - IC Design setup standard cell height (ICD)

Synopsis
double icd_cstdsiz(           // Returns standard cell height (STD2)
      );
Description
The icd_cellshr function returns the standard cell height value defined in the BAE IC setup for the automatic cell placer.

icd_defelemname - IC Design setup default element name (ICD)

Synopsis
string icd_defelemname(       // Returns default element name
      );
Description
The icd_defelemname function returns the default IC Design element name defined in the BAE IC setup file.

icd_deflibname - IC Design setup default library name (ICD)

Synopsis
string icd_deflibname(        // Returns default library name
      );
Description
The icd_deflibname function returns the default IC Design library name defined in the BAE IC setup file.

icd_drcarc - IC Design setup DRC arc mode (ICD)

Synopsis
int icd_drcarc(               // Returns DRC arc mode
      );
Description
The icd_drcarc function returns the DRC arc mode defined in the BAE IC setup (0 = arcs allowed, 1 = no arcs allowed).

icd_drcgrid - IC Design setup DRC grid (ICD)

Synopsis
double icd_drcgrid(           // Returns DRC grid value (STD2)
      );
Description
The icd_drcgrid function returns the DRC grid value defined in the BAE IC setup.

icd_drclaymode - IC Design setup layer DRC mode (ICD)

Synopsis
int icd_drclaymode(           // Returns layer DRC mode
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_drclaymode function returns the DRC mode for the given layer defined in the BAE IC setup (0 = no DRC on the given layer, 1 = DRC on the given layer).

icd_drcmaxpar - IC Design setup DRC parallel check length (ICD)

Synopsis
double icd_drcmaxpar(         // Returns parallel check length (STD2)
      );
Description
The icd_drcmaxpar function returns the DRC maximal parallel structures length value value defined in the BAE IC setup.

icd_drcminwidth - IC Design setup DRC layer minimal dimensions (ICD)

Synopsis
double icd_drcminwidth(       // Returns DRC minimal value (STD2)
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_drcminwidth function returns the DRC minimal structure size value for the given layer defined in the BAE IC setup.

icd_drcrect - IC Design setup DRC orthogonal mode (ICD)

Synopsis
int icd_drcrect(              // Returns DRC orthogonal mode
      );
Description
The icd_drcarc function returns the DRC arc mode defined in the BAE IC setup (0 = arbitrary angles allowed, 1 = only right angles allowed).

icd_ecnlaymode - IC Design setup layer connectivity check (ICD)

Synopsis
int icd_ecnlaymode(           // Returns layer connectivity mode
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_ecnlaymode function returns the connectivity mode for the given layer defined in the BAE IC setup (0 = no connectivity on the given layer, 1 = connectivity on the given layer).

icd_findconpart - Find IC Design part index of a named part (ICD)

Synopsis
int icd_findconpart(          // Returns status
      string;                 // Part name
      & index I_CPART;        // Returns part index
      );
Description
The icd_findconpart function searches the IC Design connection list part index with the specified part name. The function returns zero if the part has been found or nonzero otherwise.
See also
Functions icd_findconpartpin, icd_findcontree.

icd_findconpartpin - Find IC Design part pin index of a named part pin (ICD)

Synopsis
int icd_findconpartpin(       // Returns status
      string;                 // Pin name
      index I_CPART;          // Net list part index
      & index I_CPIN;         // Returns net list part pin index
      );
Description
The icd_findconpartpin function searches an IC Design connection list part for the part pin index with the specified pin name. The function returns zero if the part pin has been found or nonzero otherwise.
See also
Functions icd_findconpart, icd_findcontree.

icd_findcontree - Find IC Design net index of a named net (ICD)

Synopsis
int icd_findcontree(          // Returns status
      string;                 // Net name
      & index I_CNET;         // Returns net index
      );
Description
The icd_findcontree function searches the IC Design connection list net index with the specified net name. The function returns zero if the net has been found or nonzero otherwise.
See also
Functions icd_findconpart, icd_findconpartpin.

icd_getrulecnt - Get rule count for specific object (ICD)

Synopsis
int icd_getrulecnt(           // Returns rule count or (-1) on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      );
Description
The icd_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 I_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid I_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 icd_getrulename function for getting object-specific rule names. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_getrulecnt function.
See also
Functions icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_getrulename - Get rule name from specific object (ICD)

Synopsis
int icd_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 icd_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 I_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid I_POOL index type value passed for the object ident code). The rule name list index to be specified can be determined using the icd_getrulecnt function. The rule name is returned with the last function parameter. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_getrulename function.
See also
Functions icd_getrulecnt, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_gettreeidx - Find IC Design net index of a tree (ICD)

Synopsis
int icd_gettreeidx(           // Returns status
      int;                    // Net tree number
      & index I_CNET;         // Returns net index
      );
Description
The icd_gettreeidx function searches the IC Design connection list net index with the specified net tree number. The function returns zero if the net has been found or nonzero otherwise.

icd_grpdisplay - IC Design setup group display layer (ICD)

Synopsis
int icd_grpdisplay(           // Returns layer number (ICD1)
      );
Description
The icd_grpdisplay function returns the group display layer number defined in the BAE IC setup file.

icd_lastfigelem - Get last modified IC Design figure list element (ICD)

Synopsis
int icd_lastfigelem(          // Returns status
      & index I_FIGURE;       // Returns figure list index
      );
Description
The icd_lastfigelem function gets the last created and/or modified IC Design 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.

icd_maccoords - Get IC Design (scanned) macro coordinates (ICD)

Synopsis
void icd_maccoords(
      & double;               // Macro X coordinate (STD2)
      & double;               // Macro Y coordinate (STD2)
      & double;               // Macro rotation angle (STD3)
      & double;               // Macro scaling factor
      & int;                  // Macro mirror mode (STD14)
      );
Description
The icd_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 icd_scanall, icd_scanfelem or icd_scanpool only (otherwise zero/default values are returned).
See also
Functions icd_scanall, icd_scanfelem, icd_scanpool.

icd_nrefsearch - Search named IC Design reference (ICD)

Synopsis
int icd_nrefsearch(           // Returns status
      string;                 // Reference name
      & index I_FIGURE;       // Returns figure list index
      );
Description
The icd_nrefsearch function searches for the specified named reference on the currently loaded IC Design 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.

icd_outlinelay - IC Design setup cell outline layer (ICD)

Synopsis
int icd_outlinelay(           // Returns layer number (ICD1)
      );
Description
The icd_outlinelay function returns the cell outline layer number defined in the BAE IC setup.

icd_pindist - IC Design setup pin keepout distance (ICD)

Synopsis
double icd_pindist(           // Returns pin keepout distance (STD2)
      );
Description
The icd_pindist function returns the pin keepout distance value defined in the BAE IC setup for the automatic keepout area generation.

icd_plcxgrid - IC Design setup placement grid (ICD)

Synopsis
double icd_plcxgrid(          // Returns placement grid value (STD2)
      );
Description
The icd_plcxgrid function returns the horizontal cell placement grid value defined in the BAE IC setup for the automatic cell placement.

icd_plcxoffset - IC Design setup placement offset (ICD)

Synopsis
double icd_plcxoffset(        // Returns placement offset value (STD2)
      );
Description
The icd_plcxoffset function returns the horizontal cell placement offset value defined in the BAE IC setup for the automatic cell placement.

icd_routcellcnt - IC Design setup number of power supply cells (ICD)

Synopsis
int icd_routcellcnt(          // Returns cell count
      );
Description
The icd_routcellcnt function returns the number of power supply cells defined in the BAE IC setup.

icd_routcellname - IC Design setup name of power supply cell (ICD)

Synopsis
string icd_routcellname(
                              // Returns cell name
      int [0,[;               // Cell index
      );
Description
The icd_routcellname function returns the name of a power supply cell defined in the BAE IC setup file. The index can be in the range of 0 to icd_routcellcnt()-1.

icd_ruleerr - Rule System error status query (ICD)

Synopsis
void icd_ruleerr(
      & int;              // Error item code
      & string;           // Error item string
      );
Description
The icd_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 icd_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 CodeMeaning
0Rule System operation completed without errors
1Rule System out of memory
2Rule System internal error <e>
3Rule System function parameter invalid
128Rule System DB file create error
129Rule System DB file read/write error
130Rule System DB file wrong type
131Rule System DB file structure bad
132Rule System DB file not found
133Rule System DB file other error (internal error)
134Rule System rule <r> not found in rule database
135Rule System rule bad DB format (internal error <e>)
136Rule System object not found
137Rule System object double defined (internal error)
138Rule System incompatible variable <v> definition
139Rule 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 icd_getrulecnt, icd_getrulename, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_rulefigatt - Attach rule(s) to figure list element (ICD)

Synopsis
int icd_rulefigatt(           // Returns nonzero on error
      index I_FIGURE;         // Figure list element index
      void;                   // Rule name string or rule name list array
      );
Description
The icd_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 are detached before attaching the new rule set. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_rulefigatt function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_rulefigdet - Detach rules from figure list element (ICD)

Synopsis
int icd_rulefigdet(           // Returns nonzero on error
      index I_FIGURE;         // Figure list element index
      );
Description
The icd_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 icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_rulefigdet function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_ruleplanatt. icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_ruleplanatt - Attach rule(s) to currently loaded element (ICD)

Synopsis
int icd_ruleplanatt(          // Returns nonzero on error
      void;                   // Rule name string or rule name list array
      );
Description
The icd_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 are detached before the new rule set is attached. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_ruleplanatt function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_ruleplandet - Detach rules from currently loaded element (ICD)

Synopsis
int icd_ruleplandet(          // Returns nonzero on error
      );
Description
The icd_ruleplandet function to detach all currently attached rules from the currently loaded element. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_ruleplandet function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_rulequery - Perform rule query on specific object (ICD)

Synopsis
int icd_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 icd_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 I_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid I_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:

?dfor querying int values
?ffor querying double values
?sfor 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:

%dfor specifying int values
%ffor specifying double values
%sfor 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 icd_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 icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_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 icd_rulequery call

    hitcount = icd_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 = icd_rulequery(0,0,"subj","pred","-?s %d",strresult,6) ;

sets hitcount to 2 and string variable strresult to B.

See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet; Neural Rule System and Rule System Compiler..

icd_scanall - Scan all IC Design figure list elements (ICD)

Synopsis
int icd_scanall(              // Returns scan status
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The icd_scanall function scans all figure list elements placed on the currently loaded IC Design element with all hierarchy levels. User-defined callback functions are activated automatically 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 return value of icd_scanall is 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 I_MACRO macro,    // Macro index
      index I_POOL pool,      // Pool element index
      int macinws,            // Macro in workspace flag (STD10)
      string refname,         // Macro Reference name
      index I_LEVEL level,    // Macro signal level
      int stkcnt              // Macro stack depth
      )
{
      // Macro callback function statements
      :
      return(contscan);
}

The icd_maccoords function can be used for determining the macro placement coordinates. The return value of the macro callback function must be 1 for continue scan, 0 for stop scan or (-1) on error.

Polygon callback function
int polyfuncname(
      index I_POLY poly,      // Polygon index
      int layer,              // Polygon layer (ICD1)
      int polyinws,           // Polygon in workspace flag (STD10)
      int tree,               // Polygon tree number or (-1)
      index I_LEVEL level     // Polygon signal level
      )
{
      // Polygon callback function statements
      :
      return(errstat);
}

The return value of the polygon callback function must be zero if scan ok or nonzero on error.

Path callback function
int pathfuncname(
      index I_LINE path,      // Path index
      int layer,              // Path layer (ICD1)
      int pathinws,           // Path in workspace flag (STD10)
      index I_LEVEL level     // Path signal level
      )
{
      // Path callback function statements
      :
      return(errstat);
}

The return value of the path callback function must be zero if scan ok or nonzero on error.

Text callback function
int textfuncname(
      index I_TEXT text,      // Text index
      double x,               // Text X coordinate (STD2)
      double y,               // Text Y coordinate (STD2)
      double angle,           // Text rotation angle (STD3)
      int mirr,               // Text mirror mode (STD14)
      int layer,              // Text layer (ICD1)
      double size,            // Text size (STD2)
      string textstr,         // Text string
      int textinws            // Text in workspace flag (STD10)
      )
{
      // Text callback function statements
      :
      return(errstat);
}

The return value of the text callback function must be zero if scan ok or nonzero on error.

Layer check function
int laycheckfuncname(
      int layer,              // Scanned layer (ICD1)
      int class               // Element class (STD1)
      )
{
      // Layer check function statements
      :
      return(contscan);
}

The return value of the layer check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to the interesting layers with this function.

Level check function
int levcheckfuncname(
      index I_LEVEL level     // Scanned signal level
      )
{
      // Level check function statements
      :
      return(contscan);
}

The return value of the level check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to interesting signal levels with this function.

See also
Functions icd_maccoords, icd_scanfelem, icd_scanpool.

icd_scanfelem - Scan IC Design figure list element (ICD)

Synopsis
int icd_scanfelem(            // Returns scan status
      index I_FIGURE;         // Figure list element index
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The icd_scanfelem function scans the specified IC Design 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 icd_scanfelem is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See icd_scanall for the scan function definitions.
See also
Functions icd_maccoords, icd_scanall, icd_scanpool.

icd_scanpool - Scan IC Design pool element (ICD)

Synopsis
int icd_scanpool(             // Returns scan status
      void;                   // Pool element index
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Drill callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The icd_scanpool function scans the specified IC Design 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 icd_scanpool is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See icd_scanall for the callback function definitions.
See also
Functions icd_maccoords, icd_scanall, icd_scanfelem.

icd_stdlayname - IC Design setup standard layer name (ICD)

Synopsis
string icd_stdlayname(        // Returns layer name
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_stdlayname function returns the layer name defined for the given layer number (ICD1) in the BAE IC setup file.

icd_stdpinlay - IC Design setup standard pin layer (ICD)

Synopsis
int icd_stdpinlay(            // Returns layer number (ICD1)
      );
Description
The icd_stdpinlay function returns the standard pin layer number defined in the BAE IC setup file for GDS input.

icd_vecttext - Vectorize IC Design text (ICD)

Synopsis
int icd_vecttext(             // Returns status
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      int [0,1];              // Text mirror mode (STD14)
      double ]0.0,[;          // Text size (STD2)
      int [0,1];              // Text physical flag:
                              //    0 = logical
                              //    1 = physical
      int [0,2];              // Layer mirror mode:
                              //    0 = mirror off
                              //    1 = mirror X
                              //    2 = mirror Y
      int [0,[;               // Text style
      string;                 // Text string
      * int;                  // Text vectorize function
      );
Description
The icd_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.5.2 Chip Editor Functions

The following User Language system functions are assigned to caller type CED; i.e., they can be called from the Chip Editor interpreter environment of the Bartels AutoEngineer:


ced_asklayer - CED layer selection (CED)

Synopsis
int ced_asklayer(             // Returns status
      & int;                  // Returns selected layer (ICD1)
      );
Description
The ced_asklayer function activates a Chip Editor layer selection menu. The function returns zero if a valid layer has been selected or (-1) if the layer selection has been aborted.

ced_delelem - Delete CED figure list element (CED)

Synopsis
int ced_delelem(              // Returns status
      & index I_FIGURE;       // Element
      );
Description
The ced_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 I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Function ced_drawelem.

ced_drawelem - Redraw CED figure list element (CED)

Synopsis
void ced_drawelem(
      index I_FIGURE;         // Element
      int [0, 4];             // Drawing mode (STD19)
      );
Description
The ced_drawelem function updates the display of the given figure list element using the specified drawing mode.
See also
Function ced_delelem.

ced_elemangchg - Change CED figure list element rotation angle (CED)

Synopsis
int ced_elemangchg(           // Returns status
      & index I_FIGURE;       // Element
      double;                 // New rotation angle (STD3)
      );
Description
The ced_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 I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemfixchg - Change CED figure list element fixed flag (CED)

Synopsis
int ced_elemfixchg(           // Returns status
      & index I_FIGURE;       // Element
      int [0,1];              // New fixed flag (STD11)
      );
Description
The ced_elemfixchg function changes the fixed flag of the given figure list element. A fixed flag value of 0 resets the element fixed flag, a fixed flag value of 1 sets the element fixed flag. The function returns zero if the element fixed flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be fixed.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemgrpchg - Change CED figure list element group flag (CED)

Synopsis
int ced_elemgrpchg(           // Returns status
      index I_FIGURE;         // Element
      int [0,2];              // New group flag (STD13)
      );
Description
The ced_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.

ced_elemlaychg - Change CED figure list element layer (CED)

Synopsis
int ced_elemlaychg(           // Returns status
      & index I_FIGURE;       // Element
      int;                    // New layer (ICD1)
      );
Description
The ced_elemlaychg function changes the layer of the given figure list element. The layer can be set for polygons, traces and texts. The function returns zero if the element layer has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element layer cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemmirrchg - Change CED figure list element mirror mode (CED)

Synopsis
int ced_elemmirrchg(          // Returns status
      & index I_FIGURE;       // Element
      int [0,2];              // New mirror mode (STD14|ICD3)
      );
Description
The ced_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for polygons, texts, named and unnamed references. The function returns zero if the element mirror mode has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element mirror mode cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemposchg - Change CED figure list element position (CED)

Synopsis
int ced_elemposchg(           // Returns status
      & index I_FIGURE;       // Element
      double;                 // New X coordinate (STD2)
      double;                 // New Y coordinate (STD2)
      );
Description
The ced_elemposchg function changes the position of the given figure list element. Polygons and/or traces are replaced to set the first point of the polygon/trace to the specified position. The function returns zero if the element has been successfully repositioned, (-1) if the figure list element is invalid or (-2) if the figure list element position cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemsizechg - Change CED figure list element size (CED)

Synopsis
int ced_elemsizechg(          // Returns status
      & index I_FIGURE;       // Element
      double;                 // New size (STD2)
      );
Description
The ced_elemsizechg function changes the size of the given figure list element. The size can be changed for texts, traces, named and unnamed references. For traces, a trace width change is performed. For named and unnamed references, the size specifies the scaling factor. 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 I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_getlaydispmode - Get CED layer display mode (CED)

Synopsis
int ced_getlaydispmode(       // Returns display mode (ICD9)
      int [0,99];             // Layer (ICD1)
      );
Description
The ced_getlaydispmode function returns the layer display mode for the given layer in the Chip Editor or (-1) on error.

ced_getmincon - Get CED Mincon function type (CED)

Synopsis
int ced_getmincon(            // Returns Mincon function type (ICD10)
      );
Description
The ced_getmincon function returns the currently active Chip Editor Mincon function type, i.e., the airline display mode (ICD10).

ced_getpathwidth - Get CED path standard widths (CED)

Synopsis
void ced_getpathwidth(
      & double;               // Returns small standard width (STD2)
      & double;               // Returns wide standard width (STD2)
      );
Description
The ced_getpathwidth function returns with its parameters the currently active Chip Editor standard widths for small and wide traces.

ced_getpickpreflay - Get CED pick preference layer (CED)

Synopsis
int ced_getpickpreflay(       // Returns pick preference layer (ICD1)
      );
Description
The ced_getpickpreflay function returns the currently active Chip Editor pick preference layer for element selection (ICD1).

ced_getwidedraw - Get CED wide line display start width (CED)

Synopsis
double ced_getwidedraw(       // Returns width value (STD2)
      );
Description
The ced_getwidedraw function returns the current Chip Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.

ced_groupselect - CED group selection (CED)

Synopsis
int ced_groupselect(          // Number of changes or (-1) on error
      int [0,3];              // Element selection type:
                              //    0 = select by element type
                              //    1 = select by element layer
                              //    2 = select by element fixed flag
                              //    3 = select by element visibility
      int;                    // Element selection value according to type:
                              //    element type (0|ICD5) for selection type 0
                              //    element layer (ICD1) for select. type 1
                              //    element fixed flag (STD11) for select. type 2
                              //    element visible flag (0|1) for selection type 3
      int [0,2];              // New group flag (STD13)
      );
Description
The ced_groupselect function changes the group flag of all elements of the specified type and/or value. The function returns the number of elements (de)selected or (-1) on error (i.e., on invalid and/or incompatible parameter specifications). Element selection value zero for element type selection is used for selecting elements of any type.
Warning
Internal IC Design element types such as the standard via definition(s) are excluded from group (de)selections with ced_groupselect to prevent from unintentionally modifying and/or deleting such elements and/or definitions when subsequently using other group functions.

ced_highlnet - Set CED net highlight mode (CED)

Synopsis
int ced_highlnet(             // Returns status
      int [0,[;               // Net tree number
      int [0,1];              // Highlight mode (0 = off, 1 = on)
      );
Description
The ced_highlnet function sets the highlight mode of the net specified by the given net tree number. A highlight mode value of 1 highlight the net, a highlight mode value of 0 de-highlights the net. The function returns nonzero if an invalid net tree number and/or highlight mode value has been specified.

ced_layergrpchg - Select CED group by layer (CED)

Synopsis
int ced_layergrpchg(          // Number of elements
      int [0,[;               // Layer number (ICD1)
      int [0,2];              // New group flag (STD13)
      );
Description
The ced_layergrpchg function changes the group flag of all elements placed on the specified layer. The function returns the number of elements (de)selected or (-1) on error.

ced_partaltmacro - Change CED net list part cell type (CED)

Synopsis
int ced_partaltmacro(         // Returns status
      string;                 // Part name
      string;                 // New part cell type name
      );
Description
The ced_partaltmacro function changes the cell type of the given net list part. The function returns nonzero if the part cell type has been successfully changed, (-1) for invalid input parameters, (-2) if the specified package does not contain all pins referenced by the part in the net list (cell is changed anyway), (-3) if the specified part does not exist in the net list, (-4) if the new cell type isn't allowed for this part, (-5) if the new cell macro couldn't be loaded, (-6) if the new cell couldn't be copied to the job file or (-7) on multiple cell change requests (e.g., a to b and then b to c) in one program run.
Warning
It is strongly recommended not to use this function in I_CPART index loops since the current I_CPART index variables are invalid after calling ced_partaltmacro.

ced_partnamechg - Change CED net list part name (CED)

Synopsis
int ced_partnamechg(          // Returns status
      string;                 // Old part name
      string;                 // New part name
      );
Description
The ced_partnamechg function changes the name of a net list part. The function returns nonzero if the part name has been successfully changed, (-1) for invalid input parameters, (-2) if the specified part is not yet placed, (-3) if the specified part does not exist in the net list, (-4) if the new name exists already or (-5) on multiple name change requests (e.g., a to b and then b to c) in one program run.
Warning
This function changes the net list and therefore requires a Backannotation It is strongly recommended not to use this function in I_CPART index loops since the current I_CPART index variables are invalid after calling ced_partnamechg.

ced_pickelem - Pick CED figure list element (CED)

Synopsis
int ced_pickelem(             // Returns status
      & index I_FIGURE;       // Returns picked element
      int [1,8];              // Pick element type (ICD5 except 6)
      );
Description
The ced_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.

ced_setlaydispmode - Set CED layer display mode (CED)

Synopsis
int ced_setlaydispmode(       // Returns status
      int [0,99];             // Layer (ICD1)
      int [0,127];            // Display mode (ICD9)
      );
Description
The ced_setlaydispmode function sets the layer display mode for the given layer in the Chip Editor. The function returns nonzero if the display mode couldn't be set.

ced_setmincon - Set CED Mincon function type (CED)

Synopsis
int ced_setmincon(            // Returns status
      int [0,8];              // Required Mincon function type (ICD10)
      );
Description
The ced_setmincon function sets the currently active Chip Editor Mincon function type, i.e., the airline display mode (ICD10). The function returns nonzero if an invalid Mincon function type value has been specified.

ced_setpathwidth - Set CED path standard width (CED)

Synopsis
int ced_setpathwidth(         // Returns status
      double ]0.0,[;          // Required small path width (STD2)
      double ]0.0,[;          // Required wide path width (STD2)
      );
Description
The ced_setpathwidth function sets the currently active Chip Editor standard widths for small and wide traces. The function returns nonzero if invalid an invalid width value has been specified.

ced_setpickpreflay - Set CED pick preference layer (CED)

Synopsis
int ced_setpickpreflay(       // Returns status
      int;                    // Required pick preference layer (ICD1)
      );
Description
The ced_setpickpreflay function sets the currently active Layout Editor pick preference layer for element selection (ICD1). The function returns nonzero if an invalid pick preference layer has been specified.

ced_setwidedraw - Set CED wide line display start width (CED)

Synopsis
int ced_setwidedraw(          // Returns status
      double ]0.0,[;          // Required width value (STD2)
      );
Description
The ced_setwidedraw function sets the current Chip Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value is specified.

ced_storepart - Place CED part or pin (CED)

Synopsis
int ced_storepart(            // Returns status
      string;                 // Reference name
      string;                 // Library symbol name
      double;                 // X coordinate (STD2)
      double;                 // Y coordinate (STD2)
      double;                 // Rotation angle (STD3)
      double;                 // Scaling factor
      int [0,1];              // Mirror mode (STD14)
      );
Description
The ced_storepart function stores a cell (or pin) with the given placement parameters to the currently loaded IC design (or cell) element. The next unplaced net list part is used if an empty string is passed for the reference name. The function returns zero if the part has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if all parts are placed already, (-3) if the specified part is placed already, (-4) if the part cannot be loaded, (-5) if the part pins do not match the net list specifications or (-6) if the part data could not be copied to the current job file.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_storepath - Place CED internal polygon as path (CED)

Synopsis
int ced_storepath(            // Returns status
      int [0,99];             // Path layer (ICD1)
      double ]0.0,[;          // Path width (STD2)
      );
Description
The ced_storepath function generates a trace on the currently loaded IC Design using the specified placement parameters. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is invalid.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_storepoly - Place CED internal polygon (CED)

Synopsis
int ced_storepoly(            // Returns status
      int;                    // Polygon layer (ICD1)
      int [1,4];              // Polygon type (ICD4)
      int [0,2];              // Mirror mode (ICD3)
      );
Description
The ced_storepoly function generates a polygon on the currently loaded IC Design 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 I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_storetext - Place CED text (CED)

Synopsis
int ced_storetext(            // Returns status
      string;                 // Text string
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      double ]0.0,[;          // Text size (STD2)
      int;                    // Text layer (ICD1)
      int [0,1];              // Text mirror mode (STD14)
      );
Description
The ced_storetext function generates a text on the currently loaded IC Design 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 I_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.

ced_storeuref - Place CED unnamed reference (via or subpart) (CED)

Synopsis
int ced_storeuref(            // Returns status
      string;                 // Library symbol name
      double;                 // Reference X coordinate (STD2)
      double;                 // Reference Y coordinate (STD2)
      double;                 // Reference rotation angle (STD3)
      double;                 // Reference scaling factor
      int [0,1];              // Reference mirror (STD14)
      );
Description
The ced_storeuref function stores an unnamed reference (via or subpart) with the given placement parameters to the currently loaded layout element (layout or part). For vias, the reference mirror mode, the reference scaling factor, and the rotation angle are ignored. The function returns zero if the reference has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if the reference cannot be loaded or (-3) if the reference data could not be copied to the current job file.
Warning
This function changes the current figure list and thus should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions

System Functions
© 1985-2025 Oliver Bartels F+E • Updated: 02 December 2006, 15:41 [UTC]

© 1985-2025 Oliver Bartels F+E Bartels Homepage Contact and Corporate Info

Web Development by Baumeister Mediasoft Engineering

Systemfunktionen - Deutsche Version System Functions - English Version