Home

Script Reference Manual

image

Contents

1. AppendTextWindow Arguments td Ye BuildDefaultOptions Cancel e usa sa eee Gel ChangeArcAttributes ChangeSelectedStyleNames ChangeStyle ChangeSymbolProperty ClearMessage Window AAA CloseGraphSheet Contents SIMetrix SIMPLIS Script Reference Manual Contents G los Print rs s 4 0 4 4 4 excep a See ete ea ake a ot le ke a 447 EloseSchemiza a 4 26 a o oh Sh de ee ee RR ee ee a ae A a la a Ga 448 GloseShieet use lr hb bb elo El oe aa dodo ho a eo at BS La aa 448 CloseSimplisStatusBox ee 448 Close TextEditor vY ai e anal ere ele be ee eta it Se aed Mo oe ee Mite de id a 448 CollectGarbage it ra e a Bay ee OE a le a Re 449 Combine Mehu am a a eee ee oe Be ate OD SS Oe e rra ee Ge 449 CompareSymbolLibs timos e ey eo a a E a a a 449 OPV ek sad Bae as styl ak et O Be do ere a She Sh oy Se ocho fe oe ae Ae 450 Copy ClipGraplt marae do ro AAAA a EA ek Oe DEAR EEY YS ORGS EAS 450 Copy lipschem a iS a Be eee eh eee eee ea ee eee ele Ys 451 Copy Biles a ax Augie Ree eee we E UO a ee be be A Gee Aa 451 CopyLocalSymbol a sg re e hhh Oe eee Ge ee ee de 452 CreateFont ae bY bee ecg A A et ae pedo de II dd 452 CreateGroup 1 4 4 2 BR Eee eee dd ae ROSA oe DOE eee 452 CreateRunningDialog 2 a e 453 GCredteS yin vis a ds eg a a ks a ae Ba e ey ds a ays Ge ee 454 CreateToolBar ss 3 28 tut B
2. Arguments Number Type Compulsory Default Description 1 string Yes String to process 2 string Yes Search string 3 string Yes Substitute string 4 string No Options Argument 1 Input string Argument 2 Substring searched in input string This is case sensitive when it searches Argument 3 The substring defined in argument 2 found in the input string is replaced with this value If arg 4 is set to all all substrings found will be replaced otherwise only the first will be replaced Argument 4 Options If set to all then all substrings located in the string will be replaced Otherwise only the first occurrence will be replaced 366 SIMetrix SIMPLIS Script Reference Manual Returns Return type string Result of string substitution Note that only the first occurrence of the substring is replaced sum Returns the sum of all values in supplied argument If the argument is complex the result will also be complex Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the sum of the supplied arguments SumNoise Similar to the function RMS1 page 333 but returns the root of the sum without performing an average Arguments Number Type Compulsory Default Description 1 real Yes Vector 2 real No Start of input vector Start x value 3 real No End of input vector End x value Returns Return type real arra
3. Arguments Number Type Compulsory Default Description 1 string Yes Property name to retrieve values for 2 string No Filter property name string No Filter property value 4 real No Schematic handle Argument 1 The name of the property to return the values for Argument 2 If set will only choose elements that have this property in them Argument 3 If set will only choose elements that have the property stated by argument 2 with the value stated by this argument Argument 4 Handle to a particular schematic If not set uses the currently highlighted schematic Returns Return type string array Returns the property values for all applicable properties Each row of the resulting array will be a different element s property flag Example The following would return all of the value for the ref property with the selected schematic for elements that have the property MODEL set to X PropValuesAll ref model X 312 SIMetrix SIMPLIS Script Reference Manual See Also Prop ValuesAnnotations on page 313 Prop ValuesWires on page 314 Prop ValuesAnnotations Returns the values for the requested property This will search selected annotations only within a schematic There are optional filters for choosing elements with a particular property or property and value combination along with options to select a specific schematic Arguments Number Type Compulsory Default Description 1
4. holdInvalid determines how invalid states in the input are handled If the holdInvalid option is specified they are treated as if they are not present and the previous valid value is used instead If omitted invalid states force an output that alternates between 1 or 2 This is to allow consecutive invalid states to be distinguished For example suppose there are 4 bits with one bit invalid If one of the valid bits changes the end result will still be invalid but it sometimes desirable to know that the overall state has changed So in this case the first invalid state will show as a 1 and the second invalid state will be 2 In any following invalid state the result will be 1 and so on scale forces the output to be scaled by the value 2 idxend idxstart 1 _ Argument 4 Optional wire template used to describe how bus vectors are named The default value is BUS NAME WIRENUM which means that bus vectors are of the form busname n where bus name is the name of the bus argument 1 and n is the index value For more details about wire templates see Netlist on page 489 Argument 5 Threshold used to define logic levels for analog signals Two element array The first element is the lower threshold and the second element is the upper threshold If either or both is omitted these values default to 0 8 and 0 9 respectively The lower threshold is the value below which an analog signal is considered to be a lo
5. Arguments Number Type Compulsory Default Description 1 String array No Initial values 2 String array No List entries Argument 1 Five element string array Values as follows Index Description 0 List box 1 initial selection 1 List box 2 initial selection 2 Message at top of box 3 Message under left hand list box 4 Message under right hand list box Argument 2 Two element array The first element carries the items to be placed in the left hand list box The second element carries the items to be placed in the right hand list box Items are separated by a pipe symbol Returns Return type string array Two element array First element carries the selected value from the left hand list box while the second value holds the selected value from the right hand list box SIMetrix SIMPLIS Script Reference Manual Select Analysis This is a special purpose function It opens the Choose Analysis dialog box The return value from this function is simply determined by how the user closes the box The main operation of the dialog box happens independently of the function call mechanism Return values are No schematic 3 Run button 2 Cancel button 1 OK button 0 The dialog box will not open if there is no current schematic The function reads the schematic s text window and translates any analysis controls present in cluding any preceded by a single comment character It uses the information gained to i
6. a 558 Automating Simulations ee ee 559 OVERVICW o sik ge e at AP A EE Ete LA eh Ege aa eA 559 Running the Simulator e eee Go Ae Se ee A Ge ee 559 Changing Component Values or Test Conditions 0 559 SIMetrix SIMPLIS Script Reference Manual Contents Organising Data Output from Automated Runs 000 561 An Advanced Example Reading Values from a File 561 Schematic Symbol Script Definition o e e 564 Defining New Symbol ewe ee ee bed OA RE RS SSA ee Oe A 564 Symbol Definition Format ee eee 565 How Symbols are Stored ee ee 567 Data lmport and Exportar eek Be ce A oe De ee e tee 567 Importing D ta ossessi a a aa e ap Qty is Us Leh Ae aude Aa 567 Exporting Data L ia dak kk lo lo OAR A EEE EEE a 568 Launching Other Applications 0 00000 eee eee ee 568 Data Files Text Format lt e be HES eee a aa A Re eee 568 GraphiObject i634 eel el eb ee OM eed ele ee ed eee dg G 569 Ovetview ocnhow taa gh ALAM A CE oe ee ala 569 Object Py pes e r ioo A O RE ee AAA abs ER da 569 Properties sana See Sele ee la a we a ew a BOR Coe eee G 570 Graph Object Identifiers the ID 2 20 200 0 e 570 Symbolic Valles ecc daa aa as a as Ge ee a e de Ravage ae a 571 Objects and Their Properties oaoa a 571 Graph Co ordinate Systems naoi goia Aaoi i ioa e e e e pee eee ee ee eee 580 EVE
7. Returns Return type string A single string indicating the user s response One of Abort Cancel Tgnore No Ok Retry Yes Mid Returns a string constructed from a sub string of argument 1 First character is at index specified by argument 2 while argument 3 is the length of the result The first character is at index 0 Arguments Number Type Compulsory Default Description 1 string Yes String 2 real Yes Start index 3 real No to end of string Length of result Returns Return type string SIMetrix SIMPLIS Script Reference Manual Example Mid Hello World 6 5 will return World See Also Char on page 68 min Returns an array equal to the length of each argument Each element in the array holds the smaller of the corresponding elements of argument 1 and arguments 2 Arguments Number Type Compulsory Default Description 1 real Yes Vector 1 2 real Yes Vector 2 Returns Return type real array minidx Returns index of the input array element with smallest magnitude Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns index to minimum input value Minima Returns array of values holding every minimum point in the supplied vector whose value complies with limits specified in argument 2 271 SIMetrix SIMPLIS Script Reference Manual Arg
8. tab Tab id used to specify which tabbed sheet within a schematic win dow is to be saved tab _id is a number between zero and 1 less than the number of tabbed sheets in the window The function GetOpen Schematics page 201 can be used to determine the number of tabs open in a window Jui Ignored This is retained for compatibility with version 7 2 and ear lier This was used in conjunction with tab to idenify a schematic from a window id and tab id From version 8 the GetOpenSchematics page 201 function returns all schematics that are open independent of which window so ui is no longer required wid Use id from WM_ GetContent WidgetNames page 399 writeSymbol If the schematic being saved has an embedded symbol that forms part of a hierarchical component the symbol will be written out if this switch is specified Otherwise the symbol will not be written out If filename already exists and already has a symbol that symbol will remain intact if this switch is not specified filename Name of file to which schematic is saved filename is not optional as it was with earlier versions of SIMetrix SaveGraph SaveGraph version data version id graph id filename SIMetrix SIMPLIS Script Reference Manual Saves the currently selected graph to a binary file This can subsequently be restored using Open Graph page 498 Parameters id Graph object id If more than one graph is displayed graph id can be used to iden
9. If component only buttons intended for placing schematic symbols will be returned Otherwise all buttons available will be returned If user defined buttons have been created using the CreateToolButton on page 455 command this argument may be set to any value used for the class switch in which case only buttons defined with that class switch value will be returned 226 SIMetrix SIMPLIS Script Reference Manual Returns Return type String array of button specifications Each entry contains two values separated by a semi colon The first value is the name of the button as can be used to add buttons to a toolbar using the command DefineToolBar on page 459 The second value is a description of the button See Also CreateToolBar on page 454 DefButton on page 458 Get UncPath Returns the given path in UNC form This function s main purpose is to convert windows drive letters to a consistent format Arguments Number Type Compulsory Default Description 1 string Yes Path Argument 1 Path of file in any form Typically this would include a drive letter on windows Returns Return type string Path in UNC form Note that if a drive letter on a local machine is used in the path this function will return the original path unmodified even if a netwrok share is defined for that drive Get UserFile Function opens a dialog box to allow the user to select a file Arguments Num
10. Just one final note plot netname won t work for vectors whose name contains certain characters such as arithmetic characters e g and These characters get interpreted as their literal meaning and an error usually results To plot vectors whose names contain these characters you should use the Vec function and supply the vector name as a string E g plot Vec netname SIMetrix SIMPLIS Script Reference Manual Note that there are no curly braces used here This is because the Vec function returns a numeric vector containing the actual data to be plotted The NetName page 276 function returns the name of the vector not its actual data Example 4 Making a Parts List This script example displays a list of components in the currently selected schematic with their references and values in the message window mk_bom txt Display parts list in message window if NOT SelSchem then echo There are no schematics open exit all endif let refs PropValues ref ref for idx 0 to length refs 1 let val PropValues value ref refs idx check for duplicate ref if length val 1 then echo refs idx val else echo Duplicate reference refs idx Ignoring endif next idx The first line do_bom txt Display parts list in message window is a comment Any line beginning with a will be ignored The next line if NOT SelSchem then is the start of an if statement SelSchem is a func
11. Special function used to evaluate a sequence of expressions Execute script as a function Tests if a command exists Checks if the specified directory exists Tests whether a file exists Returns TRUE if the specified function exists Returns TRUE if specified schematic symbol ex ists Returns TRUE if specified schematic symbol ex ists Exponential Fast Fourier Transform Provides bit wise access to integers Filters a menu list to return only menu definitions that are actually displayed Filters specific lines from a text file Returns location of simulator model given name and type Finite Impulse Response digital filter Returns argument truncated to next lowest inte ger Returns arguments truncated to next lowest in tegers as a vector Returns formatted number in string form Performs a spectral analysis using the continuous Fourier algorithm SIMetrix SIMPLIS Script Reference Manual Function Name Description Fourier OptionsDialog Fourier Window FullPath gamma Gauss GaussLim GaussTrunc GenPrint Dialog GetActualPath Get AllCurves Get AllSimulator Devices Get AllSymbolPropertyNames GetAllYAxes GetAnalysisInfo GetAnalysisLines GetAnnotationText GetAxisCurves GetAxisLimits GetAxisType GetAxisUnits GetChildModulePorts GetCodecNames GetColours GetColourSpec GetCompatiblePathName GetComponent Value UI function opens fourier options dialog Apply
12. xsort If specified the output is sorted in order of their x values reference Oth erwise the values are sorted in descending order of y magnitude 266 SIMetrix SIMPLIS Script Reference Manual nointerp If not specified the values returned are obtained by fitting a parabola to the maximum and each point either side then calculating the x y location of the point with zero slope Otherwise no interpolation is carried out and the literal maximum values are returned noendpts If specified the first and last points in the data will not be returned as maximum points Argument 4 Minimum spacing between x values Any pair of points that are closer than this value will be treated as a single point Returns Return type real array The function returns the XY values for each maximum point The X values are returned as the vector s reference see Vector References on page 21 Maximum Returns the largest value found in the vector specified in argument 1 in the range of x values specified by arguments 2 and 3 Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector 2 real No start of vector Min range 3 real No end of vector Max range Returns Return type Real mean Returns the average of all values in supplied argument If the argument is complex the result will also be complex Arguments Number Type Compulsory Default Description 1 real complex array Yes
13. 191 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes List elements Returns Return type string array Unselected elements GetLongPathName Returns long path name for path specified either as a long or short path Short path names are a feature of some file systems which represent the path in a form that would be accepted on legacy files systems especially DOS Arguments Number Type Compulsory Default Description 1 string Yes Path Argument 1 Input path Maybe full or partial and the function will return its argument in the same form That it it won t convert to a full path If the input path does not exist this function will simply return its argument unmodified Returns Return type string array See Also GetShortPathName on page 208 Get MaxCores Return maximum cores available taking account of hardware capability and license Arguments No arguments 192 SIMetrix SIMPLIS Script Reference Manual Returns Return type real Maximum cores available Get Menultems Returns all menu item names in the specified menu Arguments Number Type Compulsory Default Description 1 string Yes Menu path 2 string No Options Argument 1 Specifies the path for the menu as it would be provided to the command DefMenu page 462 but without the menu item name For example the command to define the command shell s
14. 238 SIMetrix SIMPLIS Script Reference Manual Returns Return type real scalar Notes Use the command CurveEditCopy page 458 to copy graph curve data to the internal clipboard Use the Curve icb curve_index to plot a curve that resides in the internal clipboard HierarchyHighlighting This function is used by the hierarchical highlighting system and its operation and argument list may be subject to change Consequently this function is not yet fully supported Arguments No arguments Returns Return type HighlightedNets Returns names for any wholly highlighted net names on the specified schematic Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns the highlighted netnames as an array of strings 239 SIMetrix SIMPLIS Script Reference Manual Histogram Creates a histogram of argument 1 with the number of bins specified by argument 2 The bins are divided evenly between the maximum and minimum values in the argument Arguments Number Type Compulsory Default Description 1 real array Yes Vector 2 real Yes Number of bins 3 string No Options Argument 1 Vector to be processed
15. 25 LS_RSAT_L2 The lower switch saturation current for Level 10Meg 2 models 26 LS_vV1_L2 The voltage where the lower switch transi 100m tions from the 1st to 2nd PWL segments 27 LS_ISAT L2 The lower switch saturation current for Level 3 2 models Argument 2 Index Purpose Notes Default 0 Caption The dialog box caption Edit Multi Level MOS FET Driver 1 Combo options Combo items for the initial conditions box empty 2 Help context id The help context id used for the built in empty Multi Level MOSFET Driver Returns Return type string array String array corresponding exactly to argument 1 and holding the user s selected values Return value will be empty if the user cancels the box EditStylesDialog Opens the Edit Styles dialog This is a system function and is unsupported Arguments Number Type Compulsory Default Description 1 string array Yes Style names 2 string array Yes Style info 3 string array Yes Line types available 4 string array No empty string Hidden default styles for viewer 5 string array No empty string Flags for hiding buttons string array No empty string Global style info 7 string No empty string Editor settings 124 SIMetrix SIMPLIS Script Reference Manual Argument 2 Style information for each style name specified in argument 1 Each element in the array is matched to the corresponding element in argument 1 and must be in the form Name LineType LineThickness LineColour A
16. AddGlobalStyle AddGraphDimension AddImage AddImageScript AddLegend AddLegendProp Aborts the current simulation Sends a signal to the SIMPLIS simulator instruct ing it to abort Displays the about box Adds text to an annotation Symbol Definition Command Create whole cir cles and ellipses as well as arcs of circles and el lipses Symbol Definition Command Creates a circle Adds a curve marker to the currently selected graph sheet Applies a double click action to the selected ele ments Adds a FileView menu item Symbol Definition Command Adds a flood filled region to a symbol Adds a free text item to the currently selected graph sheet Adds an additional global style Adds a dimension object to a graph Adds an image to the current schematic Symbol Definition Command Adds an image Adds a legend box to the currently selected graph Adds a property to a graph legend 414 SIMetrix SIMPLIS Script Reference Manual Command Name Description AddPin AddProp AddProperty AddSeg AddSymbolProperty AddTextBox AddTitleBlock AlignText Anno AppendGroup AppendText Window Arguments BuildDefaultOptions Cancel CaptureWaveformImage Cd ChangeArcAttributes ChangeSelectedStyleNames ChangeStyle ChangeSymbolProperty ClearMessage Window Close G loseGraphSheet Q losePrinter Q loseSchem CloseSheet CloseSimplisStatusBox Symbol Definition Command Adds a p
17. Argument 2 Number of bins Argument 3 Set to step to force output in a stepped style similar to a bar graph Returns Return type real array Notes Histograms are useful for finding information about waveforms that are difficult to determine by other means They are particularly useful for finding flat areas such as the flat tops of pulses as these appear as well defined peaks The Histogram function is used in the rise and fall time scripts for this purpose Users should note that using this function applied to raw transient analysis data will produce misleading results as the values are unevenly spaced If you apply this function to simulation data you must either specify that the simulator outputs at fixed intervals select the Output at PRINT step option in the Simulator Choose Analysis dialog box or you must interpolate the results using the function Interp page 251 Iff If the first argument evaluates to TRUE i e non zero the function will return the value of argument 2 Otherwise it will return the value of argument 3 Note that the type of arguments 2 and 3 must both be the same No implicit type conversion will be performed on these arguments 240 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes Test value 2 real array Yes Result if test true 3 real array Yes Result if test false Returns Return type real array
18. DUE 10 3 Drs LO 120u LA a ol 5u Val Returns argument converted to a value The conversion assumes that the string supplied is an expression Arguments Number Type Compulsory Default Description 1 any Yes Input value Returns Return type real complex See Also Str on page 362 ValueDialog Opens a dialog box with up to 10 edit controls allowing numeric values to be entered The function returns an array representing the user selected value in each box If cancelled it returns an empty vector Arguments Number Type Compulsory Default Description 1 real No 1 Initial edit control values 2 string No empty Edit control labels 3 string No empty Dialog box caption 4 string No empty Argument 1 The number of edit controls displayed is determined by the length of the first argument If this is omitted all 10 will be displayed Argument 1 specifies the initial values set in each of the controls 392 SIMetrix SIMPLIS Script Reference Manual Argument 2 Supplies the text of the label displayed to the left of each edit control The width of the dialog box will be adjusted to accommodate the length of this text Argument 3 Specifies the text in the title bar of the dialog box Argument 4 Attaches special characteristics for particular applications The value of this argument and meaning is as follows Value Action Switch For use to specify VC switches A
19. Description Histogram Iff IV TR im imag TInitRandom InputGraph InputSchem Instances Inst Nets InstNets2 InstPins Inst Points InstProps integ Interp IsComplex IsComponent IsDocumented IsFileOfType IsFullPath IsImageFile Returns histogram of argument Returns a specified value depending on the out come of a test Returns a specified value depending on the out come of a test Infinite Impulse Response digital filter Returns imaginary part of argument Returns imaginary part of argument Initialises the random number generator used for SIMPLIS Monte Carlo distribution functions User Interface function Input text for graph op eration User Interface function Input text for schematic operation Returns array of instances possessing specified property Returns array of net names for each pin of se lected schematic instance As InstNets but with more advanced features to identify instance Returns array of pin names for each pin of se lected schematic instance Returns location and orientation of specified in stance Returns names of all properties owned by selected instance Returns integral of argument Interpolates argument to specified number of evenly spaced points Returns TRUE if argument is complex Determines whether a schematic instance is a hi erarchical component Returns whether the script command or function is documented Returns TRUE
20. Execute inst npn The problem with the last example is that the Execute command interprets the first token in command as the actual command or script name and the remainder of command as the arguments to it Because inst npn is enclosed in quotation marks it is treated as a single item specifying the command name inst npn which is incorrect ExecuteMenu ExecuteMenu menu identifier Executes the menu with the given full identifier These identifiers should match those used to create the menu in DefMenu page 462 See Also DefMenu on page 462 FileViewCleanU pFile Watchers FileViewCleanUpFileWatchers Removes unnecessary file watchers File watchers are created by the File View to keep track of when changes to a directory occur These watchers ensure the File View is kept up to date however in some circumstances it may be beneficial to release the system resources used by file watchers that are not deemed necessary Generally this operation occurs automatically FloodFillSymbol FloodFillSymbol Flood fills a symbol either interactively or from a specific point Default behaviour is interactive mode Parameters loc Defines the location to attempt a flood fill Focus Focus named window name userid window id schem graph Focus on a window Only one of the options can be used at a time 476 SIMetrix SIMPLIS Script Reference Manual Parameters schem graph Currently or most recent
21. If present the current working directory will change to that contain ing the file selected by the user Open If present a File Open box will be displayed otherwise a Save As box will be displayed NotExist If used with Open the file is not required to already exist to be accepted ShowReadOnly If present and Open is also specified an Open as readonly check box will be displayed The user selection of this check box will be returned in either the second or third field of the return value FilterIndex If specified the type of file selected by the user will be returned as an index into the list of file filters specified in argument 1 So 0 for the first 1 for the second etc Argument 4 Initial file selection Returns Return type string String array of length between 1 and 3 as described in the following table SIMetrix SIMPLIS Script Reference Manual Option Option Fil Return value ShowRead terIndex Only No No Path name only Yes No Two element array index 0 path name index 1 Read only checked TRUE or FALSE No Yes Two element array index 0 path name index 1 Filter index selected Yes Yes Three element array index 0 path name index 1 Filter index selected index 2 Read only checked TRUE or FALSE Get VecStepParameter This function retrieves the name of the parameters that were stepped to obtain the vector data supplied It wil
22. NewPassiveDialog Opens a dialog box intended to select values for passive components such as resistors and capacitors The dialog below is displayed after executing the following Let paramNames temp tcl tc2 Let paramValues Show NewPassiveDialog 1k Select Value e24 paramNames paramValues Fai choose Component Yalue xj Select Yalue Base fi Series Decade fix E C E6 Result ik C E12 E24 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Initial value 2 string array No Select value E12 message series 3 string array No empty Parameter names 4 string array No empty Parameter values Argument 1 Initial value displayed in Result box Base and Decade will be adjusted accordingly Argument 2 Two element string array O Message displayed at the top of the box 1 Initial setting of preferred value series Possible values E6 E12 E24 Argument 3 String array defining list of parameter names See argument 4 Argument 4 String array defining list of parameter values If arguments 3 and 4 are supplied the Parameters button will be visible This button opens another dialog box that provides the facility to edit these parameters values Returns Return type string array The function returns a string array in
23. No arguments Returns Return type real Returns the vertical position of the graph measurement cursor If there is no graph open or cursors are not enabled the function returns 0 Y Datum Returns x location of graph reference cursor Arguments No arguments 412 SIMetrix SIMPLIS Script Reference Manual Returns Return type real Returns the vertical position of the graph reference cursor If there is no graph open or cursors are not enabled the function returns 0 YFromX Returns array of values specifying the vertical value of the specified vector at the given x value Arguments Number Type Compulsory Default Description 1 real Yes Input vector 2 real Yes X value 3 real No 2 Interpolation order 1 or greater Returns Return type real array Returns an array of values usually a single value specifying the vertical value of the specified vector argument 1 at the given x value argument 2 If the given x value is out of range an empty result see page 28 is returned The sampled input vector is interpolated to produce the final result Interpolation order is specified by argument 3 SIMetrix SIMPLIS Script Reference Manual Chapter 5 Command Summary The following table lists all commands available Command Name Description Abort AbortSIMPLIS About AddAnnotationText AddArc AddCirc AddCurveMarker AddDoubleClickAction AddFileViewMenultem AddFloodFill AddFreeText
24. Now save the text to a file called hello suscr To execute the script click on the Run toolbar button or type hello at the command line You should see the message Hello World Appear in the message window A script is executed by typing its filename at the command line If the file has the extension sxscr the extension may be omitted You can also assign a key or menu to execute a script Type at the command line DefKey F6 HELLO Now press the F6 key The message should appear again For information on defining menus see User Defined Key and Menu Definitions on page 556 Example 2 An Introduction to Loops This example adds up all the elements in a vector or array To create a vector we will run a simulation on one of the example circuits The whole process will be put into a script except opening the schematic which we will do manually But this can be done from a script as well To start with open the example circuit General AMP szsch Make sure it is selected to run a transient analysis SIMetrix SIMPLIS Script Reference Manual Now select File New Script This will open a text editor with the current directory set to the SCRIPT Type in the following Netlist design net Run design net let sum 0 for idx 0 to length vout 1 let sum sum vout idx next idx echo The sum of all values in vout is sum Save the script to the file name SUM srscr Now type SUM at the command line A simulation wil
25. Objects and Their Properties on page 571 Some properties return the id of another graph object These can be used to create nested property definitions For example Zcurve label when applied to a curve marker object returns the label of the attached curve The template string may also contain the special keywords if ifd lt t and repeat These behave the same and have identical syntax as the keywords of the same name used for schematic TEMPLATE properties described in the User s Manual Argument 3 Options Currently there is only 1 and that is the action to take when an expression fails to evaluate Possible values are msg Requires a second arg 3 to have two elements Returns error message specified in second element of string empty Returns an empty value on error literal default Returns the literal text of the expression Returns Return type string Returns the result of evaluating the template Notes This function along with ResolveTemplate page 332 are implemented using the same internal program code that implements the schematic TEMPLATE property in a netlist generation and behaves in the same way 331 SIMetrix SIMPLIS Script Reference Manual ResolveTemplate Evaluate template string Arguments Number Type Compulsory Default Description 1 string Yes Template string 2 string Yes Property names 3 string Yes Property values 4 string No Input template unmodified Return val
26. Returns all Safe Operating Area definitions specified in the most recent analysis Arguments No arguments Returns Return type string array Returns an array of strings with each string in the form label minvalue maxvalue xwindow derating type Where label The label specification on the SETSOA line minvalue Minimum value maxvalue Maximum value xwindow Window width the time the limits must be exceeded for the violation to be recorded derating Derating factor type Peak or Mean 217 SIMetrix SIMPLIS Script Reference Manual GetSoaMaxMinResults Returns the maximum and minimum values reached for all SOA definitions Arguments No arguments Returns Return type string array Returns an array of strings defining max and min values reached Each element in the array corresponds to the elements returned by the GetSoaDefinitions function Each string is of the form min_val min_reached_at max_val max_reached_at max_mean Where min_val Minimum value reached min_reached_at Time at which the minimum value was reached max_val Maximum value reached max_reached_at Time at which the maximum value was reached max_mean Maximum mean value Notes This function returns the maximum and minimum values returned for all SOA definitions regardless of whether or not the limits were violated GetSoaOverloadResults Returns the overload factor for each SOA definition Arguments Numbe
27. This isn t essential but it is always best to delete global variables when we are finished with them for compIdx 0 to numComponents 1 Let paramName global amp components compIdx UnLet paramName next compIdx Schematic Symbol Script Definition It is possible to define a schematic symbol using a script This method is used in some of the internal scripts to create dynamic symbols For example the transformer devices allow the user to define the number of both primary and secondary windings The symbols for these are not stored in the symbol library but generated programmatically using the commands described in this section Symbol scripts can also be useful to edit symbols using a text editor Some operations can be more rapidly performed by editing a text definition than by using a graphical editor To support this method SIMetrix includes the MakeSymbolScript page 485 command that writes a script definition of a symbol in ASCII form The following sections describe how to define a symbol using a script Defining New Symbol To define a new symbol as opposed to modifying an existing one proceed as follows 1 Enter the text definition as described in Symbol Definition Format on page 565 into a text file using NOTEPAD for example 2 Load the new definition by simply typing the name of the file at the command line 3 Test that your new symbol is as you expect Use the menu Place From Symbol Library to place yo
28. on page 582 Parameters greyscale Set to on to enable grey scale printing inder Printer to use This can be found from the function GetPrinterInfo page 203 If omitted the application default printer will be used SIMetrix SIMPLIS Script Reference Manual num Copies Number of copies to print portrait If specified print will be in portrait orientation otherwise it will be landscape printer Specify printer by name If omitted printer will be defined by its index see below or the application default printer will be used title Title of print job This is used to identify a print job and will be displayed in the list of current print jobs that can be viewed for each installed printer from control panel title is not printed on the final document OpenRawFile OpenRawFile purge bufsize buffer_size spice2 rawfile datafile Opens a SPICE 3 format ASCII raw file Parameters bufsize Specifies the percentage proportion of installed RAM that is used for buffering the data See Notes below for more details Default value is 10 esdf If specified the datafile is assumed to be in CSDF format purge If specified the loaded data group will be treated like a normal simu lation group and will be automatically deleted after three runs Oth erwise it will not be deleted unless the user does so explicitly e g by using the Simulator Manage Data Groups menu spice2 If specified datafile is assumed to
29. Displays an edit control Displays a check box Displays a drop down list with entries defined by range range Valid range of values for control delimited by Ignored for STRING and BOOL types and compulsory for LIST type For REAL and INTEGER types one or two values may be supplied representing the minimum and maximum valid values The user will not be able to enter values outside this defined range For LIST types the range defines the entries in the list SIMetrix SIMPLIS Script Reference Manual Argument 2 This is a string array which must have the same number of elements as argument 1 Each element defines the initial value for the control For BOOL types use the values true and false Argument 3 Function options Currently there is only one and that is the dialog box caption Returns Return type string array Example The following call would display the dialog as shown above Show NewValueDialog RIN 0 ROUT 0 TH HYSTWD 0 VOL VOH TRIG_COND LIST 0_TO_1 1_TO_0 IC LIST 0 1 10Meg 100 2 0 1 O 5 O_TO_1 0 D Edit Device Parameters norm Returns the input vector scaled such that the magnitude of its largest value is unity If the argument is complex then so will be the return value Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the norm of t
30. Parameters reenable Flag to indicate whether to re enable painting or not Default is false NoUndo NoUndo Inhibits saving to undo buffer until command returns to the command line This allows multiple operation to be treated as one for the purposes of the Undo feature For example suppose you have a script that edits a number of schematic instances Normally if you run the script then select Undo only the most recent change will be undone The user would need to select Undo many times to return the circuit to the state before the script was run If NoUndo is called at the start of the script Undo will return the schematic to the start state in a single operation Parameters nocapture Normally NoUndo saves the current state so that the next undo operation will restore the state to immediately before NoUndo was called The nocapture switch inhibits this release Restores undo buffer save operations This happens automatically when control returns to the command line OpenAsciiFile OpenAsciiFile filename Open a schematic ASCII format file for manual text editing This can be useful for debugging or for some operations that are difficult to perform using the GUI editor 496 SIMetrix SIMPLIS Script Reference Manual Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto See Also OpenSchem on page 502 OpenBasicTe
31. Power W Charge Flux Vs Volt ye Volt Hz V2 H2 Volt rtHz V rtHz Amp A2 Amp Hz A Hz Amp rtHz A rtHz means dimensionless see notes The physical type of a vector is the name of the physical quantity it represents e g Voltage Current Time etc This is used by graph plotting routines to set appropriate units for axes To set a vector as dimensionless use the following syntax SetUnits vector SIMetrix SIMPLIS Script Reference Manual Shell Shell wait displayStdout displayStderr command command string Launches an application Parameters command Calls system command processor to execute command string This is necessary to run internal commands such as Copy and Move The command processor is usually CMD EXE displayStderr displayStdout Displays in the message window any standard output from the pro gram noConnectOutPipes watt If specified application is launched synchronously This means that SIMetrix will not continue until the application has closed command string File system path to executable file This would usually be a binary executable but may be any file that is defined as executable by the operating system If a full path is not specified a search will be made for the file using the rules described in the function Shell page 353 Notes Console mode applications will be launched without the
32. Returns Return type real array Returns an array of length 4 providing information on selected arcs circles ellipses in the symbol editor Format is as follows 219 SIMetrix SIMPLIS Script Reference Manual Index Description 0 Swept angle in degrees 1 Height Width 2 Number of selected arcs circles ellipses 3 0 if all selected arcs circles ellipses are identical to each other Otherwise 1 GetSymbolFiles Returns full paths of all installed symbol library files Arguments No arguments Returns Return type string array GetSymbolInfo Returns information on symbol in the symbol editor Arguments No arguments Returns Return type string array Returns a string array of length 3 providing information on the symbol in the currently selected symbol editor sheet If no symbol editor sheet is open the function returns an empty vector Format of the return value is 220 SIMetrix SIMPLIS Script Reference Manual Index Description 0 Symbol name 1 Symbol description 2 Symbol catalog 3 Path to symbol library or component file where the symbol definition is located If the symbol is not found in any symbol library this element will be empty 4 Type of symbol One of two values Symbol Regular symbol stored in a library Component Hierarchical component 5 Flags Currently values can only be 0 or 1 Future versions may use additional bits For forward compatibility test
33. Returns the value of a system defined variable System defined variables are values that are hard wired in the program This function provides access to these variables The function is used by some internal scripts 372 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Value name Returns Return type string SystemW idgetExistsInSelected Window Returns true if the system view of the type specified exists within the highlighted window Arguments Number Type Compulsory Default Description 1 string Yes System view type Argument 1 The name of the type of system view to check for Options are Command Shell File View Part Selector Returns Return type boolean True if the system view exists within the highlighted window false otherwise TableDialog Displays a spreadsheet style table to allow the user to enter tabular data See example below for a picture Arguments Number Type Compulsory Default Description 1 real array Yes Geometry 2 string array No Cell initial values 373 SIMetrix SIMPLIS Script Reference Manual Argument 1 Real array of length 2 First element is the number of rows initially displayed and the second element is the number of columns Note that these are just the initial values The user may subsequently add or delete rows and columns Argument 2 An array of strings to define the initial cell entr
34. Shell Runs an external program and returns its exit code Arguments Number Type Compulsory Default Description 1 string Yes Path to executable file 2 string No Options 3 string No stdout and stderr output File to receive redirected directed to message window output Argument 1 File system path to executable file This would usually be a binary executable but may be any file that is defined as executable by the operating system I 2 3 4 5 6 The directory where the SIMetrix binary is located The current directory windows SYSTEM32 windows is the location of the Windows directory windows SYSTEM Argument 2 The windows directory The directories listed in the PATH environment variable String array containing one or more of the options defined in the following table wait command stdout stderr console If specified the function will not return until the called process has exited Calls OS command line interpreter to execute the command supplied This can be used to execute system commands such as copy and move Stdout from the process is displayed in the command shell message window Requires either wait or file redirection see argument 3 Stderr from the process is displayed in the command shell message window Requires either wait or file redirection see argument 3 Argument 3 Opens a console window to execute the process Disable
35. Zener ZoomFull ZoomIn ZoomOut nmos_ic bmp npn bmp opamp bmp options bmp pjfet bmp pmos bmp pmos_ic3 bmp pmos_ic bmp pnp bmp print bmp psu bmp res bmp resz bmp rotate bmp sat_ind bmp tx_sat bmp fileclose bmp newschem bmp fileopen bmp filesave bmp saveall bmp scr bmp show bmp pause bmp run bmp run bmp newsymbol bmp curvetitle bmp tl bmp tx bmp undo bmp undo bmp vprobe bmp vsource bmp vsig bmp pencil bmp zener bmp zoomfull bmp zoomin bmp zoomout bmp Place 4 term Nchannel MOSFET Place NPN Transistor Place Opamp Options Place P channel JFET Place P channel MOSFET Place 3 term Pchannel MOSFET Place 4 term Pchannel MOSFET Place PNP Transistor Print Place PSU Place Resistor Box shape Place Resistor Z shape Rotate Place Saturable Inductor Place Saturable Transformer Close Schematic New Schematic Open Schematic Save Schematic Save All Schematics Place Thyristor Show Selected Curves Pause Simulation Run Netlist Run Schematic New Symbol Change Curve Name Place Transmission Line Place Transformer Undo Undo Zoom Place Voltage Probe Place Voltage Source Place Waveform Generator Wire Mode Place Zener Diode Fit Window Zoom In Zoom Out SIMetrix SIMPLIS Script Reference Manual Button Name Graphic Function ZoomRect zoomrect bmp Zoom Box ZoomX Auto zoomwidth bmp Fit Width Zoom Y Auto zoomheight bmp Fit Height SIMetrix SIMPLIS Script Reference Manua
36. and argument 3 is not specified Edit WaveformDialog Opens a dialog designed for editing a time domain waveform This function has been superceeded by EditWaveformStrDialog page 128 but is retained to support old designs Arguments Number Type Compulsory Default Description 1 real Yes Time frequency initial values 2 real No Vertical initial values 3 string array options Argument 1 Initial values for the controls in the Time Frequency group box Up to 10 elements defined as follows Index Description 0 Integer from 0 to 8 specifies wave shape as follows 0 o ny na F wn rR NO om FP Wn Fe Square Triangle Sawtooth Sine Cosine Pulse One pulse One pulse exp Step Delay Rise time Fall time Width Period Damping 0 Use Delay 1 Use Phase 127 SIMetrix SIMPLIS Script Reference Manual Index Description 8 Frequency 9 Duty cycle Argument 2 Initial values for the controls in the Vertical group box Up to 5 elements defined as follows Index Description 0 Initial 1 Pulse 2 Off until delay 3 Offset 4 Amplitude Argument 3 String array up to length 2 which may specify either of these options Simulator mode either SIMetrix or SIMPLIS Initial pulse mode set to initialpulse Returns Return type string array String array with 15 elements Elements 0 9 as for argument 1 elements 10 14 as for argument 2 Edit
37. image baseb4 String Base64 representation of the image AddLegend AddLegend autowidth font font name colour colour name label x pos y pos width height Adds a legend box to the currently selected graph A Legend Box is a graph annotation object which consist of a rectangle containing a list of curve labels See Graph Objects on page 569 for more information Parameters auto Width If specified the width of the box will be adjusted automatically ac cording to its contents colour Name of colour to be used for text Name of option setting that will store the colour of the object in the form rrggbb Default is GraphColourLegendBox font Name of font object to be used for text object This must with the CreateFont command See CreateFont page 452 for details Default is Legend Box 434 SIMetrix SIMPLIS Script Reference Manual label Z pos Y pos width height This is the text that will copied to each entry To be meaningful this must contain a symbolic value enclosed by Symbolic values for graph objects are explained more fully on Symbolic Values on page 571 The default value for label if omitted if DefaultLabel This will result in the curves name and measurements being displayed in the legend box Some alternatives are Curve Label displays just the label with no measurements Curve Measurements displays just the measure ments Curve displays
38. on page 10 Single and double quotation marks can be included by doubling them up However this can be inconvenient and an alternative method is to assign a variable with the special character using the Chr page 69 function This method is also the only way to enter a tab character into a literal string For example Let tab chr 9 Let string This is a tab amp tab amp character This method can be used to enter new line characters chr 10 and also single quotes chr 39 double quotes chr 34 and semi colons chr 59 Vectors Vectors can be created using a bracketed list with a function that returns a vector or by the simulator which creates a number of vectors to represent node voltages and device currents A bracketed list is of the form expressionl expression2 E g let v 1 3 9 These are described in more detail in the section on Bracketed Lists on page 14 Functions and simulator vectors are described in following sections Vectors like other variables may also contain strings or complex numbers but all the elements must be the same type Individual elements of vectors may be accessed using square brackets P and E g let v 1 3 9 let a v 2 a is assigned 9 in the above example Index values start at 0 so the first element 1 is v 0 It is also possible to assign values to individual elements e g let v 2 5 In which case the value assigned must have the same
39. 1 real complex array Yes vector Returns Return type phase_rad Returns the phase of the argument in radians Identical to ph page 296 except the result is in radians Produces a continuous output i e it does not wrap from 180 degrees to 180 degrees Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array 297 SIMetrix SIMPLIS Script Reference Manual PhysType Returns the physical type of the argument Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector Argument 1 Possible values are meaning dimensionless quantity unknown Voltage Current Time Frequency Resistance Conductance Capacitance Inductance Energy Power Charge Flux Volt Volt Hz Volt rtHz Amp Amp Hz Amp rtHz Volts sec Returns Return type string See Also Units on page 388 298 SIMetrix SIMPLIS Script Reference Manual PinName Returns information about the schematic instance pin nearest the mouse cursor The format of the result depends on the values of the arguments Arguments Number Type Compulsory Default Description 1 string No empty Options 2 string No empty Property name Argument 1 May be one of five possible values empty Return value is full h
40. 208 SIMetrix SIMPLIS Script Reference Manual GetSimConfigLoc Returns the location of the simulator s configuration information This function returns its result in an identical form to the function GetConfigLoc page 158 Arguments No arguments Returns Return type string Index Description 0 GetSimetrixFile Function opens a dialog box to allow the user to select a file Returns the full path name to the selected file or an empty string if cancelled Arguments Number Type Compulsory Default Description 1 string Yes File type 2 string array No empty Options 3 string No empty Initial file Argument 1 String to define one of the standard SIMetrix file types This determines the files that will be displayed Possible values are Schematic Schematic files Data Data files Text Text files LogicDef Logic definition files as used by the arbitrary logic block Script Script files Model Model files Catalog Catalog files Graph Graph files Component Schematic component files Symbol Symbol library files Snapshot Snapshot files Netlist Netlist files 209 SIMetrix SIMPLIS Script Reference Manual VerilogA Verilog A files VerilogHDL Verilog HDL files AsciiFileEditor Schematic ASCII files The type selected determines the files to be displayed controlled by their extension The extension associat
41. 3 1 4 Graph AddGraphCrossHair GetAllCurves GetFontSpec GetLicenselnfo GetLicenseStats GetOption GetSimConfigLoc MLSplineFit Exist Dir ExistFile FullPath GetActualPath GetCodecNames GetCurDir GetDriveType GetFileDir GetFileInfo GetFileVersionStamp GetFreeDiskSpace GetLine GetLongPathName GetPath GetShortPathName Get AllYAxes Get AxisCurves HaveFeature IsOptionMigrateable VersionInfo WriteConfigSetting MLVector Get TempFile Get UncPath IsFullPath IsSameFile ListDirectory LoadFile MakeDir MakeLogicalPath OpenEchoFile OpenFile ReadFile RelativePath SimetrixFileInfo SplitPath TranslateLogicalPath Get AxisLimits Get AxisType SIMetrix SIMPLIS Script Reference Manual Get AxisUnits GetCurrentGraph GetCursorCurve GetCurveAxis GetCurveName GetCurves GetCurveVector GetDatumCurve GetGraphObjects 3 1 5 Mathematical abs area arg arg_rad atan atan_deg avg cos cos_ deg db diff erf erfc exp fit Field FIR Floor floorv Fourier Fourier Window gamma 3 1 6 Miscellaneous GetLaplaceError Message HavelnternalClipboardData GetGraphObjPropNames GetGraphObjProp Value GetGraphObjPropValues GetGraphTabs GetGraphTitle GetLegendProperties GetNumCurves GetSelectedCurves GetSelectedGraphAnno GroupDelay HasLogSpacing Histogram IF IV IIR im imag integ In log log10 mag magnitude max maxidx Maxima Maximum mean Meanl min minidx IsI
42. An object used to title a curve or mark a feature Name Description Read Only Division Division index of attached curve Yes Graph ID of parent graph Yes ID ID of this object Yes Type Type of object always CurveMarker Yes Curve ID of attached curve No Font Font for label No Hidden Not implemented No Label Label of curve marker May be a symbolic value De No fault is curve label which returns the label of the attached curve LabelJustification Text Alignment May be one of these values No 1 Automatic O Left Bottom 1 Centre Bottom 2 Right Bottom 12 Left Middle 13 Centre Middle 14 Right Middle 8 Left Top 9 Centre Top 10 Right Top SnapToCurve On or Off If On marker tracks attached curve i e its No y position is determined by the y value of the curve at the marker s x position If Off marker may be freely located X1 X data value at arrowhead No SIMetrix SIMPLIS Script Reference Manual Name Description Read Only Y1 Y data value at arrowhead No X2 X position of label in view units relative to arrowhead No Y2 Y position of label in view units relative to arrowhead No FreeText Free text objects are items of text with no border or background that are not attached to any other object Name Description Read Only Date Date that the object was created If the object is on a Yes graph that has been saved to a file then subsequently restored the date will be the date that the obj
43. Arguments No arguments SIMetrix SIMPLIS Script Reference Manual Returns Return type string Next available style name that is not being used elsewhere which can be used to create Normal and Selected variants of it Get NodeNames Returns all node names used in most recent simulation Arguments No arguments Returns Return type string array All node names used in simulation Will return an empty vector if no simulation has been run Get NonDefault Options Returns names of all OPTION settings in the most recent simulation that were not at their default value Arguments No arguments Returns Return type string array Get NumCurves Returns the number of curves in curve group This is applicable to curves plotted for a Monte Carlo analysis Arguments Number Type Compulsory Default Description 1 string Yes Curve ID Returns Return type real 200 SIMetrix SIMPLIS Script Reference Manual GetOpenSchematics Returns the path names of all schematics currently open Arguments Number Type Compulsory Default Description 1 real No All schematics No longer used Argument 1 Originally this was the index of a schematic window as returned in the user index field by the function GetWindowNames page 230 with the full option specified However since version 8 the GUI design of SIMetrix has changed and there is no longer a concept of different types of window All windows can con
44. Clk mean will generate a vector which when plotted on the waveform viewer appears like Gate l A A Fl 0 20 40 60 80 100 120 140 160 180 200 uSecs 20uSecs div ph Returns the phase of the argument in degrees Each of the functions ph phase page 297 and phase_rad page 297 produce a continuous output i e it does not wrap from 180 degrees to 180 degrees The arg page 63 function may be used to obtain a phase value that is always between 180 degrees This function always returns a result in degrees This has changed from versions 3 1 and earlier which returned in degrees or radians depending on the setting of the Degrees option For phase in radians use phase_rad page 297 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array phase Returns the phase of the argument in degrees Identical to ph page 296 Each of the functions ph page 296 phase and phase_rad page 297 produce a continuous output i e it does not wrap from 180 degrees to 180 degrees This function always returns a result in degrees This has changed from versions 3 1 and earlier which returned in degrees or radians depending on the setting of the Degrees option For phase in radians use phase_rad page 297 Arguments Number Type Compulsory Default Description
45. CopyFile CopyLocalSymbol CreateFont CreateGroup CreateRunningDialog CreateSym CreateToolBar CreateToolButton CursorMode Curve CurveEditCopy DefButton DefineToolBar DefKey DefMenu Del DelCrv Delete DeleteAxis DeleteGraphAnno DeleteSymbolProperty DelGroup DelLegendProp DelMenu Closes the current text editor Deletes temporary vectors Combines several menus into a separate menu Compares two symbol libraries Copy selected schematic components then paste Interactive Copy graph to clipboard to paste to other appli cations Copy schematic to clipboard to paste to other applications Copy a file Copy local symbol to global library Create a named font object Creates a data group Creates a dialog for displaying progress whilst a script is running Symbol definition Start definition Creates a new empty toolbar Creates or redefines a tool bar button Enable disable step graph cursors Create new curve in existing graph Copy specified curves to the internal clipboard Defines the command executed when a button is pressed Defines the action for a schematic button Define keyboard key Define fixed or popup menu item Delete file Delete curve Delete selected schematic items Delete specified y axis or grid Delete graph annotation object Delete property in symbol editor Delete group of simulation data Delete graph legend property Deletes specified menu item or submenu 416 SIMet
46. Creates a vector of consecutively increasing values from a minimum to maximum value using a given incremenet Eg MLVector 0 1 10 would give 0123456789 10 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Minimum value 2 real Yes Incremenet value 3 real Yes Maximum value Returns Return type real array A vector of values within the specified range with given increments Product SIMetrix and SIMetrix SIMPLIS Pro and Elite ModelLibsChanged Returns 1 if the installed model libraries have been changed since the last call to this function The function always returns 1 the first time it is called after program start Arguments No arguments Returns Return type real Navigate Returns path name of hierarchical block given root path and full component reference Arguments Number Type Compulsory Default Description 1 string Yes Full component reference 2 string Yes Path of hierarchical root Argument 1 Component reference of block This must be the full reference specifying the full path to the root For example the reference U3 U4 refers to a block of reference U4 found in the underlying schematic of a block of reference U3 in the root schematic 275 SIMetrix SIMPLIS Script Reference Manual Argument 2 File system pathname of root schematic Returns Return type string Returns path name of schematic hierarchical block Neares
47. Delay in seconds The function has a resolution of 100mS and so the delay will be integral multiples of that amount Returns Return type real Function returns the value of the argument Sort Performs alphanumeric sort on string array Arguments Number Type Compulsory Default Description 1 string Yes String data 2 string No Options Argument 1 String array to be sorted Argument 2 May be set to unique in which case any duplicates in argument 1 will be eliminated 359 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Result is string array containing the contents of argument 1 sorted in alphanumeric order SortIdx Sorts the items in argument 1 but instead of returning the actual sorted data the function returns the indexes of the sorted values into the original array The method of sorting depends on the data type as follows string Alphabetic real Numeric complex Numeric uses magnitude Arguments Number Type Compulsory Default Description 1 any array Yes Items to sort 2 string No forward Sort direction Argument 2 Sort option value either forward or reverse Returns Return type real array An array of indexes into the input array sorted by the method specified in argument 2 SourceDialog This is a special purpose function used to select a voltage or current signal source It opens a dialog box whose controls are initialise
48. Draw Arrow 2 2 2 A os e a A a E 471 Drake ltd llo ee do la Gas once Sts A aie erase sts e da 471 ECHO ioe he A eek eh aaa a Or ae ee ee Be a eR OE ah Ae Lae Aa 471 Edit olour 4 amp ats fe onto SS la do dee a IN ado EO ne a a a 472 EditCopy e 3 4 ka p etea peed ee eed be a ale oe Me DES a 472 Edit6Ut rpe Sethe eee doo ew eee dt Bete ee ee ak Ge e ee 473 Edit Eile an e Mata A e a un a ee eh ae E a dE aoa 473 Edit EON da ea A A A AA AS on eg 473 BditGroup Titles ia ee a 474 EditPaster lt 2d 2 da rr ee ete ti e e Ae eer 474 Edit amas A tity kt BM O O SEM O RA AA o sd dd do 474 BrdAllint ractions 4 20338 ww ea ee A OE AS SL 474 BndSyitivien ho sz A A eS A AAA ad 474 Execute irag 24 Gok aaa a he ade as ar e AA EE 475 SIMetrix SIMPLIS Script Reference Manual Contents ExecuteMent 2 204 4 2 a A a a EEE RAR OY aS 476 FileViewCleanUpFileWatchers a 476 FloodkillSymbol unio a a 4 Gg POE a a eed See DR ES a 476 FOCUS e re aoe Stig ARA EEE EAA CEE Oe 6 EGE Ge eee oe od 476 FocusCommand shell e oiran E a atc dot EA Ee eae 477 FocusShel oi a eS A AAA Pole ee a AA 477 GrapliZoomMod r mT fine eo Pee ee See pa aa aa ae A ae a aa ATT Grotipselected 2 2 20 seueuei a a aly es es ae Ge Ge ee bs A ia 477 Help a A E O ea 477 Hide CUE ai AAAA EE Aed A eb RE VR N G 478 Highlight urve 14 2 ste A be ee a a A A a aa 478 Highlight Widget vostra a p o ole a a a ee eh ee a a 479 Hit 22S eseened Adasen phe eA YA ES oe a eee ee
49. EditDigInit Dialog Opens a dialog box used to define a digital initial condition Arguments Number Type Compulsory Default Description 1 real array Yes initial setting Argument 1 The argument is a real array of length 2 which defines the initial settings of the dialog box as follows 1 Initial state i ONE O ZERO 1 Strong 2 Initial Strength O Resistive Returns Return type real array The function returns a real array of length 2 with the same format as argument 1 described above If the user selects Cancel the function returns an empty vector EditFreeTextDialog This function is almost identical to the EditCurveMarkerDialog page 108 functions except for some changes to the aesthetics of the dialog box Arguments Number Type Compulsory Default Description 1 string array Yes Property names 2 string array Yes Property values 3 string array No Property types Returns Return type string array EditGraphTextBoxDialog Opens a dialog intended for editing the characteristics of text box objects for graphs SIMetrix SIMPLIS Script Reference Manual The Properties sheet behaves in the same way as the EditObjectPropertiesDialog page 113 and is initialised by the function s arguments The Edit sheet shown above allows the edit and display of certain properties as defined in the following table Property Name Affects Control Label Label Colour Background Colour An integer defining th
50. Expression describing curve to be added to graph x expression Text string Expression describing x values of curve defined by y expression If omitted reference of y_ expression will be used CurveEditCopy CurveEditCopy curve id curve id Copy specified curves to the internal clipboard Curves so copied may be subsequently plotted using the command Curve on page 456 with the icb switch Parameters curve id Id of curve A number of functions return this value including Get SelectedCurves on page 207 See Also Curve on page 456 HavelnternalClipboardData on page 238 DefButton DefButton immediate comgroup command group button name command upCommand menu menu item title features features required for menu item Defines the command executed when a button is pressed 458 SIMetrix SIMPLIS Script Reference Manual Parameters comgroup This can be used with the function GetLastCommand page 187 GetLastCommand returns the text of the most recent command ex ecuted which specifed the supplied command group value The com mand DefMenu page 462 also uses this feature immediate If specified the command will be enabled for immediate execution That is the command will be executed immediately even if another command such as a simulation run is currently in progress This will only be accepted when the command specified is one of a small number of built in command e
51. GetCurveName Returns name of specified curve Arguments Number Type Compulsory Default Description 1 Integer Yes ID of the curve Returns Return type string Returns name of specified curve GetCurves Returns curve names in selected graph Arguments No arguments Returns Return type string array Returns an array of curve names as displayed on the graph legend for the current graph GetCurveVector Returns the data for a curve For a single curve i e not a group of curves as created from a Monte Carlo plot only the first argument is required and this specifies the curve s id If the curve id refers to a group of curves created by a multi step run then the second argument may be used to identify a single curve within the group The data for the complete curve set is arranged as a Multi Division Vector on page 19 The second argument specifies the division index If absent the entire vector is returned Note that the arguments to this function for version 4 and later have changed from earlier versions The function cv page 82 is identical to this function and is convenient in situations where a short expression is desirable 163 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes curve id 2 real No Return all divisions Division index 3 string No Obsolete no longer used Returns Return type real array GetDatumCurv
52. HavelnternalClipboardData Hierarchy Highlighting HighlightedNets Returns the execution times for each device thread for the most recent simulation Returns information about a timer object Returns information about the selected schematic title block Returns name and description for available tool buttons Returns UNC path of specified path Returns path name of user specified file Super sedes GetFile page 172 GetFileCD page 172 and GetFileSave page 175 Returns parameter name associated with vector Returns parameter values associated with vector Returns info about open views Returns names of current SIMetrix windows Returns the id of the x axis in the currently se lected graph Opens Graph Image Capture dialog Returns x and y limits of selected graph Returns group delay of argument Returns array of available groups Returns whether a GUI is enabled Returns a hash value for the supplied string Add items to a hash table Create a hash table Delete a hash table Search hash table for an item Determines whether the supplied vector is loga rithmically spaced Determines whether a particular instance pos sesses a specified property Detrmines whether a specified license feature is available Returns the number of items in the specified in ternal clipboard Returns names for any wholly highlighted net names on the specified schematic SIMetrix SIMPLIS Script Reference Manual Function Name
53. If the script was called from another script the directory where the calling script was located is searched instead Scripts can also be executed using the Execute command on page 475 Script Arguments You can pass data to and from scripts using arguments Passing by Value To pass a value to a script simply place it after the script name E g my_script 10 The value 10 will be passed to the script There are two methods of retrieving this value within the script The easiest is to use the Arguments page 444 command In the script you would place a line like Arguments num In the above the variable num would be assigned the value 10 If the Arguments command is used it becomes compulsory to pass the argument If you wish to provide a script with optional arguments you must use the arg variables When an argument is passed to a script a variable with name argn is assigned with the value where n is the position of the argument on the command line starting at 1 To find out if the argument has been passed use the Exist Vec page 138 function E g if ExistVec argi then action if arg 1 passed else action if arg 1 not passed endif Passing by Reference When an argument is passed by value the script in effect obtains a local copy of that data If it subsequently modifies it the original data in the calling script remains unchanged even if a variable name was used as the argument The alternative is to pass
54. IffV If the first argument evaluates to TRUE i e non zero the function will return the value of argument 2 Otherwise it will return the value of argument 3 Note that the type of arguments 2 and 3 must both be the same No implicit type conversion will be performed on these arguments This function performs the same operation as Iff page 240 but also works with vectors whereas Iff only works with scalar values All three arguments may be vectors but the lengths must satisfy the following conditions Argument 2 true value must be the same length as argument 3 false value Argument 1 test must either be the same length as arguments 2 and 3 or must have a length of 1 If the test has a length greater than 1 then each element of the test is tested to select the corre sponding element in the true and false vectors If the length of the test is 1 then this value is used to select the entire vector either the true value or false value The return value includes the reference value copied from argument 2 To be useful this assumes that the references of arguments 2 and 3 are the same This would usually be the case in most applications but the function does not test this Arguments Number Type Compulsory Default Description 1 real Yes Test 2 real complex string Yes true value 3 real complex string Yes false value Returns Return type Matches arguments 2 and 3 must be the same IIR Performs Infinite Impulse Respon
55. InitRandom Initialises the random number generator used for SIMPLIS Monte Carlo distribution functions A seed value can be specified allowing the generator to be reset to a known state This will allow a Monte Carlo run to be repeated to give identical results 243 SIMetrix SIMPLIS Script Reference Manual This function resets the random number generator used for functions Unif page 388 Gauss page 146 GaussTrunc page 148 GaussLim page 147 Distribution page 102 UD page 387 and WC page 396 These functions can only be used for evaluating expressions in a netlist processed by the pre processor This applies to value expressions used for components in SIMPLIS simulations Arguments Number Type Compulsory Default Description 1 real No seed randomly generated seed value Returns Return type real seed used to initialise generator Example InputGraph Opens a simple dialog box prompting the user for input Dialog box position is chosen to keep selected graph visible if possible Argument provides initial text return value is text entered by user The function returns an empty vector if the user cancels the dialog box Arguments Number Type Compulsory Default Description 1 string No Initial text 2 string No empty Message Returns Return type string InputSchem Opens a simple dialog box prompting the user for input Dialog box position is chosen to keep selected schematic visible if
56. Range re ReadClipboard ReadConfigCollection ReadConfigSetting Detects if the current script was called by a GUI action UI function opens progress bar Returns the attribute flags of a schematic prop erty Returns the attribute flags of a schematic prop erty Returns selected property flags for all selected el ements with optional filtering Returns selected property flags for all selected an notations with optional filtering Returns selected property flags for all selected wires with optional filtering Returns override style of selected property Returns value of specified property for selected instance Returns array of property values As PropValues but with rearranged arguments Returns selected property values for all selected elements with optional filtering Returns selected property values for all selected annotations with optional filtering Returns selected property values for all selected wires with optional filtering Write an environment variable Opens a dialog box designed for editing piece wise linear sources Filters a list of data items according to search criteria User interface function Returns user selection of up to 5 radio buttons Returns range of vector accepts real complex and string Returns real part of argument Returns text contents of the windows clipboard Returns the contents of an entire section in the configuration file Reads a configuration setting SIMet
57. Returns handles to selected wires on schematic UI function opens select font dialog Analyses an array of character delimited strings and returns selected values Opens SIMPLIS choose analysis dialog box Opens a dialog box allowing the user to select a schematic symbol from the symbol library Returns id of selected graph Returns TRUE if at least one schematic is open Special function to set or get a component value or parameter Set an instance parameter during a script based multi step analysis Set a model parameter during a script based multi step analysis Sets styles as property styles Sets read only writeable status of specified schematic Runs an external program and returns its exit code Performs an operation on a windows registered file Returns sign of argument SIMetrix SIMPLIS Script Reference Manual Function Name Description SimetrixFileInfo SIMPLISRunStatus SIMPLISSearchIdx SimulationHasErrors sin sin_deg sinh Sleep Sort SortIdx SourceDialog SplitPath SplitString Sprintf Number sqrt Str StringLength StringStartsWith StrStr StyleInfo StyleLineTypes StyleNames SubstChar SubstString sum SumNoise SupportedReadFormats Returns information about a SIMetrix file Tests if a SIMPLIS simulation is running Searches input string array for a test string re turning the indices into input array array where the test string matches Determines success of mos
58. SIMetrix SIMPLIS Script Reference Manual Hide Show the schematic s text window also known as the F11 Window for entering simulator controls Using TextWin toggle will hide the text window if it is currently visible and vice versa Title Title schem graph title Changes a window s title Parameters schem Apply to selected schematic window graph Apply to selected graph window title New window title Notes The title is displayed in the window s caption bar and is also placed at the bottom of printed graphs and schematics TitleSchem TitleSchem title Sets the title of the current schematic Parameters title The new title for the schematic Trace Trace signal name trace id The trace command is used to set up a simulation trace while a simulation is running To set up a trace before a simulation is started use the TRACE or GRAPH simulator controls Parameters signal name Net name or pin name for voltage or current to be traced trave id Integer value used to group traces together on the same graph All traces with the same trace id will go to the same graph SIMetrix SIMPLIS Script Reference Manual Notes Traces set up with this command only remain in effect until the end of the simulation A Trace command executed before a simulation starts will have no effect UndoGraphZoom UndoGraphZoom Restores previous graph view area Successive execution of this command will retrace the ent
59. The function returns the value of the last argument supplied 134 SIMetrix SIMPLIS Script Reference Manual Notes The purpose of this function is to allow the evaluation of intermediate variables withing a single expression This is useful when the expression is in a schematic or graph template for example where there is only the facility available to enter a single expression For example ev x 3 x x returns 9 The first argument is evaluated and assigns 3 to x The second argument is then evaluated using the value of x assigned in argument 1 In a script it would be more conventional to use the Let command to assign x But if the expression was used in a template property there is no facility to execute commands so this would not be possible Execute Function calls the script defined in arg 1 and passes it the arguments supplied in arg 2 8 The function s returned value is the script s first argument passed by reference The Execute function is used internally to implement user functions that are registered with the Register UserFunction command See User Defined Script Based Functions on page 581 Arguments Number Type Compulsory Default Description 1 string Yes Script name 2 any No Script argument 1 3 any No Upto 8 args in total Argument 3 Script args 2 7 Returns Return type Depends on called script ExistCommand Test if a script command is a valid command Arguments Num
60. The second element specifies the mode If 0 FALSE then the function uses the fixed number of points mode and argument 2 provides the number of points If 1 TRUE the mode is fixed interval mode and argument 2 specifies the interval The first element is only used with fixed number of points mode If TRUE the final point of the interpolated result will coincide with the final point of the input vector and the interval between points is T N 1 where T is the interval of the whole input vector and N is the number of points If FALSE the interval is T N and the final point is at a location T N before the final input point The latter behaviour is compatible with earlier versions and is also what should be used if the function is interpolating data to be used by the FFT function Returns Return type real array Returns the interpolated data 251 SIMetrix SIMPLIS Script Reference Manual Notes The Interp function overcomes some of the problems caused by the fact that raw transient analysis results are unevenly spaced It is used by the FFT plotting scripts to provide evenly spaced sample points for the function fft page 139 IsComplex Returns 1 TRUE if the supplied argument is complex and 0 FALSE if the argument is any other type Arguments Number Type Compulsory Default Description 1 any Yes Vector Returns Return type real IsComponent Determines whether a schematic instance is a hierarchical component Sche
61. This function is intended to be used for SIMPLIS Monte Carlo analyses and would typically be used in device value expressions This function is only available in the Simulator process and cannot be called from scripts running in the context of the front end The function is only active when used by the netlist pre processor with Monte Carlo analysis enabled When used in other contexts the function returns 1 0 146 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Tolerance 3 sigma spread Returns Return type real Random number with a Gaussian distribution of mean 1 0 and standard deviation of tolerance 3 where tolerance is the value supplied to argument 1 Returns 1 0 when used in non Monte Carlo contexts Example 1k Gauss 0 1 will return 1000 10 with a 3 sigma spread Returns 1 0 in a non Monte Carlo run Notes The function can return values outside the tolerance range For example Gauss 0 1 can return values greater than 1 1 and less than 0 9 which would violate the tolerance specification for many components Use the GaussTrunc page 148 function to get a distribution that does not extend beyond the tolerance range See Also Unif page 388 Gauss Trunc page 148 Distribution page 102 also alias UD page 387 WC page 396 GaussLim Arguments Number Type Compulsory Default Description 1 real Yes Tolerance 2 real No 3 sigma
62. Vectors created by other means may be assigned a reference using the SetRef command on page 536 Also the XY page 412 function may be used to compose a vector containing a reference Physical Type Simulation vectors also usually have a physical type This identifies the values units e g Volts or Amps When evaluating expressions SIMetrix attempts to resolve the physical type of the result SIMetrix SIMPLIS Script Reference Manual For example if a voltage is multiplied by a current SIMetrix will assign the Physical Type Watts to the result Any vector can be assigned a physical type using the SetUnits command on page 537 User Interface to Scripts Dialog Boxes A number of functions are available which provide means of obtaining user input through dialog boxes These are Function name Comment AddRemoveDialog page 60 Add or remove items to or from a list BoolSelect page 65 Up to 6 check boxes ChooseDir page 68 Select a directory EditObjectPropertiesDialog page 113 Read Edit a list of property names and values EditSelect page 121 Up to 6 edit boxes EnterTextDialog page 131 Enter multi line text GetSimetrixFile page 209 Get file name of pre defined type GetUserFile page 227 Get file name general purpose InputGraph page 244 Input text for graph InputSchem page 244 Input text for schematic NewValueDialog page 279 General purpose dialog box RadioSelect page 319 Up to 6 radio button
63. containers You may need to use the spacer widget available from the toolbar to provide empty spaces Some widgets e g buttons resize to fill the space available and this is not always desirable Further documentation on the Designer tool can be found at the developer s web site http doc trolltech com The version currently in use is 3 3 See under Tools the SIMetrix dialog designer is based on Qt Designer Examples A number of trivial examples are supplied that demonstrate each of the widgets These are supplied in the examples directory under scripts dialogs To use them you must copy them to the support dialogs folder Windows or usr local share dialogs folder Linux Here is a list Edit Dialog Simple dialog with an edit box and an Ok button Type Show EditDialog a4AYInitial message AZ to see what it does SIMetrix SIMPLIS Script Reference Manual TestCombo Demo of combo box try this Show TestCombo bill fredlbil1ljohn TestFunction A spinner and a check box Try Show TestFunction 4AY2 3453AZ aAY14AZ ListBoxFunction A list box and a check box Try this ow listboxfunction 0 5 5 re 1 ohn Sh listboxf i C j hn 1 E dlbil1 joh TextEditTest TextEdit and two push buttons one of them with toggle action Try this Show textedittest A message JohnsModelDialog Bits and pieces Try this Show johnsmodeldialog bill 2 345 4 567 1 fred bill
64. digital filtering on supplied vector This function performs the operation Yn Tn Co Tn 1 C1 Xn Q Cot Where x is the input vector argument 1 c is the coefficient vector argument 2 y is the result returned value The third argument provide the history of x i e 1 1 1 2 etc as required Below is the simple case of a four sample rolling average In principle an almost unlimited range of FIR filtering operations may be performed using this function A text on Digital Signal Processing will provide further details User s should note that using this function applied to raw transient analysis data will not produce meaningful results as the values are unevenly spaced If you apply this function to simulation data you must either specify that the simulator outputs at fixed intervals select the Output at PRINT SIMetrix SIMPLIS Script Reference Manual step option in the Simulator Choose Analysis dialog box or you must interpolate the results using the Interp page 251 function Arguments Number Type Compulsory Default Description 1 real array Yes vector to be filtered 2 real array Yes filter coefficients 3 real array No All zero initial conditions Returns Return type real array Example Suppose a vector VOUT exist in the current group simulation results The following will plot VOUT with a 4 sample rolling average applied Plot FIR vout 0 25 0 25 0 25 0 25 Alternatively the foll
65. ment Returns a new analysis spec that may be passed to a netlist Arguments Number Type Compulsory Default Description 1 string Yes Analysis spec Argument 1 Analysis spec as it would appear in a netlist or the F11 window E g lines beginning with TRAN AC DC etc 288 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array String array of length 2 Element 0 contains the new analysis spec Note individual simulator controls are separated by new line characters Element 1 identifies how the user closed the dialog box as defined below Run button 2 Cancel button 1 OK button 0 ParseLaplace Parses a Laplace expression to return array of denominator and numerator coefficients Arguments Number Type Compulsory Default Description 1 string Yes Laplace expression Argument 1 Expression in s variable defining a Laplace transfer function Refer to the User s Manual Parts Generic Parts Laplace Transfer Function for a detailed explanation Returns Return type real array real array as follows Index Description 0 Status code 0 means success Use GetLaplaceErrorMessage page 187 to convert this to an error messgae 1 denominator order 2 numerator order 3 to 3 den order denominator coefficients lowest order first 3 den order 1 to numerator coefficients lowest order first 3 den order 1 num order 289 SIMetrix SIMPLIS Script R
66. page 531 are marked internally as migrateable meaning that their values are transferred to a new version installation if the user requests that configuration settings are to be migrated Arguments Number Type Compulsory Default Description 1 string Yes Option name Returns Return type real Return 1 0 if the option name is migrateable otherwise returns 0 0 IsSameFile Compares two paths and returns true 1 if they point to the same file The function takes account of the fact that the two arguments might try to access the same file by different methods For example on Windows one file might use a drive letter while the other might use a server path The function will always return true if the path names are identical even if the target does not exist Arguments Number Type Compulsory Default Description 1 string Yes Path of file 1 2 string Yes Path of file 2 Returns Return type real Returns 1 if the paths are the same 0 otherwise 255 SIMetrix SIMPLIS Script Reference Manual IsScript Function to determine whether the supplied script name can be located Calling this script will fail if this function returns FALSE Note that the function doesn t check the script itself It only determines whether or not it exists Arguments Number Type Compulsory Default Description 1 string Yes Script name Returns Return type real Returns TRUE if the supplied script name can be located i
67. property value Property value used to identify instances to process If omitted but property name is specified all instances with property name will be processed UpdateRunningDialog UpdateRunningDialog status Updates a process running dialog by one step Also allows for the status message to be udpated See Also CreateRunningDialog on page 453 DestroyRunningDialog on page 469 UpdateStyleInfo UpdateStyleInfo style info Updates the style information for a schematic Input argument is a list of strings each line defines a style in Name Line Type Line Thickness LineColour Parameters fromScriptDefinitionSet this if definitions come straight from a script fixes problem with around font name missing hierarchy style info A list of string defining each style per string UpdateSymbol UpdateSymbol symbol name Updates symbols on currently selected schematic from global symbol library Schematics store local copies of any symbols that it uses If the copy of that symbol in the global library is modified the schematics own copy is unaffected This command causes the specified symbol to be updated from global library See How Symbols are Stored on page 567 Parameters symbol name Name of the symbol to be updated 548 SIMetrix SIMPLIS Script Reference Manual UpdateSystemStyleInfo UpdateSystemStyleInfo style info Updates the style information for a schematic at the system level The
68. the groups data is stored in RAM this element will hold an empty string 1 Group title For groups created by a simulation which is to say virtually all groups this is obtained from the netlist title 2 Empty reserved for future use Get GroupStepParameter Returns the names of the stepped parameters of a multi step run These values are stored within the group created for the simulation run s output data The stepped parameters are labels that identify the parameters devices model parameters or other quantities that are varied during a multi step run Arguments Number Type Compulsory Default Description 1 string No Current group Group name Returns Return type string array GetGroupStep Vals Returns the stepped values in a multi step run These values are stored within the group created for the simulation run s output data The stepped values are the values assigned to the stepped parameters see the function GetGroupStepParameter page 182 during a multi step run If there is more than one stepped parameter the second argument may be used to identify for which parameter the values are returned Arguments Number Type Compulsory Default Description 1 string No Current group Group name 2 real No 0 index Argument 2 Identifies parameter when there is more than one 182 SIMetrix SIMPLIS Script Reference Manual Returns Return type real array Get Highlighted WidgetId Retur
69. 0 Device name 1 Model name as used in the MODEL statement E g npn nmos etc Level parameter value Minimum number of terminals Maximum number of terminals Device letter E g Q for BJTs D for diodes oF Ww N Example Get AllSymbolPropertyNames Returns a string array containing the names of all the properties on the symbol currently open in the symbol editor Arguments Number Type Compulsory Default Description 1 string No Options Argument 1 Options Currently there is only one which is nopins If not present the function will return all properties including the internally generated properties used to display pin names These are of the form Pin pinname If nopins is specified these properties will not be returned by the function Returns Return type string array GetAllYAxes Returns an array listing all y axis id s for currently selected graph All graph axes have a unique id which may be used with some other commands and functions Arguments No arguments Returns Return type string array 151 SIMetrix SIMPLIS Script Reference Manual Get AnalysisInfo Returns the parameters of the most recent analysis performed by the simulator The parameters are returned in the form of a string array If argument 1 is set to name the function will return the names of each parameter The following sample shows how to obtain a the stop time of a transient analysis le
70. 2 1 Number of turns winding 1 Number of turns winding 2 Coupling coefficient winding 1 2 Number of turns winding 3 Coupling factor winding 1 3 Coupling factor winding 2 3 380 SIMetrix SIMPLIS Script Reference Manual TranslateLogicalPath Converts symbolic path to a physical path Arguments Number Type Compulsory Default Description 1 string Yes Symbolic path Argument 1 Symbolic path as described in User s Manual Sundry Topics Symbolic Path Names Returns Return type string Returns actual file system path TreeList Dialog Opens the following dialog box allowing the user to specify an item in tree structured list Ex 3db low pass band pass El Transient Measurements Fall time Rise time Cancel bh Arguments Number Type Compulsory Default Description 1 string array Yes strings 2 string array No Select Item 0 Options sort false SIMetrix SIMPLIS Script Reference Manual Argument 1 Specifies the items to be displayed in the tree list These are arranged in semi colon delimited fields with each field specifying a branch of the tree For example in the above diagram the item shown as Full would be specified as an element of argument 1 as Measure Transient RMS Full Argument 2 An array of strings of max length 5 specifying various other characteristics as defined below Dialog caption Identifie
71. All menu definitions may have shortcuts specified using the shortcut switch for the DefMenu page 462 command A potential problem arises if the same key is used for a shortcut and a key definition using DefKey page 460 If this happens the DefKey definition takes precedence Editing Schematic Component Values When you press F7 or select the schematic popup menu Edit Value Model the internal script value is called value is a complicated script that identifies the type of component that is selected and performs an action appropriate for it However the first thing this script does is find out if the component or components selected have a valuescript property If it does then that script is called This feature is used by all types of component developed since release 3 but some older devices are handled differently If you wish to modify the behaviour for a particular component type when F7 is pressed first check to see if it has a valuescript property If it has you can edit the script that it calls or change the property s value to call a different one If it hasn t you can add such a property and provide a script for it There are two other properties associated with component values These are incscript and dec script These increment and decrement a components value when the shift up and shift down keys are pressed Currently only the resistors capacitor inductor and potentiometer symbols use this property but you can
72. Contents TitleSchem 3 4 4 4 4 dey Wea ear A a A ey a 543 Traces 20 a Se Ee ete Et da de dea ess Be Sc ee a a A RE a a an 543 UndoGraphZooni A aaa bb na Oe meee dee ede dh Oe BEST GG 544 Ungtoupselect eds oiva g a eA ERS ee aw ee ee ee lee ad 544 UnHighheht Curves tage ed ee A a Mae rca a RT ee a 544 Wine tir 2h eae A ye eases So da Uh Oh By REAR Pee cen con Sap ga od oa ae 544 Wnprotect amp e s2 SS eee eS Sia A te ine SS et ee A ee 545 Wnselect 6 2 2 2 a 0 a of aaa id Aa Rae Red 545 US a Me NS tet ak Betas AD A te AeA ME Mak he oct oo SA Ak A dod 545 Update AllSymbols ooo de a a AA A aa 546 UpdateAnnotationText o aaa ee 546 UpdateDefanltStyle e areren n a a a ee ek ee el a 546 UpdateGlobalStyle i ae dod cir e LE we ee E E a ae oe ae A A 547 UpdateProperties 2 4 n nanag O SE a eet AA cd 547 UpdateRunningDialog 2 ataca tete a deed eee RR OB OE OEE eee a 548 UpdateStyleInto redada ghd hb bb a da ele lela bd eed 548 UpdateSymbol budista a ass oy GG ee a bs eR nyse Se 548 UpdateSystemStyleInfo aaa eee 549 Update TitleBlock sn seme eee Se SSH a e di He ee EEE EES ee 549 Miew Hale be 3 en AI RAS ok Haat ADA Bhs es caves Bee ete 549 WebO pent 2 2 onlin ga dedede e Set dt 2 E ee a A ek Be 550 Wieners s fiers uw ee eee PEM AE Ee Ba oe ole oe ata ae 550 WireMod is i 4 a bee elie gla a WR ee BE at ALA i EO he eon 550 WM_CloseAllSystemWidgets 0 ee 550 WM_CloseNonPrimaryWindows 0 000
73. Description TreeListDialog True Truncate TwoFileSelectionDialog UD Unif Units unitvec UpDownDialog UserParametersDialog Val ValueDialog Vec vector VectorsInGroup VersionInfo ViewFormatted Text WC WirePoints Wires WM_ _CanRevertToSaved WM_GetCentralWidgetGeometry WM_GetContentWidgetNames WM_GetContentWidgetSessionInfo General purpose Ul function Open dialog box with tree list control Returns 1 if vector exists and is nonzero Returns vector that is a sub range of supplied vector General purpose file dialog with two file entries and an option third description entry Alias of Distribution page 102 Returns random number with uniform distribu tion Returns physical units of argument Returns vector of specified length whose elements are all 1 General purpose UI function Opens dialog with up down list to allow rearranging order UI function opens dialog allowing editing of user parameter values Converts argument to value User interface function Opens dialog with up to 10 boxes for entering numeric values Return array of user selected values Returns data for named vector Allows access to vectors with invalid names Returns vector of specified length with each ele ment equal to its index Returns array of variable names belonging to specified group Returns version information about running copy of SIMetrix View HTML formatted text Returns rando
74. GU AE AA a aa aa aA ai 491 NewBasicTextEditor ama a a ed tr 491 NewFuileView 2 4 fonds a a bb A ee 491 NewGraphWindow e arenei nen a de elle ide dd toe Sharan hee Gener eZ 492 NewGrid i ra a a ER sah ah ah A a er ar ear A de Se SR ht IS A 492 Newlhabel 4 405 ae ties pried eee eS Oe eee en hee AA eek eee eG 492 NewLogicDefinitionEditor 0 000 0000 0000000005 493 NewNetlist 3 44 220544 does eee be diab dt A ab eee ee ee ele 493 NewPartSelector os sd a AO a e etre AE ee oe 493 NewPrinterPage is e ote ee Ee a Ss a G 493 Newoch m aa rora tiie eee ee eth A ee ee eee ee ee 494 Newscript lt 22 24 hs tsuneo ae ee eee a bb Ae ee eee ee 494 Newer ar A A de E Sort AEM Mk the dhe oot Se A at titi ee a 494 Newoymbol s 2 4 4 4 4 pages wats arr et Pa a ae are EA ee 495 New Verilog Ans ee 2 oh SEMA REESE Sa ARA ee ES eee 495 NewVerilogHDL cuota bbb ee ew Ee dee boo eA a de ee ea a 495 SIMetrix SIMPLIS Script Reference Manual Contents NoPaint a t 4 2 a 4 4 4 play Dima eo a Ai Ne E 496 NoWndos acn 4 amp ate te pani oe da dn e a ee he ot a SG a ta Da de are 496 OpenAsctiFile 2 scs stesceesicn ts oh We OE ou a dae deb bb Ai A ek ee BS la 496 OpenBasicTextEditor A ee 497 OpenDir ctory li ep ete ae A Be tee EE Ee De 497 OpenExternalPile 20 6 owe ERR EA RG oe ee eb as 498 OpenGraphle ls sum 2 a ee ee ae ee ae Es Sie pa pa ee A e a 498 OpenGrouprd Tia dey eke Pee we ala we ri e A EE a 498 OpenLogicDefinitionEdi
75. In other places it is an assignment operator and must be used for equality Logical AND OR NOT amp amp Note AND OR NOT are equivalent to amp amp respectively String amp amp concatenates two strings Operator Precedence When calculating an expression like 3 4 5 the 4 is multiplied by 5 first then added to 3 The multiplication operator is said to have higher precedence then the addition operator r The following lists all the operators in order of precedence CJ E Unary NOT h Notes 1 A single is interpreted as meaning equality when used in if statements and while statements and has the same precedence 2 Parentheses have the highest precedence and are used in their traditional role to change order of evaluation So 3 4 5 is 35 whereas 3 4 5 is 23 3 The comma is used as a separator and so has the lowest precedence SIMetrix SIMPLIS Script Reference Manual Functions Functions are central to SIMetrix scripts All functions return a value and take zero or more arguments The sqrt page 362 function for example takes a single argument and returns its square root So Let x sqrt 16 will assign 4 to x Functions are of the form function_name argument Examples Function taking no arguments NetName function taking two arguments FFT vout Hanning Functions don t just perfo
76. It is reproduced here for convenience Pp SIMetrix provides the capability to export simulation data to a file in text form and also to import data from a file in text form This makes it possible to process simulation data using another application such as a spreadsheet or custom program Importing Data To import data use the OpenGroup page 498 command with the text switch E g at the command line type OpenGroup text data txt This will read in the file data txt and create a new group called textn where n is an index as described in Data Files Text Format on page 568 below for details of format Note that if you create the file using another program such as a spreadsheet the above command may fail if the file is still open in the other application Closing the file in the other application will resolve this 567 SIMetrix SIMPLIS Script Reference Manual Exporting Data To export data use the Show page 539 command with the file switch E g Show file data txt vout ri_p ql c will output to data txt the vectors vout r1_p and qi c The values will be output in a form compatible with OpenGroup text Vector Names In the above example the vector names are vout r1_p and qi c If you simulate a schematic the names used for voltage signals are the same as the node names in the netlist which in turn are assigned by the schematic s netlist generator To find out what these names are place the mouse cursor on the nod
77. Manage Data Groups menu which uses DelGroup simplis spice2 If specified filename will be read in as a SPICE2 raw file as generated by SPICE2g 6 This is an unsupported feature spice3 If specified filename will be read in as a SPICE3 raw file Open Group will readin the whole file into RAM This may be inappropriate if the file is large The command OpenRawFile page 501 is usually a better choise for reading SPICES raw files as this rewrites the data to a native data file for access on demand text If specified data file is assumed to be in text format Otherwise the file is input as a SIMetrix binary data file as saved by the SaveGroup command See Data Files Text Format on page 568 for full details on the text format filename Name of file to be input If not specified an open file dialog box will be opened allowing the user to choose from available files See Also CreateGroup page 452 DelGroup page 467 SaveGroup page 524 Groups page 233 OpenLogicDefinitionEditor OpenLogicDefinitionEditor filename Opens a logic definition file for the arbitrary logic device in the text editor This will apply syntax highlighting for the logic definition language Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto filename Path of logic definition file to open See Also OpenNetlist on page 500 to open a mod
78. Manual Arguments Number Type Compulsory Default Description 1 string Yes File name 2 string Yes Access mode Argument 1 File name Argument 2 A single letter to determine how the file is opened Can be either w or a If w a new file will be created If a file of that name already exists it will be overwritten If a and the file already exists it will be appended Returns Return type real OpenFile Opens a file and returns its handle This may be used by the command Echo page 471 Use the function CloseFile page 70 to close the file Arguments Number Type Compulsory Default Description 1 string Yes File path 2 string Yes File open mode Argument 1 Path of file to open Argument 2 Open mode May be w or wa w opens file for writing and clears the file if it already exists wa opens the file for append that is it will append any output to the file if that file already exists Returns Return type real 283 SIMetrix SIMPLIS Script Reference Manual OpenPDFPrinter Sets up printing for PDF output Arguments Number Type Compulsory Default Description 1 String Yes Filename Returns Return type String Success or Failed message OpenPrinter Starts a print session This may be used for customised or non interactive printing See Non interactive and Customised Printing on page 582 Arguments Number Type Compu
79. MoveProperty command it and all other visible properties on that symbol are converted to Absolute locations This is the only way that the positions of all properties can be preserved Netlist Netlist num subckt nopinnames noOutput template sep diag top plain lang wireTemplate dotEnd noDescend f11Top simplis nodemap filename Generates a netlist for the currently selected schematic The netlist command also assigns names to schematic nets If the schematic contains hierarchical blocks their underlying schematics will also be netlisted and included in the main netlist as subcircuits Parameters diag If specified a diagnostic report will be produced This details Im plicit node connections using terminal symbol Bus name translations These occur if two buses with different names are connected Dangling wires and unused device pins If the diag is set to partial only dangling wires and pins are reported dotEnd Forces END to be placed at the end of the netlist f11Top The contents of the F11 window are placed before the netlist lines generated by the schematic Otherwise they are placed after the schematic netlist lines lang Name of language to be output at the top of the netlist output This is in the form language and is used by SIMetrix for compatibility with other simulators Default is SIMETRIX nodemap Generates SIMPLIS NODE_ MAP controls for user
80. No Initial values Argument 1 String array providing initial values for the various controls The order is IF IRM dIf dt Tr Vdl Id1 Vd2 Id2 CjO Save option Device name The Save option will be 0 if Save to schematic symbol is specified and 1 if Save to model library is specified Returns Return type string array String array corresponding exactly to argument 1 and holding the user s selected values Return value will be empty if the user cancels the box SIMetrix SIMPLIS Script Reference Manual CreateLockFile Creates or removes a lock file for the filename specified This can be used to synchronise operations between multiple instances of SIMetrix Arguments Number Type Compulsory Default Description 1 string Yes filename 2 string Yes operation Argument 1 Filename to lock The lock file created will have the same name with the suffix lck The lock file itself will be locked for write and other applications will not be able to delete or write to the file Argument 2 One or two element string array First element is the operation to be performed This is either lock or unlock If lock is specified an attempt will be made to create a lock file The operation will fail if the file has already been locked perhaps by another instance of SIMetrix If unlock is specified the file will be remove
81. PARAM value in latest simulation run Determines the type of drive or file system of the specified path Returns the actual file name used for an embed ded file specified using FILE and ENDF Return specified system environment variable Returns information about the installed Ethernet adapters Returns the contents of the schematic s text win dow also known as the F11 window SIMetrix SIMPLIS Script Reference Manual Function Name Description GetFile GetFileCD GetFileDir GetFileExtensions GetFileInfo GetFileSave GetFileVersionStamp GetFileViewerSelectedFiles GetFirstSelectedElementOf Type GetFonts GetFontSpec GetFreeDiskSpace GetGraphObjects GetGraphObjPropNames GetGraphObjPropValue GetGraphObjPropValues GetGraphTabs GetGraphTitle GetGroupInfo GetGroupStepParameter GetGroupStep Vals Get Highlighted WidgetId GetHostId GetInstanceParamValues GetInstancePinLocs GetInstsAtPoint GetInternalDeviceName GetKeyDefs User interface function Returns user selected file name User interface function As GetFile but changes directory Get the directory where the specified file is lo cated Returns file extensions for specified SIMetrix file type Returns information about a specified file User interface function Returns user selected file name for saving Returns file version stamp Returns file names of selected files in the File Views Returns handle of fi
82. R5 to 12k Unselect Select prop Ref R5 Prop value 12k 559 SIMetrix SIMPLIS Script Reference Manual The second line says select the component with a Ref property of R5 The third line says change the value property of the selected component s to 12k You use the same basic method to edit a stimulus The following sets V1 to be a pulse source with OV start 5V end zero delay 10nS rise and fall times 1145 pulse width and 2 5uS period Unselect Select prop Ref V1 Prop value Pulse 0 5 O 10n 10n 1u 2 5u Note the quotation marks You must ensure that you re netlist the circuit before running the simulation Circuit Parameters Rather than edit the schematic and re netlist an alternative is to specify the component values as parameters then vary the parameter using the Let command To do this you must first edit the value of the components to be varied so that they are represented as a parameter expression enclosed by curly braces and P Again we will use the example of a resistor R5 whose value we wish to set to 12K Proceed as follows 1 Select R5 then press shift F7 Enter R5 as the new value 2 Now in the script you can set the value of R5 with Let e g Let global R5 12k The global prefix is necessary to make the parameter global Note we have named the parameter R5 This is an obvious choice of parameter name but you could use anything as long as it starts with a letter and consists of let
83. Real will be returned Complex values string values and aliases values will be excluded 394 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string No Current group group name 2 string array No Options Returns Return type string array VersionInfo Returns version information about running copy of SIMetrix Arguments No arguments Returns Return type string array Returns a string array of length 7 defined as follows Rh Ro Product name E g SIMetrix SIMPLIS Elite with DVM Major Version number 3 1 4 0 etc Maintenance version empty or a single letter Internal product name E g SIMPLIS Elite Feature string allowing script to determine available functionality This will be a combination of the following separated by the character Basic Always present AD Digital simulator enabled Micron CMOS device models enabled Schematic Schematic enabled Advanced Advanced analysis modes enabled Scripts Scripting enabled Rtn Real time noise enabled Simplis_If SIMPLIS simulator interface present Full version string usually element 1 and 2 concatenated Base product name Architecture either x86 32 bit or x64 64 bit This is the architecture of the program not the operating system on which it is running SIMetrix SIMPLIS Script Reference Manual ViewFormatted Text View HTML formatted text The viewer supports ba
84. Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Schematic file path Returns Return type string array Version information about the file type Index Description 0 Binary or ASCII file 1 Format version 2 Format revision GetSchematicTabs Returns IDs for all open schematics The ID is an integer value that uniquely identifies a schematic and may be used by a number of commands and functions to perform operations on a schematic For more information refer to the OpenSchematic page 286 function Arguments No arguments Returns Return type real array See Also GetOpenSchematics page 201 returns the corresponding paths of open schematics OpenSchematic page 286 for more information on schematic IDs GetSchematicVersion Returns version information for the currently selected schematic Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID 205 SIMetrix SIMPLIS Script Reference Manual Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns an array of length 3 with each element defined in the following table Index Description 0 Format version This will be an integer defining the f
85. Returns string array containing all device parameter names for the specified simulator model type Arguments Number Type Compulsory Default Description 1 string Yes Device type 2 real No 1 Level 3 string array No Options Argument 1 Device type specified using its SPICE letter e g Q for a BJT M for a MOSFET etc Argument 2 Model level if relevant If omitted or set to 1 the default level for that type of device will be used 166 SIMetrix SIMPLIS Script Reference Manual Argument 3 String array of length up to 2 May contain one or both of useInternalName and readback If useInternalName then argument 1 must specify the device s internal name This is returned by GetInternalDeviceName page 186 Argument 2 is ignored in this case If readback is specified the function returns names of read back parameters Read back pa rameters aren t writeable but return information about a device s operating characteristics For example most MOS devices have vdsat read back parameter that returns the saturation volt age This function only returns the names of read back parameters To find their values use GetInstanceParamValues page 184 Returns Return type string array String array of length determined by the number of parameters the device has Each element contains the name of a single parameter To find the values for the parameters use GetInstan ceParamValues pa
86. SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Format 2 real No Arguments 1 8 values Argument 1 Format specification The format used is essentially the same as that used for the printf range of functions provided in the C programming language However only real arguments are supported and so only format types e WE f g and G are supported Argument 2 Values used for format specs in the format string Upto 8 argument values may be used Returns Return type string Formatted string sqrt Returns the square root of the argument If the argument is real and negative an error will result If however the argument is complex a complex result will be returned Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type rea complex array Returns the square root of the argument Str Returns the argument converted to a string Arguments Number Type Compulsory Default Description 1 any Yes Input 362 SIMetrix SIMPLIS Script Reference Manual Returns Return type string The argument converted to a string StringLength Returns the number of characters in the supplied string Arguments Number Type Compulsory Default Description 1 string Yes Input string Returns Return type real Length of the given string StringStartsWith Check
87. Sets a property value for a graph object Note that this command s name is a little misleading as it can edit the values of the properties of any graph object not just annotation objects For more information on graph objects and properties see Graph Objects on page 569 Parameters object id Id of object which owns the property to be edited property name Name of property to be edited property value New value of property SetGroup SetGroup group name Changes the current group Parameters group name Name of new group An array of current group names is returned by the function Groups page 233 See Also Groups on page 233 533 SIMetrix SIMPLIS Script Reference Manual Set Highlight SetHighlight prop propname propvalue wire wirehandle colourindex net netname colour all 1 all 0 clearallopen 1 0 Highlights or unhighlights schematic objects At most one parameter switch at may be used Parameters all If T specified highlights all objects on selected schematic Other wise unhighlights all objects on selected schematic clearAllOpen Clears all highlighting on all open schematics net prop Property name If specified without propvalue all instances possess ing propname will be highlighted Otherwise only instances possess ing propname with propvalue will be highlighted wire Handle of wire to be highlighted 1 0 When no switches are given if set to 1 all se
88. The window name as given by the function WM_ Get WindowNames page 403 Returns Return type string A string representing the geometry of the window WM_ Get WindowNames Returns the names of all windows This function superscedes Get WindowNames page 230 Arguments No arguments Returns Return type string array A list of the window names The first name will always be the primary window WM_ NumberContent Widgets Returns the number of content widgets in use Arguments No arguments Returns Return type Integer The number of content widgets in use WM_NumberSystemW idgets Returns the number of system widgets in use 403 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type Integer The number of system widgets WriteConfigSetting Writes a configuration setting Configuration settings are stored in the configuration file See User s Manual Sundry Topics Configuration Settings for more information Settings are defined by a key value pair and are arranged into sections The function writes the value in argument three to the specified key and section If the value is missing the setting will be deleted Arguments Number Type Compulsory Default Description 1 string Yes Section 2 string Yes Key 3 string No Value Argument 1 Section name Argument 2 Key name Argument 3 Value to set Setting will be deleted if this is omitted Returns R
89. User s Manual Sundry Topics Options UsingtheSetandUnsetcommands List of Options for details about Options Groups provide a means of organising data especially simulation data and makes it possible to keep the results of old simulation runs All groups have a name Simulation group names are related to the analysis being performed E g transient analyses are always trann where n is a number chosen to make the name unique Variables within a group may be accessed unambiguously by using their fully qualified name This is of the form groupname variable_name E g trant vout The Current Group At any time a single group is designated the current group This is usually the group containing the most recent simulation data but may be changed by the user with the Simulator Manage Data Groups menu or with the SetGroup page 533 If a variable name is used in an expression that is not local created in a script or global the current group is searched for it So when the command Plot vout is executed if vout is not a local or global variable SIMetrix will look for it in the current group You can view the variables in the current group with the Display page 470 command Run a simulation and after it is completed type Display at the command line A list of available variables from the simulation run will be displayed Some of them will be aliases These are explained in the aliases section on page 14 The Prefix If a var
90. Verilog HDL devices will return anything other than 1 for this field Get DeviceStats Get simulation statistics for each device type Arguments No arguments Returns Return type string array Array of strings with each element containing a list of name value pairs providing information on each device type used in the simulator Information provided is as follows Name Value unlabelled Device type SIMetrix SIMPLIS Script Reference Manual Name Value Tload Time in seconds used to evaluate the device s equations This entry will be zero unless OPTIONS devacct is spec ified in the simulation netlist Count Number of instances of this device type ByteCount Number of bytes used to store the data for instances of this device Get Dot ParamNames Returns names of variables defined using PARAM in the most recent simulation run Arguments No arguments Returns Return type string array String array with names of variables If no simulation has been run an empty result will be returned Note that real values in the front end s global group are passed to the simulator and entered as PARAM values So this function will always return those values In addition the values PLANCK BOLTZ and ECHARGE are always defined Get DotParamValue Returns the value of a variable defined using PARAM in the most recent simulation run Arguments Number Type Compulsory Default Descript
91. WaveformStr Dialog Opens a dialog box designed for editing a time domain waveform To see an example of this dialog box place a Waveform Generator on a schematic select it then press F7 Arguments Number Type Compulsory Default Description 1 string array Yes Time frequency initial values 2 string array No Vertical initial values 3 string array No Options 128 SIMetrix SIMPLIS Script Reference Manual Argument 1 Initial values for the controls in the Time Frequency group box Values must be entered as strings and may be in the form of expressions enclosed with curly braces as well as literal constants Up to 10 elements defined as follows Index Description 0 Integer from 0 to 8 specifies wave shape as follows 0 o n na FPF wn rr Oo AN DOT FF won rer Argument 2 Square Triangle Sawtooth Sine Cosine Pulse One pulse One pulse exp Step Delay Rise time Fall time Width Period Damping 0 Use Delay 1 Use Phase Frequency Duty cycle Initial values for the controls in the Vertical group box Values must be entered as strings and may be in the form of expressions enclosed with curly braces as well as literal constants Up to 5 elements defined as follows Index Description 0 Initial 1 Pulse 2 Off until delay 3 Offset 4 Amplitude SIMetrix SIMPLIS Script Reference Manual Argument 3 String array which may contain any combination of Name Description simplis Se
92. XML document XMLOpenFile XMLOpenFile xml path reference Opens an XML document from a file creating a new XML reference object Parameters xaml path Path to the XML document to open reference Reference for the created XML document to be used to refer to it later Zoom Zoom rect rectbutton fulllout in new scale Changes magnification of currently selected schematic Parameters rect User selects area to be viewed with mouse full Fits schematic to the current window out Magnification is reduced one step in Magnification is increased one step SIMetrix SIMPLIS Script Reference Manual Chapter 7 Applications User Interface A full description of the user interface is outside the scope of this manual Instead in this section we provide a few pointers on how to go about finding how a particular feature works so that it can be altered or adapted User Defined Key and Menu Definitions Virtually the entire user interface is accessed through menus keyboard keys or tool bar buttons all of which may be redefined deleted or replaced The only parts of the UI which are not accessible are the mouse keys These have fixed definitions and may not be modified by the user In principle it is possible to define completely new menus or and toolbars which bear no similarity with the built in definitions A more normal use of menu button and key redefinition would probably be to add a special function or perhaps to delete some
93. Yes Attribute name 2 string Yes XML reference Returns Return type String The attribute value for the given name 410 SIMetrix SIMPLIS Script Reference Manual XMLGetElements Lists elements at the current focus level Arguments Number Type Compulsory Default Description 1 string Yes XML reference Argument 1 The reference of the XML document to list the elements for Returns Return type String array The elements that are direct children of the current focus level XMLGet Text Returns the text for the current focus element Arguments Number Type Compulsory Default Description 1 string Yes XML reference Returns Return type String The text for the current focus element XMLToString Returns the XML document as a string Arguments Number Type Compulsory Default Description 1 string Yes XML reference 411 SIMetrix SIMPLIS Script Reference Manual Returns Return type String The XML document as a string XY Creates an XY Vector from two separate vectors An XY Vector is a vector that has a reference see Vector References on page 21 The resulting vector will have y values defined by argument 1 and the x values i e its reference of argument 2 Arguments Number Type Compulsory Default Description 1 real array Yes y vector 2 real array Yes x vector Returns Return type real array Y Cursor Returns y location of graph cursor Arguments
94. abs Returns absolute value or magnitude of argument This function is identical to the function mag page 261 Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array Absolute value of input ACSourceDialog Displays dialog box intended for the user definition of an AC source Argument is a real array with two elements which specify the initial values for the two controls as follows O Magnitude 1 Phase The function returns a real array of length 2 with the same format as the argument described above Arguments Number Type Compulsory Default Description 1 real array Yes Initial value 57 SIMetrix SIMPLIS Script Reference Manual Returns Return type Real array AddConfigCollection Adds a list of entries to a named section in the configuration file Arguments Number Type Compulsory Default Description 1 string Yes Section name 2 string array Yes List of entries Argument 1 Section name in configuration file where entries are to be added The configuration file is where SIMetrix stores its settings See the User s Manual chapter 13 for more information Argument 2 List of entries to be added Note that duplicates are not permitted and any entered will be ignored Returns Return type real The number of new entries successfully added is returned This will may be less than the number of entries supplied to argument 2
95. add your own to any other symbol Modifying Internal Scripts The SIMetrix user interface is implemented with about 550 internal or built in scripts These are built in to the executable file but can be bypassed so that their function can be changed The code for all of these scripts can be found on the installation CD in directory script builtin The procedure for replacing an internal script is very straightforward Simply place a script with the same name but with the extension sxscr in the built in script directory The location of this directory is set in the file locations sheet of the options dialog box menu File Options General On Windows this is usually lt SIMetrix root gt support biscript SIMetrix always searches this directory first when executing an internal script Custom Curve Analysis The menus Probe More Probe Functions and the graph menu Measure More Functions each open a tree list dialog box that displays the function available In this section we describe how this system works and how it can be extended We have only skimmed over the basics For more information please refer to the scripts themselves 557 SIMetrix SIMPLIS Script Reference Manual Adding New Functions The operations listed for the menus described above are obtained from one of two built in text files These files are analysis_tree sxscr For curve analysis functions probe_tree sxscr For probe functions Like built in scripts thes
96. annotation objects Arguments No arguments Returns Return type string See Also GetGraphObjPropValues page 180 GetGraphObjPropValue page 179 GetGraphObjects page 178 GetCurrentGraph page 161 GetGraphObjPropNames page 178 GetSelectedStyleNames Returns the names of the styles used by the selected elements Each style name is returned at most once in the list 207 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string array A list of style names that are used by the selected elements For line and shape based elements that can be partially selected the information is only returned if the element is fully selected GetSelected YAxis Returns id of selected y axis Arguments No arguments Returns Return type string GetShortPathName Returns short path name for path specified either as a long or short path Short path names are a feature of some file systems which represent the path in a form that would be accepted on legacy files systems especially DOS Arguments Number Type Compulsory Default Description 1 string Yes Path Argument 1 Input path Maybe full or partial and the function will return its argument in the same form that it it won t convert to a full path Tf the input path does not exist this function will simply return its argument unmodified Returns Return type string See Also GetLongPathName on page 192
97. anything used for data entry Other widgets that do not require initialisation nor output data may also be used E g the items under AIJContainers l Note that the Radio Button widget in the Buttons group can only be used inside a RadioGroup which you will find in the SIMetrix group In general data is transferred to the dialog widgets by the arguments of the SIMetrix script function Each argument is an array of strings and each widget may specify through its properties the argument index and the array element index where the data is located In every case the data is a single string If multiple values are required for a widget it will either have multiple properties to define them or in the case of lists of values the items will be delimited by a pipe symbol Data is returned in a similar manner But as there is only one return value just a single array element is specified 591 SIMetrix SIMPLIS Script Reference Manual General Properties There are five user settable properties in use by the various widgets but not all widgets use all of the properties Some widgets may have aditional special purpose properties These five general properties are Property Name Description argIndex Index of script function argument used for initialisation of widget First argument has index 0 You may use a maximum of 8 arguments so this property may not be larger than 7 inElementIndex Index into array supp
98. arguments 1 and 2 Contains arguments 1 and 2 concatenated together SIMetrix SIMPLIS Script Reference Manual length Returns the number of elements in the argument The result will be 1 for a scalar and 0 for an empty value The Length function is the only function which will not return an error if supplied with an empty value Empty variables are returned by some functions when they cannot produce a return value All other functions and operators will yield an error if presented with an empty value and abort any script that called it Arguments Number Type Compulsory Default Description 1 any Yes Vector Returns Return type real List Directory Lists all files that comply with the spec provided in argument 1 Arguments Number Type Compulsory Default Description 1 string Yes Path specification 2 string No none Option Argument 1 Specification for output This would usually contain a DOS style wild card value E g C Program Files SIMetrix 421 No output will result if just a directory name is given Argument 2 If omitted the result will be file names only If set to fullpath the full path of the files will be returned Returns Return type string array ListSchemProps Returns the schematic properties 258 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string array The schematic property names and whether they are writ
99. array The function returns a string array with the same format as the argument If the user selects Cancel the function returns an empty vector EditProbeDialog Opens a dialog to define a schematic fixed probe Arguments Number Type Compulsory Default Description 1 string array Yes initial settings Argument 1 The argument is a string array of length 25 which defines how the various controls are initialised This array has the same format for EditAxisDialog page 105 and DefineCurveDialog page 88 Not all the elements are relevant to this function The following table describes the elements that are used Index Purpose Notes Default 0 Axis Type Setting of Axis Type group in Axis Graph No default Options sheet Possible values Value must be auto Auto Select specified selected Use Selected axis Use New Y Axis grid Use New Grid digital Digital 1 Graph Type Not used with this function 2 Axis name Entry in Axis Name in Probe Options empty sheet 3 Persistence Entry in Persistence box in Probe Options empty sheet 4 Graph name Entry in Graph Name in Probe Options empty sheet SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default 5 Curve label Curve label control in Probe Options sheet empty 6 Analysis Setting for Analyses check boxes in Probe empty Options sheet Single string comprising a combination of ac dc and
100. as ur ae ale a a GR Gee St bbe ee eee ee 377 TextEditorHasComments oaao 377 ThdWeight 205 a we ee a ae A aoa EA SL ADS 378 TickCount 4 4 222 8 AAA AA ROE e ee AE A le eee 378 AMG gs as DP eee oe eee oo ea Saeed ee ROE GG 379 SIMetrix SIMPLIS Script Reference Manual Contents TOLOWer aats ke ely a ea A ee A AAA ee E 379 TransformerDialog gacb da da da a es Ge OS we AAS ORS ES ee eek 379 TranslateLogicalPathit cco bop be oo Wh OM ae oo ae eae ae ee G 381 WreeList Dialog amp soak coke ee a ha So REE oe amp ew A ee ee ee BO ed 381 True 4 3 3 23 42 AN A Oe eS i ici AA e E A 382 Truncate ta Ri ie a aye ee abe enn Mh AO a a ie ay ee 383 MT wokileSelection Dialog gorros gig sb Geb A Se See ee he tae ee 383 Dect ta DA de Ah Bie bsg eae we a et Bs Me oe Gt ena e e ch a eae Bd 387 UN a a Be ten far Sap Corde ed Oh ah ah a 388 UNISA Te e a anaE Be NANA E EA eG a Un Ne The ey Ns hae Rah dh oe A de 388 UNILVEC dd AA DA eae te ep a At ad a ol A Sot aS 389 UpDown Dialog lua de OO a eee oa a a ek ee da 390 UserParametersDialog naaa cs RE Ree OSG ee ee DE eed 391 Vaile a Be ag A a A Be hee a 392 ValueDialog si kiasa an erent Wd ra 4 OB A 392 NGC ees oe hoe be de we A ere a ee ae Be Godda dod aaa Da dG 393 VECTOR fd ht a da A erage a es ae ee te Gt te eae e ho hn Boge at St ae 394 VectorsliGroupss Si kA a ee A A LA AAEM GEES SES EEE AAR ES 394 Version Info a id BAe eli hy Ge RR A AR D a 395 ViewEFormattedil ext lama we a Gules en
101. axis max limit Max value for X Axis in Axis Scales sheet Must 1 be specified as a string 16 Y axis min limit Min value for Y Axis in Axis Scales sheet Must 0 be specified as a string 17 Y axis max limit Max value for Y Axis in Axis Scales sheet Must 1 be specified as a string 18 X axis label Axis Label setting for X Axis group in Axis La empty bels sheet 19 X axis units Axis Units setting for X Axis group in Axis La empty bels sheet 20 Y axis label Axis Label setting for Y Axis group in Axis La empty bels sheet 21 Y axis units Axis Units setting for Y Axis group in Axis La empty bels sheet 22 Y expression Not used with this function 23 X expression Not used with this function 24 Vector filter Not used with this function Returns Return type string array The function returns a string array with the same format as the argument Cancel the function returns an empty vector EditBodePlotProbeDialog UI function for editing Bode plot fixed probes If the user selects Arguments Number Type Compulsory Default Description 1 string array No Initialisation 106 SIMetrix SIMPLIS Script Reference Manual Argument 1 Array values used to initialise dialog as shown in the table below Index Description Gain label Phase label Persistence Multiplied by 1 0 for normal 1 for invert Use dB auto limits 1 on 0 off Minimum limit dB Maximum limit
102. be executed when this button is pressed This is done using the command DefButton page 458 Again this should be place in your startup script 4 Add the button to a toolbar See Modifying Existing Toolbars and Buttons on page 586 to find out how to add this to an existing toolbar If you wish to create a new toolbar for the new button see Creating New Toolbars on page 588 For example suppose you created a symbol for a diffused resistor and wanted to assign this to a toolbar button that is distinct from the regular resistor button These are the steps 1 First you would create a graphical image called for example diffres png Copy this to the images directory as described above 2 Execute or place in startup script CreateToolButton class component diffres diffres png Place Diffused Resistor This must all be on one line This will create a button called diffres that we will refer to in the following steps The switch class component identifies the button as one that places a component and so will be listed in the GUI based system to edit component toolbars See schematic menu View Configure Toolbar This will make adding the button to a component toolbar a simple operation 587 SIMetrix SIMPLIS Script Reference Manual 3 Execute or place in startup script DefButton diffres inst ne diffressym where diffressym is the name of the schematic symbol created for the diffused resistor 4 To add
103. be ignored The next line CreateSym npn NPN bipolar analog begins the symbol definition The first argument npn is the symbol name This must be unique and cannot contain spaces It is used to place the symbol on a schematic The second argument is the description and is optional This is what will appear in the choose symbol dialog box opened by the schematic popup Place From Symbol Library Ae menu item If no description is given the symbol s name will appear in this dialog box The final parameter is the catalog name This is 565 SIMetrix SIMPLIS Script Reference Manual used to categorise symbols Although the parameter is optional it is strongly recommend that it is included The following six lines AddSeg 0 0 O 200 AddSeg 0 100 100 0 AddSeg 0 100 100 200 AddSeg 100 200 80 160 AddSeg 100 200 60 180 AddSeg 0 100 100 100 describe the symbol s six straight line segments The four numbers on each line are the x and y co ordinates of the start and end of each segment 100 units represents one grid square at X1 mag on the schematic The diagram shows the co ordinates of each segment end Origin 0 0 100 0 Q NPN MODEL 100 100 80 160 0 100 0 200 60 180 100 200 The next three lines AddPin C 1 100 O AddPin B 2 100 100 AddPin E 3 100 200 describe the location and attributes of the symbol s three pins The first parameter on each AddPin command is the pin s name This must be the same as the pi
104. be in SPICE format This is an unsupported option rawfile Raw file to open datafile SIMetrix data file to which data is written see Notes If omitted a file will be created in the temporary data directory as specified by the TempDataDir option setting Notes The command reads the raw file and writes the data out to a SIMetrix native data file It then loads the SIMetrix native data file as if it were created by a SIMetrix simulation The SIMetrix data file format is more efficient that the raw file format as it stores the data for each vector in large contiguous blocks The raw file format stores data on a per simulation point basis which leaves the data for multiple vectors interleaved This arrangement makes data recovery for a single vector slow To perform the reformatting the command needs to buffer the rawfile data in RAM while writing the data out to the SIMetrix data file The amount of RAM space allowed for this controls the size of the contiguous blocks in the SIMetrix data file The larger these blocks are the faster the read in time for each vector This is the same issue that affects the simulator and which is explained in Simulator Reference Manual Runing the Simulator Configuration Settings Here RAM used for SIMetrix SIMPLIS Script Reference Manual this can be controlled by the bufsize switch value Note that the RAM is only needed while this command is being executed Note that the data file generated by this command ca
105. be necessary if additional files are added to a directory where models reside while SIMetrix is running SIMetrix can usually detect this automatically if the drive is local but cannot always do so for network drives Note the menu Model Library Rebuild Catalog calls this command The work of reloading indexes is actually performed by the simulator in the background so this command returns immediately even though the process can take several seconds If you start a simulation immediately after executing this command there will be a pause until the reload is complete LoadSimulatorStyleSheet LoadSimulatorStyleSheet Applies a style sheet to simulator GUI elements Parameters clear Clears the current style sheet first direct Loads style sheet directly from input string file Loads style sheet from a file LoadStyleSheet LoadStyleSheet Applies a style sheet to the whole application Parameters SIMetrix SIMPLIS Script Reference Manual clear Clears the current style sheet first direct Loads style sheet directly from input string file Loads style sheet from a file MakeAlias MakeAlias vector name Converts a string variable to an alias An alias is a string representing a numeric expression For more information see Aliases on page 14 Parameters vector name Variable to be converted MakeCatalog MakeCatalog out catalog all catalog user catalog This command builds a catalog file for use by
106. be plotted on a digital axis and will be plotted as a bus curve type may be hex dec or bin specifying hexadecimal decimal or binary display respectively Does nothing For compatibility with version 3 1 and earlier If specified new curve will be plotted on new digital axis Digital axes are stacked on top of main axes and are sized and labelled ap propriately for digital waveforms Specifies the internal clipboard as the source of the curve data clipboard index is a value of 0 or more that indicates which curve in the internal clipboard is to be used The function Havelnternal ClipboardData on page 238 may be used to determine the number of curves available The maximum acceptable value for clipboard index is thus one less than the value returned by HavelnternalClipboard Data page 238 Only effective when graph sheet is empty Forces both y and x axes to be logarithmic If specified curve will be named curve name If specified the new curve will be plotted on a new y axis If specified the new curve will be plotted on a new grid If specified the new curve will be selected Does nothing Included for compatibility with Plot command Flag Use automatic limits for x axis If this appears after a xl specification xauto will override it and vice versa Specify spacing between major grid lines on x axis Followed by z grid spacing a real value For default spacing use 0 Use fixed limit
107. boa 410 XML GetAttribute fo ee a A Ee Ra eee ee es 410 XML GetBlementss aa et fen ware A a eS a a ae nee EE Se 411 XMEGet Text llo 4 rs e ee Ri Be bb Bate AE 411 XME TOS tn tt ds e MM EN Na 411 PO A A e a RA RI O 412 VECES AAA A AA RA AAA EI A OH A 412 Y Daturm 56 4 2 4 aww bbe ad a Ee g 412 SIMetrix SIMPLIS Script Reference Manual YEromA 2 2 ae a a Se piel dy Ly ean 5 Command Summary 5 1 Commands by Application Di eee et 5 12 Graphs oo eee ees Be Bi A 5 1 4 Miscellaneous 5 1 5 Printing o a a ee 5 1 6 Schematic 5 1 7 Simulator 5 1 8 Text Editor 5 1 9 User Interface 5 1 10 Vectors Groups 6 Command Reference AIPORT 2 a as vd Sa apy Ie aes AbortSIMPLIS ADO i zeb a A a AddAnnotationText AdGAre 3 4 D A Goethe dob bob a AddG it a amp aac amp gd da AddCurveMarker AddDoubleClickAction AddFileViewMenultem AddFloodFill AddFreeText AddGlobalStyle AddGraphDimension AddImage AddImageScript AddLegend AddLegendProp AddPin 000004 ACGPLOp 2 4 20 eataa Dl a a AddProperty AddS g ou rd AddSymbolProperty AddTextBox AddTitleBlock Align lerte 129 vif Yt ag en ANNO wie a SAS RE a 2 a ace AppendGroup
108. but may be changed to 60 40 30 or 24 Note that this command will not allow the snap grid to be changed to something that would place existing wires or symbols off grid Parameters snapgrid Snap grid in sheet units May be 120 default 60 40 30 or 24 SetStyleColour SetStyleColour Sets the style with the specified colour The colour is specified as a hex colour code in blue green red format using Ox00bbggrr Parameters colour The new colour to apply using a blue gree red hex code stylename The name of the style to change the colour for SetSymbolFillStyle SetSymbolFillStyle style name Applies a fill style to a symbol If symbols have a filled region the colour of those regions can be specified to be different from the rest of the symbol The style name to use should be given as an argument 536 SIMetrix SIMPLIS Script Reference Manual Parameters style name The name of the style to apply SetSymbolOriginVisibility SetSymbolOriginVisibility show hide toggle Controls the visibility of the origin marker in the symbol editor Set Units SetUnits vector name units Changes physical type of vector name to physical type Physical type may be any of the following unknown ee Voltage Vv Current A Time Secs Frequency Hertz Resistance Ohm Conductance Sie Capacitance F Inductance H Energy y
109. condition mode is set to none Returns Return type string array The function returns the X Y Pairs entered by the user in the same format as for argument 1 If initial conditions were enabled on input there will be two additional elements at the end The first will be either true or false to indicate whether Use initial condition was checked and the second is the value of the initial condition QueryData Filters a list of data items according to search criteria Arguments Number Type Compulsory Default Description 1 string array Yes Data 2 string array Yes Filter Argument 1 The data to be filtered This should consist of an array of strings comprising semicolon delimited fields The filter supplied in argument 2 matches each field to certain criteria and returns the data in the output if those criteria are satisfied 317 SIMetrix SIMPLIS Script Reference Manual Argument 2 Filter to determine if data in arg 1 is passed to the output The filter consists of one or more semi colon delimited lists which can be combined in Boolean combinations Each of the lists is compared with the input data for a match and if the resulting Boolean expression is true the data item is accepted and passed to the return value Wild cards and may be used in any field The system is best explained with examples Suppose a data item in arg 1 is as follows IRFI520N nmos_sub X NMOS SIMetrix and
110. configuration file See Also WriteConfigSetting on page 404 ReadF110ptions Read OPTIONS line in the F11 window Arguments No arguments Returns Return type string array Array of semi colon delimited strings providing details of any SIMetrix OPTIONS statements located in the current schematic s F11 window Each token in the string is defined in the following table Field Description 0 Option name 1 Value 2 Type on eof BOOL REAL INT STRING or UNKNOWN 322 SIMetrix SIMPLIS Script Reference Manual The function will not return option settings that are not recognised by the simulator It will also not return option settings that are set to their default value See Also WriteF110ptions page 405 WriteF 11Lines page 404 GetF11Lines page 171 AppendText Window page 444 ReadFile Returns an array of strings holding lines of text from the file specified by argument 1 Arguments Number Type Compulsory Default Description 1 string Yes File name 2 string Yes utfs Encoding option Argument 2 Can be mbcs or utf8 If utfs the file is assumed to be encoded using UTF8 If mbcs encoding uses the system default Returns Return type string array See Also LoadFile page 259 Perfoms a similar operation but with more encoding options including the ability to auto detect UTF8 ReadIniKey Reads an INI file An INI file usually has the ext
111. console To run a console mode application in a manner such that the console is displayed use the command ShellOld page 538 ShellOld ShellOld wait hide icon command command name Launches an application This behaves identically to the Shell command implemented on version 4 5 and earlier Parameters command Calls system command processor to execute command string This is necessary to run internal commands such as Copy and Move The command processor is usually CMD EXE console hide Start the program with the main window initially hidden icon Start the program in a minimised state wait If specified application is launched synchronously This means that SIMetrix will not continue until the application has closed 538 SIMetrix SIMPLIS Script Reference Manual command name Show Show file filename append filename noindex plain noHeader clipboard names File system path to executable file This would usually be a binary executable but may be any file that is defined as executable by the operating system If a full path is not specified a search will be made for the file using the rules described in Shell on page 353 names force width width lock detail unix expression expression Displays the value of an expression Parameters append clipboard detail file force interactive list lock names noHeader noindex
112. drop This is called when an a file folder or group or files and or folders is dropped on the command shell or a schematic or graph window Two arguments are passed The first identifies the window type This may be one of Schematic Schematic window Graph Graph window 580 SIMetrix SIMPLIS Script Reference Manual Shell Command shell The second argument contains a list of full path names of the objects dropped The items are separated by semi colons on schem double click Script is called when the left mouse button is double clicked in the schematic window Two arguments are supplied providing the x and y coordinates of the mouse at the time the double click event occurred IMPORTANT This script is only called if the schematic double click mode is set to Edit Selected Component See options dialog box menu File Options General In Classic mode it is not called at all User Defined Script Based Functions Overview The SIMetrix script language provides a method of creating user defined functions that can be used in any front end expression These expressions may be used in scripts on the command line and even within a schematic template property User defined functions are used to define some of the goal functions designed for performance and histogram analysis The scripts for these all begin uf_ and are registered using the script reg_user_funcs The source for these can be found on the install
113. e the start of the input Returns Return type real Date Returns the current date in the format specified Arguments Number Type Compulsory Default Description 1 string No locale format SIMetrix SIMPLIS Script Reference Manual Argument 1 May be iso or locale When set to locale the date is returned in a format specified by system settings When set to iso the date is returned in a format complying with ISO8601 which is YYYY MM DD where YYYY is the year MM is the month of the year between 01 and 12 and DD is the day of the month between 01 and 31 Returns Return type string db Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns 20 x log10 mag x DCSourceDialog Opens Edit DC Source dialog box This accepts user input for the value of a DC source Return value is the user s entry Arguments Number Type Compulsory Default Description 1 real Yes Initial value Returns Return type real DefineA DCDialog Opens a dialog box to define an analog to digital converter Argument is a real array which specifies the initial values for each control as follows 84 SIMetrix SIMPLIS Script Reference Manual Element index Description Element index Description 0 Number of bits 1 Convert time default 1u 2 Maximum conversion rate def
114. ee oe eles 479 HourGlass es Bo de ag pik e AS E E ta A ore BE AAA henna 480 ImportSymbol at fae erento Hd Rea ewe eb OB A a amp 480 sb he a e bok a a gag G9 Qed e ea kh ed 481 KeepGroup 2 2 4 a a ae ea Ge eee ee bE sa ee a 482 Tet hate ra RIS A Se NN Mae ot SS ed A 482 LISA A ee eee A edn Bards ne et RA A EE RS ED A AD A le 482 DListModels sf 2 ra oe GAD a ee A AREA 483 ListOptions i online e Ee Set at Da ee ee EES OA eee 483 ListStd Keys ea a arion dd de LE E a ee ae e e We oad 484 LoadModellndex ser eii AE E E E AS AA nee ps 484 LoadSimulatorStyleSheet o e 484 LoadStyleSheetio idea a a go a aa ida 484 Make Alias 3 of och ce a lol td e Se ue o matt Re ie 8 RES 485 MakeCatalogy A E e Ar i Oer ASM A ok oot a Oe AS A 485 MakeSymbolScript dit daa ed ad Be ne ee VP ee a 485 MakeTree n se ak 43 E Se PGP tn A Sob A ee ee ee ed a 486 MCD ry fen ta onde e Get ode E E A che EASES Ge 486 VIDS eh roer RA td od oot ad a ar Oe eh A ON ce tt se at oe oes 486 Mess O payee tate ee ae Me es EEE yea es 487 MessageBox aaa aici ts eee eee da a Gols a eal ca dh tata Ee 487 Move oo obo oe a a dah oe a ba eee he 487 Move urve lt s mea ia bd ld ee eee eee Sie Be eee 487 Moyvekile is rrai E A A A A A A A DA a 488 Move Menta ae a de de tae Gaye A AA Eee ee A 488 Move roperts 2 azuur bo a eee Sr gee la da BR le Be SS 488 Netlist a a A it de E A al o a a 489 N wAnnotatioi A A da eA dad id 490 Ne WAS a a A a AA
115. for x axis Followed by x low limit and x high limit which are real valued lower and upper limit of the x axis Specify a label for the x axis If the label name argument contains any spaces the whole string must be enclosed in double quotes Only effective when graph sheet is empty Forces logarithmic xaxis SIMetrix SIMPLIS Script Reference Manual tunit Specify units for the x axis Volts Watts etc followed by the unit name as a string If the string contains spaces the whole string must be enclosed in quotes You should not include an engineering prefix m K etc yauto Flag Use automatic limits for y axis If this appears after a yl specification yauto will override it and vice versa ydelta Specify spacing between major grid lines on y axis Followed by y grid spacing a real value For default spacing ise O yl Use fixed limit for y axis Followed by y low limit and y high limit which are real valued lower and upper limit of the y axis ylabel Specify a label for the y axis If the label name argument contains any spaces the whole string must be enclosed in double quotes ylog Only effective when graph sheet is empty Forces logarithmic yaxis yunit Specify units for the y axis Volts Watts etc followed by the unit name as a string If the string contains spaces the whole string must be enclosed in quotes You should not include an engineering prefix m K etc y expression Text string
116. gi A A ae ES 396 WO fee Si ca ae ets Saana BeBe EG Geta aw OS soe i of ES AAS ee 396 WirePoints 65 660 es aa ee A eR AAA 397 Wires te ici A ee a a AE latin Bre BA A we a 398 WM_CanRevertToSaved 2 ee 398 WM_GetCentralWidgetGeometry 0 0 000020 000000000200 G 399 WM_GetContentWidgetNames a 399 WM_GetContentWidgetSessionInfo ee 399 WM_GetContentWidgetsLayout 0 a 400 WM_GetContentWidgetTypes 2 0 0 0002 e 400 WM_GetCurrentWinadowName 2 a a 401 WM_GetNumberModifiedEditors 0 0 0 000000 a 401 WM_GetPrimaryWindowName 2 0 0000002 eee eee 401 WM_GetSystemWidgetSessionInfo 2 2 e 402 WM_GetSystemWidgetsLay0Ut ee 402 WM_GetWindowGeometry 2 0 02 402 WM_GetWindowNames w daaa a eara e e a a E E EAA N di A 403 WM_NumberContentWidgets a 403 WM_NumberSystemWidgets e 403 WriteConfigSetting lt G00 2 dd aw A A EA AE a a 404 Write A A ede eid te oh hat at ate te Roma A kt bed 404 Write FR LLO ptions jin oe ee ee es EE A A OE EEE A we ee eee 405 Writelnikey snc Sia a a ee ee ee SE a 406 WriteRaw Data ooo os herra a a ee A Ge de de e ee le A 407 WriteRegsetting ss eric E A AR te eae we e E 407 WriteschemProp a a AA A A A 408 XOUESOE 4d o de de A de la OA ay Rae Se ay AA A See a a 409 ADAtUM is bd da ba ee Me SS 409 XFrOMY ud eaa E oe eS dae he e A ee eld 409 XMLCountHlements 2 mba lt a ee a ia ek ent Sh Sala of
117. had two tokens but this argument was set to three the result would be a string array of length 3 with the third element an empty string In many applications this can save testing the length of the return value to determine if an optional token was provided Returns Return type string array Returns tokens as an array of strings Empty fields are treated as a separate token E g in BUFO4 buf Buffers the double semi colon after buf would return an empty entry in the returned array So Scan BUFO4 buf Buffers would return BUFO4 buf Buffers ScriptName Returns the full path of the currently executing script Arguments No arguments Returns Return type string Returns full path of currently executing script If the script running directly from the script editor then this function will return the path of the file in the editor if there is one If the script editor file has never been saved then the return value will be lt LocalScript gt Search Searches a list of strings for one or more items supplied in argument 1 for the item s supplied in argument 2 Function returns a real array of length equal to the length of argument 2 The return value is an array of reals 336 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes List to search 2 string Yes Items to search in list 3 string No Option
118. has only one sheet the whole window will be closed ClosePrinter ClosePrinter ClosePrinter is one of a number of commands and functions used for non interactive printing This is explained in Non interactive and Customised Printing on page 582 Printing sessions are started with OpenPrinter page 500 after which print output commands such as Print Graph page 508 and PrintSchematic page 509 may be called The session is terminated with ClosePrinter which actually initiates the printing activity If the abort switch is specified the print job is terminated and no print output will be produced 447 SIMetrix SIMPLIS Script Reference Manual Parameters abort Any print job will be aborted and no print output will be produced See Also NewPrinterPage on page 493 OpenPrinter on page 500 PrintGraph on page 508 PrintSchematic on page 509 GenPrintDialog on page 148 GetPrinterInfo on page 203 CloseSchem CloseSchem Closes the currently selected schematic CloseSheet CloseSheet Closes the currently selected schematic or symbol editor tabbed sheet If the sheet is the last in its window the window will also be closed If force is specified the sheet will be closed unconditionally Otherwise user interaction will be required if the schematic or symbol has not been saved Parameters force If specified the sheet will close unconditionally CloseSimplisStatusBox CloseSimplisSt
119. if any are already entered or if their are duplicates in the list supplied AddGraphCrossHair Adds a new cursor to the current graph Note that cursors must be switched on for this to work This can be done with the command CursorMode page 456 For more information on graph annotation objects please refer to Graph Objects on page 569 Arguments Number Type Compulsory Default Description 1 string Yes curve id Argument 1 Id of curve on which crosshair is intially placed If the Id supplied is not valid the cursor will be placed on an undetermined existing curve SIMetrix SIMPLIS Script Reference Manual Returns Return type string array String array with three elements defined as follows Index Description 0 Id of new cursor 1 Id of cursor s horizontal dimension 2 Id of cursor s vertical dimension AddModelFiles Installs a list of new models to the model library Models may be either single files or wildcard specifications Duplicates will be ignored Arguments Number Type Compulsory Default Description 1 string array Yes Model path names Argument 1 String array containing library specifications to be added A library specification can either be a single file or a wildcard definition e g path Ib Returns Return type real Number of models actually installed This may be less than the number supplied if any are already installed AddProperty Dialog Opens the dialo
120. in the table Returns Return type real Example distribution 1 0 1 0 0 1 1 0 see graph below Frequency kcounts 0 92 0 94 0 96 0 98 1 1 02 1 04 1 06 1 08 Voltage 20m vidiv distribution 1 0 1 1 0 5 1 0 5 0 0 5 0 0 5 1 1 1 SIMetrix SIMPLIS Script Reference Manual Frequency counts 0 92 0 94 0 96 0 98 1 1 02 1 04 1 06 1 08 Woltage Y 20mVidiv Notes If multiple instances of a particular distribution are needed a variable of the lookup table may be defined For example VAR binomial 1 1 0 5 1 0 5 0 0 5 0 0 5 1 1 1 The above can be placed in the F11 window of a SIMPLIS schematic Then to access a binomial distribution for a component value use something like 1k distribution 0 1 binomial The above defines a value of 1k with a 10 tolerance using the binomial distribution defined by the lookup table binomial The function UD page 387 is an alias to this function and may be more convenient See Also Gauss page 146 GaussTrunc page 148 Unif page 388 UD page 387 WC page 396 EditArcDialog Opens a dialog box used to define an arc circle or ellipse for the symbol editor SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real No 90 initial start to finish angle 2 real No 1 initi
121. initial settings 2 string array Yes devices 3 string array No empty parameter names 4 string array No empty parameter values Argument 1 Defines options and initial settings as follows Index Description 0 Text entered in edit control above list box If the text item is also present in the device list argument 2 then that item will be selected 1 Ignored unless element 1 is empty Integer entered in string form which defines selected device Dialog box caption Default if omitted Select Device Message at the top of the dialog box Default if omitted Select Device Argument 2 String array defining the list of devices Argument 3 String array defining list of parameter names See argument 4 Argument 4 String array defining list of parameter values If arguments 3 and 4 are supplied the Parameters button will be visible This button opens another dialog box that provides the facility to edit these parameters values Returns Return type string array If the user selects Cancel the function returns an empty vector otherwise returns a string array Index Description 0 Entry in the text edit box 1 Index into device list argument 2 of device in text edit box If this device is not in the list 1 will be returned Number of parameter values 3 Onwards The values of the parameters in the order they were passed 110 SIMetrix SIMPLIS Script Reference Manual
122. is placed on right hand side of menu item For list of possible values see DefKey page 460 but note that key pad keys e g NUMI NUM etc cannot be assigned as menu shortcuts Also note that DefKey has precedence in the event of the key or key combination being defined by both DefKey and DefMenu Composed of strings separated by pipe symbol First name must be one of the following AsciiFileEditor Schematic ASCII file text editor GraphMain Graph main menu LogicDefinitionEditor Logic definition file text editor NetlistEditor Netlist Model file text editor ScriptEditor Script file text editor Shell Command shell menu SimetrixMain Schematic main menu SIMetrix mode SimplisMain Schematic main menu SIMPLIS mode SymbolMain Symbol editor fixed menu TextEditor Basic text editor VerilogAEditor Verilog A file text editor VerilogHDLEditor Verilog HDL file text editor WebView Web browser Graph Graph context menu Simetrix Schematic context menu SIMetrix mode Simplis Schematic context menu SIMPLIS mode Symbol Symbol editor context menu The menuname for fixed menus must be followed by two or more names separated by The first is the menu name as it appears on the menu bar The second can be the name of a menu item which is actioned when selected or a sub menu containing menu items or further sub menus Sub menus can be nested to any level Use the amp symbol to define an underlined ALT key access letter The men
123. is dealt with xX Multi division vectors are not accepted for this argument Scalar The function acts on the multi division vector to obtain a scalar value Vector The function obtains a scalar value for each division within the multi division vector Multi The function processes all the vector s data to return a multi division vector Function name Argl Arg2 Arg3 Arg4 abs page 57 Multi atan page 64 Multi atan_deg page 65 Multi avg page 65 Multi cos page 77 Multi cosh page 78 Multi CyclePeriod page 82 Multi Multi cos_deg page 77 Multi db page 84 Multi DefineFourierDialog page 90 X Scalar SIMetrix SIMPLIS Script Reference Manual Function name Argl Arg2 Arg3 Arg4 diff page 101 Multi Execute page 135 X Multi Multi Multi erf page 132 Multi exp page 138 Multi fft page 139 Multi X FIR page 141 Multi X x Fourier page 143 Multi X X X FourierOptionsDialog page 144 X Scalar FourierWindow page 145 Multi X X gamma page 146 Multi GetVecStepParameter page 229 Scalar GetVecStepVals page 229 Scalar GroupDelay page 232 Multi HasLogSpacing page 236 Multi Histogram page 240 Multi X IIR page 241 Multi X x im page 243 Multi imag page 243 Multi integ page 250 Multi Interp page 251 Multi X X X IsComplex page 252 Scalar IsNum page 254 Scalar IsStr page 256 Scalar length page 258 Scalar ln page 259 Multi log
124. is specified the menupath must identify a sub menu rather than a menu item menu path Path to the menu to move see DefMenu page 462 for full details of path names shift by Number of positions by which menu is moved A positive number moves the menu down a negative number moves it up MoveProperty MoveProperty property name This is an interactive command It switches the schematic editor into move property mode In this mode the user can move the specified property for all selected instances The mode is completed by pressing the left or right mouse key The left key will fix the new property position and the right key will cancel the mode and leave the properties unmodified 488 SIMetrix SIMPLIS Script Reference Manual Notes In SIMetrix property positions can be defined in one of two ways namely Auto and Absolute Most of the standard symbols have their properties defined as Auto This means that SIMetrix chooses the location of the property on a specified edge of the symbol and ensures that it doesn t clash with other properties on the same edge Auto properties are always horizontal and therefore easily readable The position of Absolute properties is fixed relative to the symbol body regardless of the orientation of the symbol and location of other properties When the symbol is rotated through 90 degrees absolute text will also rotate When a visible property on a symbol is moved using the
125. is the value of the property identified in argument 2 The second value is the pin number also referred to as the netlist order 185 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes Instance pin location 2 string Yes Property name Argument 1 specifies the pin location and is the value returned from the GetInstancePinLocs page 184 with the absolute option specified Returns Return type real array GetInternalDeviceName Finds the simulator s internal device name for a model defined using its model type name and optionally level and version The internal device name is a unique name used to define a primitive simulator device For example npn and pnp transistors have the internal device name of BJ T Level 1 MOSFETs have the internal device name of MOS1 while nmos level 8 devices are called BSIM3 Some functions e g GetDevicelnfo page 165 require the internal device name as an argument Arguments Number Type Compulsory Default Description 1 string array Yes Model details Returns Return type string array 1 3 element string array which describes device Index Description 0 Model type name as used in the MODEL control E g nmos npn etc 1 Optional Value of LEVEL parameter If omitted default level is assumed 2 Optional Value of VERSION parameter GetKeyDefs Returns detail
126. john RadioTest A couple of radio buttons and a toggle button Show radiotest 1 ExecuteDialog Function The ExecuteDialog function executes a sxdlg file directly using the dialog definitionaAZs full path name The first argument to this function is the full path to the dialog sxdlg file and subsequent arguments are the dialogiAZs arguments shifted one place So argument 0 of the dialog function is argument 1 of ExecuteDialog Note that the first argument must be a full path but you may use logical path symbols ExecuteDialog does not require the sxdlg file to present when SIMetrix starts up unlike the usual method of calling the dialog functions All script functions are limited to a maximum of 8 arguments and ExecuteDialog is not an ex ception Because the first argument is reserved for the path name this means that the maximum number of arguments that can be passed to the dialog is 7 If calling the dialog directly the limit is 8 SIMetrix SIMPLIS Script Reference Manual Performance Complex dialog designs can take a noticeable time to open This is because the definition file is read and parsed every time the dialog function is called Pre defined Buttons This is a list of predefined buttons that can be used with DefineToolBar page 459 for creating custom toolbars Button Name Graphic Function AddCurve newcurve bmp Add Curve AddFourier newfourier bmp Fourier CalcAveragePower avg bmp Displ
127. just one specific device E g the BJT device SIMetrix SIMPLIS Script Reference Manual defines the standard SPICE Gummel Poon transistor which can have 3 or 4 terminals But the q letter can also specify VBIC_Thermal devices which can have 5 terminals Argument 2 Options currently only one If this is set to letter a single letter should be specified for argument 1 This is the device letter as used in the netlist e g Q for a BJT R for a resistor See notes above concerning specifying using the device letter Returns Return type string array Result is a 7 element array about the specified simulator device Index Description 0 Model type name for negative polarity device E g npn nmos etc 1 Model type name for positive polarity device E g pnp pmos etc Empty if device has only a single polarity Device letter E g Q for a BJT Maximum number of terminals Minimum number of terminals This is usually the same as the maximum number of terminals except for BJTs whose substrate terminal is optional 5 Value required for LEVEL parameter 0 means that this is the default device when no LEVEL parameter is specified 1 will be returned if the letter option is specified ki 6 Semi colon delimited list of valid MODEL control model name values E g npn pnp and lpnp are returned for the BJT device GetDeviceParameterNames
128. label at the given position repeating Causes repeated placement of the label until a cancel request is made right click or escape press size Sets the font size argument is point size of the font to use style Sets the name of the style to apply to the label label text The text of the label Use backslash n to set line breaks within the text SIMetrix SIMPLIS Script Reference Manual NewLogicDefinitionEditor NewLogicDefinitionEditor Creates a new plain text document in the SIMetrix environment Use this for files with no recog nised format Use one of the following commands to create documents with specific formats NewNetlist on page 493 to create a model file or netlist file NewBasicTextEditor on page 491 to create a plain text file Newscript on page 494 to create a script NewVerilogA on page 495 to create a Verilog A source file NewVerilogHDL on page 495 to create a Verilog HDL source file NewNetlist NewNetlist Creates a new plain text document in the SIMetrix environment Use this for files with no recog nised format Use one of the following commands to create documents with specific formats NewLogicDefinitionEditor on page 493 to create a logic definition file for the abritrary logic block NewBasicTextEditor on page 491 to create a plain text file Newscript on page 494 to create a script NewVerilogA on page 495 to create a Verilog A source file
129. logarithm Magnitude same as abs page 57 Magnitude same as the function abs page 57 Make a directory and result of operation Converts a file system path to a symbolic path Create a string array with specified number of elements Open Manage Data Group dialog box Opens dialog box used to manage graph measure ments Returns max of two vectors Returns index to maximum input value SIMetrix SIMPLIS Script Reference Manual Function Name Description Maxima Maximum mean Meanl MeasureDialog MenuModifier MessageBox Mid min minidx Minima Minimum MkVec MLSplineFit MLVector ModelLibsChanged Navigate NearestInst NetName NetNames Net Wires NewPassiveDialog NewValueDialog norm NumberSelectedAnnotations Num Divisions NumElems Returns locations of maxima of specified vector Returns most positive value in vector Returns statistical mean of all values in vector Returns mean of data in given range Opens dialog for specifying graph measurements Opens a dialog box with a message and user op tions Returns substring of the given string Returns min of two vectors Returns index to minimum input value Returns locations of minima of specified vector Returns most negative value in vector Returns an expression to access simulation vector data Spline based fit to given data Creates a vector of consecutively increasing val ues Returns TRUE if any install
130. may be pasted with the exception of text and pictures into the schematic and symbol editors EditPin EditPin name new pin name symbol name pin number Edit a pin name of a symbol in the currently installed symbol library Parameters name New pin name for symbol pin This may not contain spaces symbol name Internal name of symbol owning the pin to be edited pin number Number of pin to be edited EndAllInteractions EndAllInteractions EndSym EndSym EndSym is a Symbol Definition Command All symbol definitions must end with this command and begin with the command CreateSym page 454 See Also 474 i o SIMetrix SIMPLIS Script Reference Manual Schematic Symbol Scription Definition on page 564 Execute Execute echo command Run the script or command command Scripts are usually run by simply entering their name in the same way as a command is entered However the script is executed slightly differently if run using the Execute command If a script is called from another script in the normal way the called script is read in and parsed before the main script is executed If the Execute command is used the called script is not read in until and unless the Execute command is actually executed This has two main applications 1 The name of the called script is not known initially for example if its selected from a file dialog box 2 The called script is very long and is not always called by the calling sc
131. modified status across all windows Arguments No arguments Returns Return type real Number of editors that are modified WM_ GetPrimaryWindowName Returns the name of the primary window Arguments No arguments Returns Return type string The name of the primary window 401 SIMetrix SIMPLIS Script Reference Manual WM_ GetSystemW idgetSessionInfo Returns a single line string for each system widget that can be used to restore itself Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1 The window name as given by the function WM_ Get WindowNames page 403 Returns Return type string array Each element is a string that can be used to restore the widget WM_ GetSystemW idgetsLayout Returns layout information for the system widgets that can be used to restore the positioning within the window Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1 The window name as given by the function WM_ Get WindowNames page 403 Returns Return type string Layout information for the system widgets as a single string WM_ Get WindowGeometry Returns window geometry information that can be used to restore the size and position of the chosen window 402 i a l SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1
132. named nets noDescend Netlister does not descend into hierarchy and processes items at the top level only noOutput If specified no netlist output is generated The net names attached to wires are updated nopinnames If specified the pinnames specifier is not output for X devices The pinnames specifier is proprietary to SIMetrix and is not supported by other simulators Use this option if you are creating the netlist for another purpose e g to input to an LVS program num If specified a SPICE 2 compatible netlist using node numbers is created SIMetrix SIMPLIS Script Reference Manual paramsSeparator path plain selSubOut sep simplis sort subckt template top wire Template filename NewAnnotation If specified the netlist operation will be performed on the schematic at the specified file system path If the specified schematic is currently open the netlist generated will reflect the displayed version rather than the contents of the file Equivalent to noPinnames top lang none May be a single character or none Default is To comply with SPICE syntax each device line starts with a letter that identifies the type of device Usually this letter is determined by the MODEL property If the component reference of the device does not begin with the correct letter it is prefixed with the correct letter followed by the character specified by this option Specify this if cr
133. number of entries in the header The reference is the x data e g time or frequency 568 SIMetrix SIMPLIS Script Reference Manual Example Time 0 1e 09 2e 09 4e 09 8e 09 1 6e 3 2e 6 4e 1e 07 1 064 Voltagel Voltage2 14 5396 14 6916 14 5397 14 6917 14 5398 14 6917 14 54 14 6917 14 5408 14 6911 08 14 5439 14 688 08 14 5555 14 6766 08 14 5909 14 641 14 6404 14 5905 e 07 14 6483 14 5821 Tf the above was read in as a text file using OpenGroup text a new group called textn where n is a number would be generated The group would contain three vectors called Time Voltagel and Voltage2 The vectors Voltagel and Voltage2 would have a reference of Time Time itself would not have a reference To read in complex values enclose the real and imaginary parts in parentheses and separate with a comma Frequ 1000 1004 1009 1013 1018 1023 1028 1032 1037 1042 1047 1051 E g ency VOUT 5 94260997 0 002837811 61579 5 94260997 0 00285091 252886 911386 591388 292992 016298 761406 528416 317429 128548 961874 INN ON OA ON ON OA INO 94260996 94260995 94260994 94260993 94260992 94260991 9426099 94260989 94260988 5 5 5 5 5 5 5 5 5 5 94260987 Graph Objects Overview 0 002864069 0 002877289 0 00289057 0 002903912 0 002917316 0 002930782 0 00294
134. of course always 1 but the value is in fact ignored Argument 3 Real array of secondary turns ratios relative to primary 1 Argument 4 If set to nonind the box design will that used for non inductive transformers These do not show inductance related parameters Returns Return type real array The function returns the settings selected by the user in a single real array with the same format as the three arguments concatenated together If the user selects Cancel the function returns an empty vector SIMetrix SIMPLIS Script Reference Manual DefineLaplaceDialog Opens a dialog box to define a Laplace transfer function The argument is a string array of length 5 that defines the initial settings The meaning of each element is as follows Index Description 0 Laplace expression contents of Define output using s variable box 1 Device type O Transfer function 1 Impedance V I 2 Admittance I V 2 Input type O Single ended voltage 1 Single ended current 2 Differential voltage 3 Differential current 3 Output type O Single ended voltage 1 Single ended current 2 Differential voltage 3 Differential current 4 Frequency scale factor Arguments Number Type Compulsory Default Description 1 string array Yes initial settings Returns Return type string array The function returns a string array of length 5 with the same format as the argument described above If the user sele
135. one graph win dow open GraphCursorOn TRUE when graph cursors are switched on GraphObjectSelected TRUE if any graph annotation object such as a legend box is currently selected CurvesSelected TRUE if any curves are selected LiveMode TRUE when a command has not com pleted Never Always FALSE i e menu permanently dis abled These values can be combined with the operators amp amp logical AND logical OR equals l not equal NOT Parentheses may also be used Note that this expression is not related to vector expressions or the expressions that can be used in netlists or the command line Expressions enclosed in curly braces may also be used Such expres sions may contain any script expression to make customised menu enables Care should be taken when using this feature and it should be used sparingly Expressions can take a long time to evaluate and this will lead to sluggish menu activation response SIMetrix SIMPLIS Script Reference Manual Notes You can use DefMenu to redefine an existing menu In this situation the position of the menu will not change but the command it executes and any shortcut key can be altered Note that menuname is not case sensitive so if an existing menu exists the existing menu will be modified This allows filenames to be used for menu names Note that it isn t possible to add or remove a top level main menu definition while the window is open For schematic graph and symbol e
136. only E g a single TRAN or AC but not both Also do not add OP lines to the netlist Linked Run Example First run Run sweep start label Run 1 netlist net k save group name Let grp1 Groups 0 Changes to netlist second run Run sweep continue label Run 2 append grpi netlist net Changes to netlist third run Run sweep continue label Run 3 append grp1i netlist net Changes to netlist fourth and final run Run sweep finish label Run 4 append grp1 netlist net RunAsync RunAsync netlist datafile Spawns a new simulator process and runs specified netlist RunAsync has the benefit over Run page 519 in that it is possible to carry on working in the front end normally while the simulation runs in the background The disadvantage is that the asynchronous process cannot communicate with the front end This means that incremental graph updates are not possible and the data for the simulation needs to be manually loaded after the simulation is complete To load the data use the OpenGroup page 498 command Parameters netlist Path to simulation netlist datafile Path to data file If omitted data will be saved to a temporary file in the temporary data directory RunCurrentScript RunCurrentScript Runs the script currently open in the text editor The script must have been opened using the OpenScript on page 502 command created with the NewScript on page 494 co
137. or Off Time values for The timing edges are found from this vector using a threshold of mamma parate For this reason it is important that the vector have a uniform amplitude and is noise free around the trigger threshold Argument 2 A pre defined measurement function to make one of e frequency e period e duty cycle e on time e off time Argument 3 Determines the type of return curve one of e stepped e smooth Argument 4 Determines the edges used to process the input vector one of e 1 Falling edges e 1 Rising edges e 0 Both Rising and Falling Edges Returns Return type real array A real vector of the measured values from the input vector with reference values according to the third argument The return vector is formatted to be plotted directly on the waveform viewer SIMetrix SIMPLIS Script Reference Manual Example A call to PerCycleTiming Gate frequency will generate a vector which when plotted on the waveform viewer appears like timing Freq kHz uSecs 5uSecs div PerCycleValue Processes the input vector measuring Minimum Maximum Mean Peak to Peak or the RMS value of the input vector during time intervals generated by the timing vector The returned vector contains the measured value of the input vector such as the Mean value plotted against the timing vector x axis value for example time The return vector is either stepped or smooth A
138. output file string file the replacement text supplied in index 8 is applied to the end of the file name before the ex tension This occurs when the user selects a file using the file browser selection button ext the replacement text supplied in index 8 is applied to the end of the file extension This oc curs when the user selects a file using the file browser selection button 7 replacement text for argument 6 Returns Return type string array The function returns a string array of length 4 The return is in this order Index Description 0 Input file name 1 Output file name 2 Description text 3 Checkbox state If the user selects Cancel the function returns an empty vector UD Alias of Distribution page 102 Arguments Number Type Compulsory Default Description 1 real Yes Tolerance 2 real array Yes Distribution definition 387 SIMetrix SIMPLIS Script Reference Manual Returns Return type real Unif Returns a random number with a uniform distribution This function is intended to be used for SIMPLIS Monte Carlo analyses and would typically be used in device value expressions This function is only available in the Simulator process and cannot be called from scripts running in the context of the front end The function is only active when used by the netlist pre processor with Monte Carlo analysis enabled When used in other contexts the function returns 1 0 Arguments Number Type Compulsory
139. output in the form of a nodeset command which can be read back in directly Only node voltages are output if this switch is specified Otherwise currents in voltage sources and inductors are also output filename File where output is written Notes This command is intended as an aid to DC operating point convergence Sometimes the de oper ating point solution is known from a previous run but took a long time to calculate By applying the known solution voltages as nodesets prior to the operating point solution the new DC bias point will be found much more rapidly The method is tolerant of minor changes to the circuit The old solution may not be exact but if it is close this may be sufficient for the new solution to be found quickly If SaveRhs is executed after an AC analysis the values output will be the real part only SaveSnapShot SaveSnapShot Saves the current state of a transient analysis to a snapshot file This can be retrieved later to initialise an AC analysis For more information on snapshots see User s Manual Analysis Mod es Transient Analysis Transient Snapshots and Simulator Reference Manual Command Refer ence TRAN Snapshots SaveSymbol SaveSymbol comp file filename lib lib symbol name flags flags symbol name symbol description catalog Save a symbol to a library or as a component Source may be the current symbol editor symbol or a specified symbol in the global library Pa
140. page 347 for details Get ConfigLoc Returns the location of the application s configuration settings In versions prior to version 5 this would be in one of the following forms REG registry_root_pathname OR PATH inifile_pathname If the first form is returned the settings are stored in the registry The path of the registry key is HKEY_CURRENT_USER registry_root_pathname If the second form is returned the settings are stored in a file with full path equal to inifile_pathname From version 5 the registry is no longer used for storing settings so only the second of the two forms will ever be returned The return value from GetConfigLoc can be used directly as the value of the config_location switch at the simulator SIM EXE command line See the Running the Simulator chapter in the Simulator Reference Manual for more details Arguments No arguments Returns Return type string array Get ConnectedPins Function returns instance and pin name for all pins connected to net at specified point Results are sorted according to the number of pins on owner instance Arguments Number Type Compulsory Default Description 1 real array Yes schematic location 2 string No ref identifying property 3 string No pinname pin number of pin name 158 SIMetrix SIMPLIS Script Reference Manual Argument 1 Specifies a point on the schematic that identifies a net This could be returned by the WirePoints pag
141. recent analysis The argument may be any one of the option names defined for the OPTIONS control E g GetSimulatorOption RELTOL will return the value of RELTOL for the most recent run If the option value was not explicitly specified in a OPTIONS control its default value will be returned If no simulation has been run this function will return an empty string Arguments Number Type Compulsory Default Description 1 string Yes Option name Returns Return type string GetSimulatorOptionInfo Returns type and default value of a simulator option setting Arguments Number Type Compulsory Default Description 1 string Yes option name Returns Return type string array Array of strings providing the following information Index Description 0 Option name 1 Type can be REAL INTEGER BOOL STRING or UNKNOWN 2 Default value Notes This function differs from GetSimulatorOption page 214 in that it returns information about an option setting independent of any simulation GetSimulatorOption page 214 returns the value an option was set to in the most recent simulation 214 SIMetrix SIMPLIS Script Reference Manual See Also GetSimulatorOptions page 215 GetSimulatorOption page 214 GetSimulatorOptions Return list of simulator options Arguments Number Type Compulsory Default Description 1 string No Output option Argument 1 Can optionally be set to de
142. results will be stored in the users options file Input argument is a list of strings each line defines a style in Name LineType Line Thickness LineColour Parameters style info A list of string defining each style per string UpdateTitleBlock UpdateTitleBlock company company name title title name author author name loc x y Updates the content of a title block Uses the currently selected schematic editor with the selected title block Parameters author Updated author name company Updated company name date Updated date string use auto for assigning the date automatically when the schematic is saved force Use this to force selection of a title block This will cause the first title block it comes across to be used Use this if its possible no title block will be selected for example operating on a file that has been opened by a script call layout Updated layout either Horizontal or Vertical logo Updated logo image filename notes Updated notes Use backslash n to mark new lines within the text title Updated title updategiven Flag that will force an update of only those elements that are defined in the command call All other items use the values as they are currently version Updated version string use auto for assigning the version number automatically when the schematic is saved ViewFile ViewFile file name SIMetrix SIMPLIS Script Reference Manual Opens a rea
143. run a script which interpolate the data if it detects that the results are unevenly spaced Use of these menus does not require special consideration by the user Field Function provides bit access to integers Returns the decimal value of a binary number composed from the binary representation of argument 1 between the bit numbers defined in arguments 2 and 3 Eg Field 100 1 3 2 100 decimal 1100100 binary bits 1 to 3 from right i e least significant 010 binary 2 Field is useful for cracking the individual bits used for symbol attribute flags See Attribute Flags in the Prop command on page 510 Arguments Number Type Compulsory Default Description 1 real Yes value 2 real Yes first bit 3 real Yes second bit 139 SIMetrix SIMPLIS Script Reference Manual Returns Return type real FilterEditMenu Filters a menu list to return only menu definitions that are actually displayed Arguments Number Type Compulsory Default Description 1 string Yes Menu definition list Argument 1 The menu definition list as given by global menusnapshot Returns Return type string array Same as the input but with entries removed for menus that are not displayed but rather form menus that are built up FilterFile UNSUPPORTED See page 26 for more information Processes a file specified by arg 1 and returns a string array containing any lines in the file that start with any of
144. script command Edits the property of a schematic instance Template script command Sets the template value Comments highlighted lines in the selected text editor Disables file watcher for current text editor Enables file watcher for current text editor 422 SIMetrix SIMPLIS Script Reference Manual Command Name Description Text EditorFind TextEditorFindNext Text EditorGoToLine Text Editor UncommentLines Text Win Title TitleSchem Trace UndoGraphZoom neroupSelected nHighlightCurves nLet nprotect nselect nSet pdateAllSymbols pdateAnnotationText pdateDefaultStyle pdateGlobalStyle cE pdateProperties pdateRunningDialog pdateStyleInfo pdateSystemStyleInfo U U UpdateSymbol U U pdateTitleBlock ViewFile WebOpen Wire WireMode Displays the find pop up window for the selected text editor Triggers a find next event on the current text ed itor Moves the cursor to the given line in the text editor Uncomments highlighted lines in the selected text editor Show hide toggle schematic text window Change title of graph or schematic Sets the title of the current schematic Define trace live graphing during simulation Restore previous graph view area Ungroups selected schematic elements Unhighlights all curves Delete variable Unprotect and select all protected schematic in stances Unselect all schematic instances Delete optio
145. selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Argument 2 Property value to identify instance Along with parameter 1 if these arguments are not supplied the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Argument 3 If set to absolute the values returned will be relative to a fixed origin on the schematic Otherwise they will be relative to the origin of the instance The origin of an instance can be determined using the function InstPoints page 248 Argument 4 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type real array GetInstsAtPoint Functions finds the instances with pins at a specified point and returns a string array to identify them The return value is a string array of length 2 times the number of pins at the specified point The first value in each pair
146. some functions See GetInternalDeviceName on page 186 for full details The user model name is the name of a model parameter set defined using MODEL E g Q2N2222 Important this function only works for models used by the current simulation That is you must run or check a simulation on a netlist that uses the specified model before calling this function 196 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Model name Returns Return type string Get ModifiedStatus Returns whether the specified schematic has been modified Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type real GetNamedSymbolPins Returns the names for all pins of the specified symbol or hierarchical component Arguments Number Type Compulsory Default Description 1 string Yes Symbol name or component path 2 string No symbol Options Argument 1 Internal symbol name This is the name used internally to reference the symbol and should not be confused with the user name which is usually displayed by the user interface The symbol must be present in a curre
147. specified by a bounding rectangle described by the first four arguments The last four arguments describe two lines drawn from the centre of the ellipse which specify the start and end of the arc The arc is drawn anti clockwise Note that it is better to define a complete 360 degree circle or ellipse as two 180 degree arcs 360 degree circles where the start and end are coincident or near coincident do not always work reliably with some printer drivers See Also Schematic Symbol Script Definition on page 564 AddCirc AddCirc x org y org radius AddCirc is a Symbol Definition Command Creates a circle Parameters 2 OTgY x co ordinate of circle centre y org y co ordinate of circle centre radius radius of circle 429 SIMetrix SIMPLIS Script Reference Manual AddCurveMarker AddCurveMarker curve id division x position y position label length angle Adds a curve marker to the currently selected graph sheet A curve marker is a graph annotation object and its purpose is to label a curve for the purposes of identification or to highlight a feature See Graph Objects on page 569 for more information Parameters curve id division x position y position label length angle Id for curve to which marker will be attached Division of curve if curve id refers to a curve group created by a multi step run Divisions are numbered from 0 up to 1 minus the number of curves in the group For
148. stated by this argument Argument 4 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns the property flags for all applicable properties Each row of the resulting array will be a different element s property flag Example The following would return all of the flags for the ref property with the selected schematic for elements that have the property MODEL set to X PropFlagsAll ref model X See Also PropFlagsAnnotations on page 306 PropFlagsWires on page 307 PropFlagsAnnotations Returns the flags for the requested property This will search selected annotations only within a schematic There are optional filters for choosing elements with a particular property or property and value combination along with options to select a specific schematic 306 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Property name to retrieve flags for 2 string No Filter property name string No Filter property value 4 real No 1 Schematic ID Argument 1 The name of the property that we are returning the flags for Argument 2 If set will only select elements that have this property in them Argument 3 If set will only
149. stepped return vector will have vertical discontinuities at the beginning and end of timing vector period A smooth return vector will have a single data point per input vector period located at the mid point of the input vector period Argument 4 specifies the output curve type with the default being stepped The stepped return vector will change value only at the edges detected in the input vector The value will be constant during the entire period A smooth input vector will have a single data point at the mid point of the input vector period The points will be connected resulting in a smooth curve from one period to the next Argument 5 specifies edge direction If set to 0 either direction will be accepted If set to 1 only positive edges will be detected and if set to 1 only negative edges will be detected This argument is only used for the period and frequency measurements All other measurements will be processed with the Direction argument set to 1 indicating positive edges SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes Input vector 2 real array Yes Input vector 3 string Yes Measurement to make 4 string No stepped Type of return curve 5 real No 1 Direction Argument 1 The vector to measure the Minimum Maximum Mean Peak to Peak or the RMS values for The function finds the timing periods based on the timing vector passed as the second argument Ar
150. store the colour of the object in the form rrggbb Default is GraphColourFreeText font Name of font object to be used for text object This must with the CreateFont command See CreateFont page 452 for details Default is Graph Free Text text The text to be displayed T pos x co ordinate of the text in view units See Graph Co ordinate Sys tems on page 580 Default 0 5 Y pos y co ordinate of the text in view units See Graph Co ordinate Sys tems on page 580 Default 0 5 AddGlobalStyle AddGlobalStyle name lineType type lineColour colour lineThickness thickness font Name name fontSize size fontColour colour italics bold overline underline propertyStyle Adds an additional global style to the available styles This will overwrite any styles with the same name unless the nooverride flag is set Parameters bold Bold font fontColour As an AABGGRR value fontName Font family name 432 SIMetrix SIMPLIS Script Reference Manual fontSize italics lineColour lineThickness lineType nooverride overline propertyStyle underline name A number Italic font As an AABBGGRR value Ox0Off00f for blue 255 green 0 red 255 A number Options are Solid Dash Dot DashDot DashDotDot Use this to ensure that the style is only added if it does not already exist as a global style Overline the text Font should appear in the Property style options drop dow
151. success Operation successful failed Operation failed incomplete Operation partially completed some files were not copied notempty Target already exists and was not empty sourcenotexist Source does not exist unknown Unknown error CopyURL Copies a file specified by a URL from one location to another addresses prefix http addresses prefix file The URL may specify HTTP Arguments Number Type Compulsory Default Description 1 string Yes From URL file 2 string Yes To URL file 3 string No progress options Argument 1 URL of source file Argument 2 URL of destination file Argument 3 Options can be progress or noprogress If set to progress the default a box will display with a bar showing the progress of the file transfer Otherwise no such box will display 76 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array String array of length 2 First element will be one of the values shown in the following table Id Description IncorrectLogin A username and password are required for this URL HostNotFound The specified host in the URL could not be found This error can also occur if there is no Internet connection Unexpected2 This is an internal error that should not occur MkdirError Could not create target directory RemoveError This is an internal error that should not occur RenameError This is an internal error that should not occur GetEr
152. symbols in the specified catalog of the global library will be created This overrides al11 sortProps If specified all visible properties are ordered alphabetically in the output script Properties are defined with the command AddProp page 438 filename Path of file to be written symbol name Name of symbol to be scripted Any number may be specified If all or catalog are specified this argument will be ignored If they are not this argument becomes compulsory MakeTree MakeTree pathname Creates the specified directory path Unlike the MD command MakeTree will create any subdi rectories required to make the whole path MCD MCD directory name Makes a directory and sets it as current same as MD page 486 followed by Cd page 445 Parameters directory name Name of directory to be created MD MD directory name Creates a new directory MD is similar to the DOS MD and MKDIR commands Parameters directory name Name of directory to be created 486 SIMetrix SIMPLIS Script Reference Manual Message Message message Displays a message in the status window of the currently selected schematic This will temporarily overwrite status information at the base of the schematic until Message is called with no arguments Parameters message Text to be displayed If omitted status window returns to normal view MessageBox MessageBox message caption Displays pop up message box with the specified mess
153. the SIMetrix Dialog Designer supplied with SIMetrix from version 5 3 SIMetrix Dialog Designer is derived from a commericial tool developed by Trolltech AS who supply us with the Qt library used for SIMetrix UI development Trolltech have kindly given us permission to ship this tool with SIMetrix Note that SIMetrix Dialog Designer is a stripped down version of the full commercial product Currently we supply only a Windows version of this tool but the dialogs generated will work with Linux versions of SIMetrix Starting SIMetrix Dialog Designer The tool is installed with the rest of the SIMetrix binaries and is called designer exe Use windows explorer to locate designer exe in the bin folder under the SIMetrix root The SIMetrix installer does not create a short cut to this but you may create one yourself if required SIMetrix SIMPLIS Script Reference Manual Developing Dialogs The basic procedure is 1 Start Designer 2 Select Dialog under New File Project 3 Set the form s name property to the required name of the SIMetrix function 4 Edit caption property as required 5 Add widgets as required See next section for further details See also Using Geometry Management on page 594 6 Save result as an sxdlg file to the directory support dialogs under SIMetrix root Windows or usr local share dialogs Linux This is the default location for user dialogs There is an option se
154. the above strings are found in the property they will be replaced by their value lt version gt will be replaced by an integer that is incremented each time the schematic is saved lt date gt and lt time gt will be replaced by the date and time of the schematic file respectively The final value has to be entered as a decimal value Note that attributes are usually edited using the popup menu Edit Properties dialog Example To change a R3 s component reference to R4 i e change its ref property from R3 to R4 select R3 then enter Prop ref R4 Protect Protect Protects selected schematic components Protected components cannot be selected This command is used for schematic worksheets so that they remain in a fixed position The Unprotect command removes protected status Quit Quit Terminates SIMetrix If there are any modified schematics open the user will be prompted to save them first RD RD directory name Remove a directory Rd is similar to the DOS RD and RMDIR commands SIMetrix SIMPLIS Script Reference Manual Parameters directory name Name of directory to be removed ReadLogicCompatibility ReadLogicCompatibility filename Reads a file to define the compatibility relationship between logic families For an example of a compatibility table see the file COMPAT TXT which you will find in the CD in directory Docs Manuals Supporting Files This file is actually identical to the built in definition
155. the currently selected graph window if any OpenGroup OpenGroup text spice2 spice3 purge overwrite forcereadopen deleteonclose ign filename Reads in a data file and creates a new Group If text is not specified then the name of the group will be that with which it was stored provided the name does not conflict with an existing group If there is a conflict the name will be modified to be unique unless overwrite is specified in which case the original group will be destroyed If text is specified then the group will be named textn where n is chosen to make the name unique Parameters append deleteonclose If specified the file will be marked as volatile and will be deleted once it is no longer needed forcereadopen If specified read lock is ignored The read lock prevents a data file from being opened for read and would typically be set when the file is being written out during a simulation This switch overrides the lock ign overwrite Forces existing group of the same name to be overwritten If not specified the group being read in will be renamed if a group of the same name already exists SIMetrix SIMPLIS Script Reference Manual purge If specified the loaded data group will be treated like a normal simu lation group and will be automatically deleted after a specified num ber of runs Otherwise it will not be deleted unless the user does so explicitly e g by using the menu Simulator
156. the curve s ID only Curve Label Curve YUnit displays the curve name and y axis units X position of box in view units See Graph Coordinate System on page 580 If the value is 1 0 or greater the box will be placed such that its left hand edge is to the right of the graph s grid area Default 0 Y position of box in view units See Graph Coordinate System on page 580 If the value is 1 0 or greater the box will be placed such that its bottom edge is above the graph s grid area Default 1 Physical width of box in mm For CRT monitors this won t be exact They are typically assumed to be 75 pixels inch so 1mm is approx 3 pixels Note that this value will be ignored if autowidth is specified Default 50 Physical height of box in mm See notes above wrt CRT monitors AddLegendProp Adds a property to a graph legend Legend properties are generally used to display measurement AddLegendProp curveld property name property value information for a curve Their name and value is displayed below a curve s legend or label Parameters curveld property name property value Example The curve ID Curve id is returned by the functions GetSelected Curves page 207 GetAxisCurves page 153 and GetAllCurves page 150 Name of property May be any string and may contain spaces Value of property May be any string and may contain spaces The following iterates through selected curves an
157. the result Argument 2 If supplied and is the part number of a device included in arg 1 that device will be selected Argument 3 contains a list of model names that will appear in the User Models category These will also appear in the Recently Installed Models category if the model was installed within the last 30 days or other duration defined by the NewModelLifetime option setting Returns Return type string array Return value is a string array of length 8 containing the value of each field of the selected device or an empty vector if cancelled Select Dialog Opens a dialog box containing a list box The list box is filled with string items supplied in argument 2 The return value is the index or indexes of the items in the list box selected by the user This function is used by a number of the standard menus SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes Options 2 string array Yes List box entries Argument 1 There are a number of options available and these are specified in argument 1 This is an array of strings of length up to 7 The meaning of each element is as follows Index Possible values Description 0 Dialog box caption 1 Message above list box 2 Multiple Single If single only one item may be selected Otherwise any number of items can be selected 3 Sorted If so
158. to be examined If only argument 2 is specified then all instances on the specified schematic that possess that property will be used If argument 3 is also present then the instance name and value must match argument 2 and 3 respectively If neither are present the selected instances will be used Argument 4 See argument 3 Returns Return type string array The function returns a string array of length equal to the number of instances identified by argu ments 2 and 3 Each element will hold a value for the property specified in argument 1 Note that this function is analogous to the functions PropFlags2 page 304 and SymbolNames page 370 and for identical values of arguments 3 and 4 will return an array of the same length and in the same order The function will return an empty vector if no instances match arguments 3 and 4 This differs from PropValues which returns an empty string in this situation The behaviour of PropValues2 is much more convenient and it is recommended that this is used in all new scripts PropValues2 will also return an empty vector if the specified schematic could not be found 311 SIMetrix SIMPLIS Script Reference Manual PropValuesAll Returns the values for the requested property This will search all selected elements within a schematic There are optional filters for choosing elements with a particular property or property and value combination along with options to select a specific schematic
159. to create a script NewVerilogA on page 495 to create a Verilog A source file NewVerilogHDL on page 495 to create a Verilog HDL source file NewFileView Creates a new File View and attaches it to the current window If a File View already exists in the window this command does nothing 491 SIMetrix SIMPLIS Script Reference Manual Parameters restore Identifies this is part of a restore session call argument is the object name NewGraphWindow NewGraphWindow window title Creates a new graph window to which new graphs may be directed NewGrid NewGrid Creates a new grid See User s Manual Graphs Probes and Data Analysis Graph Layout for more information on axes and grids NewLabel NewLabel label text italics bold font font family size point size style style name repeating loc x y Adds a new unplaced text label to a schematic This is an interactive command with the label being initially attached to the cursor unless the loc flag is set If a style is given that style is applied If bold italics size or font are given a new style is created using those If style is given as well as a font size bold or italics option the given options will override the existing style and a new style will be created for this element Parameters bold Uses bold font Sets the font family argument is the name of the font family to use italics Uses italics loc If set places the
160. to process Must have a reference e g x values Argument 2 Value on x axis where the start of the curve area is located Argument 3 Value on x axis where the end of the curve area is located Returns Return type real Area under curve SIMetrix SIMPLIS Script Reference Manual Example arg Returns the phase of the argument in degrees Unlike the functions phase page 297 and phase_rad page 297 this function wraps from 180 to 180 degrees See arg_rad page 63 function below for a version that returns phase in radians Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the arc tangent of the argument Result is in degrees arg rad Returns the phase of the argument in radians Unlike the functions phase page 297 and phase_rad page 297 this function wraps from 1 to 7 radians See arg page 63 function above for a version that returns phase in degrees Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the arc tangent of the argument Result is in radians Ascii Returns the ASCII code for the first letter of the argument Arguments Number Type Compulsory Default Description 1 string Yes SIMetrix SIMPLIS Script Reference Manual Returns Return type real AssociateModel Special purpose fun
161. to the button to a component toolbar simply select schematic menu View Configure Toolbar You should see Place Diffused Resistor on the left hand side Select and press Add to add to the toolbar then use the up down buttons to choose a suitable position Its a little harder to edit non component toolbars as there is currently no GUI to perform the operation in step 4 above For pre defined toolbars you can obtain the current specification using the GetOption page 201 function and then add your new button to the resulting value at an appropriate location Then use the Set command to redefine the toolbar See Modifying Existing Toolbars and Buttons on page 586 for more details Creating New Toolbars To create a completely new toolbar use the command CreateToolBar page 454 This will create an empty toolbar To add buttons to a new toolbar you must use the command DefineToolBar page 459 You can add both pre defined and user defined buttons to a custom toolbar Pre defined Buttons The following table lists all the buttons that are pre defined All of these buttons may be redefined if required The bitmaps are embedded in the SIMetrix binary but can also be found on the install CD in the directory script images Button name Description Bitmap AddCurve Add Curve newcurve bmp AddFourier Fourier newfourier bmp BiasV Place Bias Marker biasv bmp CalcAveragePower Display Average Power Cycle avg bmp Calc
162. top left of the box This cannot be edited by the user SIMetrix SIMPLIS Script Reference Manual Argument 2 Initialises the text location and property attributes using the property flag value For details on the meaning of flags values see Attribute Flags in the Prop command on page 510 Argument 3 Argument initialises the Value box Returns Return type string array String array of length 2 providing the users settings or empty vector if Cancel is pressed Index Description 0 Flags value 1 Property value EditReactiveDialog Opens a dialog box designed to edit inductors and capacitors Arguments Number Type Compulsory Default Description 1 string array Yes Initial values 2 string Yes Options 3 string No Parameter names 4 string No Parameter values Argument 1 First element is the initial value of device Second element is the initial condition Argument 2 Three element string array Each field has the meaning defined in the following table Index Description 0 Caption for value group box 1 Initial range Possible values E6 E12 E24 2 Type of device Possible values capacitor inductor This controls the Initial condition group box design Initial condition enabled for operating point check box true or false 4 Initial condition enabled fro transient check box true or false 120 SIMetrix SIMPLIS Script Reference Ma
163. tree Arguments Number Type Compulsory Default Description 1 string Yes directory to delete Returns Return type Single string value providing status of operation as follows Value Description success Operation successful failed Operation failed incomplete Operation partially completed some files were not deleted sourcenotexist Source does not exist unknown Unknown error SIMetrix SIMPLIS Script Reference Manual Example Descend Directories Returns all directories under the specified directory DescendDirectories recurses through all sub directories including those pointed to by symbolic links DescendDirectories only returns directory names It does not return files Use the ListDirectory page 258 function to return the files in a directory Arguments Number Type Compulsory Default Description 1 string Yes Directory Returns Return type string array DescendHierarchy Descends through the hierarchy from the current schematic and collects each distinct schematic in use The result is a list of schematic path names Each path name is accompanied by a list of hierarchy references where that schematic is used Arguments Number Type Compulsory Default Description 1 string No Ref Property used to report where used references real No 1 Schematic ID 3 string options Argument 1 Name of property to be used to report where used references Each entry in the return val
164. type i e real complex or string as the other elements in the vector Vectors like other variables may also contain strings or complex numbers but all the elements must be the same type SIMetrix SIMPLIS Script Reference Manual Scope of Variables Global Variables Variables created using the Let page 482 command are only available within the script where the Let command was executed The variable is destroyed when the script is completed and it is not accessible to scripts that the script calls If however the Let command was called from the command line the variable is then global and is available to all scripts until it is explicitly deleted with the UnLet page 544 command If a global variable needs to be created within a script the variable name must be preceded by global For example Let global result 10 global result will be accessible by all scripts and from the command line Further it will be permanently available until explicitly deleted with UnLet After the variable has been created with the global prefix it can subsequently be omitted For example in Let global result 10 Show result Let result 11 Show result will display result 10 result 11 in the message window The variable result will be available to other scripts whereas if the global prefix had been left off it would not Although it is not necessary to include the global prefix except when first creating the variable it is nevertheles
165. with a comgroup specification is executed the command executed is stored This function retrieves the most recent with the specified comgroup value Notes Menus and buttons used for placing components on a schematic are defined using the comgroup value place So GetLastCommand place always returns the command used for the most recent place operation GetLastError Returns a string with one of three values signifying the status of the most recent command executed The command switches noerr and quiet see Command Switches on page 15 can be used to effectively disable non fatal errors This function allows customised action in the event of an error occurring For example if a simulation fails to converge the run command yields an error This function can be used to take appropriate action in these circumstances When a fatal error occurs the command will abort unconditionally and this function returns Fatal Arguments No arguments Returns Return type string Returns a string with one of three values signifying the status of the most recent command executed The three values are OR Command executed without error Error One or more errors occurred in the most recent command Fatal The most recent command was not recognised or the evaluation of a braced substi tution failed Get LegendProperties Returns either all legend property names or all legend property values for specifi
166. with the name TEMPLATESCRIPT and giving it a value that defines the path of the script If a full path isnaAZt given and we recommend that you donaAZt use a full path SIMetrix will search the directory where the netlist resides followed by the SCRIPT directory for the specified file If the file is not found no error message will be output and the device netlist line will be created as if no template script was defined 584 SIMetrix SIMPLIS Script Reference Manual When is the Template Script Called The template script is called for each instance just before its netlist entry is generated The REF property of the instance is passed to the script as an argument along with the name of the property used for the template The script controls the netlist output by calling the TemplateSet Value page 541 command The Template Script The script is passed two string arguments These are 1 The value of the REF property of the instance being processed 2 The name of the template property being used for that instance This is usually TEM PLATE but for SIMPLIS netlists it is usually SIMPLIS TEMPLATE There is also a netlist option to change the name of the template property There are two functions and two commands that are designed specifically for template scripts and indeed they cannot be used anywhere else The commands and functions are listed below The most important command is TemplateSetValue page 541 This is what you m
167. worthwhile improvement in performance over a linear search done using the Search page 336 function This is because of the function overhead in the script system See Also HashDelete page 235 HashSearch page 236 HashAdd page 234 HashDelete Delete a hash table Arguments Number Type Compulsory Default Description 1 real Yes Hash table id as return by HashCreate page 234 Returns Return type real If hash table exists return 1 0 otherwise returns 0 0 235 SIMetrix SIMPLIS Script Reference Manual See Also HashCreate page 234 HashSearch page 236 HashAdd page 234 HashSearch Search hash table for an item Arguments Number Type Compulsory Default Description 1 real Yes Hash table id as re turn by HashCreate page 234 2 string array Yes Keys to search 3 string No Empty string Empty tag Argument 2 This can be an array provided that the table was not defined as multiple on creation Returns Return type string array For non multiple tables return value has the same length as argument 2 Each element maps to the corresponding element in argument 2 For multiple tables the return value is a lit of all items that were found matching the search value See Also HashCreate page 234 HashDelete page 235 HashAdd page 234 HasLogSpacing Performs a simple test to determine whether the supplied vector is logarithmically spaced The return value is 1 0 if the vect
168. 0 00 2 ee ee 214 GetoimulatorOptions ss cn hee eae ee eee eee A ee hs 215 Getoimulatorstats i kek bbb oe OM ah deere go Aa ee A ee ek 215 Getoimulatorstatus sick send gid e bee hoe ee eee e e e Hele ee 216 Getsoalehinitions A e RE BETO EE ets a 217 GetSoaMaxMinResults a a a a a a 218 GetSoaOverloadResults 218 GetsoaResults rreh ar sistas ee ae ala ds Ge ee Ee eyes ee a 219 GetSymbolArclnfo 30 0 2 fk ee EEE hh eee EEE aa 219 GetSymbolBiles ss bio cease Gh doe eet ee ee ND A A 220 GetSymbollnifor sa y 42m anna e FoR GE Gt ae A Bla A Ales Be bas 220 GetSymbolOrigin 2 4 dedeg e Rot ak Da We EOS a aa ea 221 GetSymbolPropertyInfo e mirar EE we ee we a ee a 221 GetSymbolPropertyNames eaaa ee 222 GetSymbols 404 4 64 at lene tee dab eos ow we e RAB a aa 222 GetSystemInto 3 1 3 4 a ea eee te Wee a Ss g AO Bb bd doe lea ea as 223 Get TemprRile es 22 2 2 ave eS eA ee bee eee hw eee thn se eee 224 GetTextEditorlexta a e ode AN SS A Me bdo YS 224 Get Thread TIMES aa ioio do Qe aes Sg AL edie My ee es ee EN A ae 225 Get Mimerlito 2 ds 4 4 wag ane A ks HE RAS Re ae SE ES 225 GetTitleBlockInto mias Ds ee ee PS ee ee 226 Get ToolButtonss ee tat Aste ee Re eee ee OR hE dd Bo 226 Get UncPathi a ae ey ae ea ee es a a ae ee ae ai ai 227 GetUserFile iaa a rn e e RAB ee ad 227 GetVecStepParameter 2 2 0 ee 229 Get VeeStep Vals sistance Gina ers dl BA ee Dee ata Si ies eS 229 GetWidgetinto a a re A ade RR RA IIS 2
169. 0 Y axis label Axis Label setting for Y Axis group in empty Axis Labels sheet 21 Y axis units Axis Units setting for Y Axis group in Axis empty Labels sheet 22 Y expression Not used with this function 23 X expression Not used with this function SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default 24 Vector filter Not used with this function 25 Curve colour Colour of curve as an RGB value May empty be passed directly to the GRAPH colour parameter 26 All analyses disabled Disables all analyses for this probe 0 27 Physical Probe Type 28 Measurement type 29 Output type 30 Edge type 31 Probe type 32 AC power mode Returns Return type string array The function returns a string array with the same format as the argument If the user selects Cancel the function returns an empty vector EditPropertyDialog Opens a dialog box intended to edit a property in both the symbol and schematic editors Select the symbol editor s Property Pin Edit Property menu then double click on one of the items This will open this dialog box Arguments Number Type Compulsory Default Description 1 string Yes empty property name 2 string No 0 initial property flags 3 string No empty initial property value 4 string No option 5 string No empty font override style 6 string No empty available font override styles Argument 1 Specifies the property name and this is displayed at the
170. 00 200 100 D IREVI_P 0 0951626 0 904837 mV 0 20 40 60 80 100 Time uSecs 20uSecs div The coefficients used give a time constant of 10 the sample interval In the above the sample interval was 1uSec so giving a 10uSec time constant As can be seen a first order IIR filter has exactly the same response as an single pole RC network A general first order function is Yn TnCo Yn 1 1 SIMetrix SIMPLIS Script Reference Manual where cg 1 exp and c exp and 7 time constant and T sample interval The above example is simple but it is possible to construct much more complex filters using this function While it is also possible to place analog representations on the circuit being simulated use of the IIR function permits viewing of filtered waveforms after a simulation run has completed This is especially useful if the run took a long time to complete 1m Returns imaginary part of argument same as the function imag page 243 Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array Returns imaginary part of argument imag Returns imaginary part of argument same as the function im page 243 Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array Returns imaginary part of argument
171. 000 eee eee 551 WM_ProgressWindowClose aa a 551 WM_ProgressWindowCloseAll e 551 WM_ProgressWindowCreate ee ee 551 WM_ProgressWindowReport 2 2 2 0 2 a 552 WM_RevertToSaved rors sst a n eranan i a OE a E a e aa a T E a ga e a a aa 552 WM Undoc poi tia tt ot EA e Batic amp A eee tS eee Bee 552 WritelmportedModels 0 ee ee 553 RMLAdIJAN ADU sa a o 8a RR ta eae a geeks Rea eee a SESS 553 XMEAddElementr are o Gee GOD da tonite He 553 XML CIOS ss a oe on SSS ete aera es Blade bb A ee eee A td os E E EA 554 XMLGoUpLevel tipa ewe aa war ar are ee ee ale A Sa 554 XAMLNEW di fe io bo eee ee SA ee ee AREER REE ERG 554 XMLOpenHlement a azureus Ed Sea Pee ew a e RAK ae ee oS SS 554 XMLOpenFile oen ra edge e A dt 555 LOONE e de aa Mh i Ninth oat oak es Pe ar ty ar aaa a r he he A a e 555 Applications 556 User Interfac i iden eo ebb be oh he dee bE eee ee eee dh 556 User Defined Key and Menu Definitions e e e 556 Rearranging or Renaming the Standard Menus 556 Merit Shortcuts ze oror Sonya aie nis A ee bg Bide Ae a 557 Editing Schematic Component Values o o e 0000 557 Modifying Internal Scripts 2 ee 557 Custom Curve Analysis aa a 557 Adding New Functions e r res p pea i ei eioten e ee 558 measure measure_span Scripts e 558 An Example The Mean Function
172. 000 would place the left half of the image in the full page while 1000 0 1000 1000 would place the right half This allows the printing on multiple sheets Note that if values greater than 1000 or less than 0 are used part of the printed image will lie in the margins This provides a convenient overlap for multiple sheets SIMetrix SIMPLIS Script Reference Manual PrintSchematic PrintSchematic caption caption fixed grid size margin 1 t r b mono on Joff dim left dim top dim right dim bottom Prints the current schematic Parameters caption Caption printed at the bottom of the page fixed If specified fixed scaling will be used grid size is the size of a single grid square on the printed sheet in inches Otherwise the schematic scale will be chosen to fill the print area The scaling is isotropic That is the aspect ratio will be maintained margin Page margins in mm stated in the form left top right bottom mono If specified the graph will be printed in black and white dim left dim Dimensions and position of printed image on page Values are relative top dim right to page size less the specified margins in units equal to 1 1000 of the dim bottom page width height The default is 0 0 1000 1000 which would place the image to fill the entire area within the margins 0 500 1000 1000 would place the image at the bottom half of the page 0 0 2000 1000 would place the left half of the image in the ful
173. 279 319 SIMetrix SIMPLIS Script Reference Manual RadioSelect WidgetStackDialog Arguments No arguments Returns Return type Range Returns a vector which is a range of the input vector in argument 1 The range extends from the indexes specified by arguments 2 and 3 If argument 3 is not supplied the range extends to the end of the input vector If neither arguments 2 or 3 are supplied the input vector is returned unmodified See also the function Truncate page 383 Arguments Number Type Compulsory Default Description 1 real complex or string array Yes Vector 2 real No Start index 3 real No Vector length 1 End index Returns Return type matches argument 1 re Returns the real part of the complex argument Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array Returns the real part of the complex argument 320 SIMetrix SIMPLIS Script Reference Manual ReadClipboard Returns text contents of the windows clipboard Data is returned as one line per array element Arguments No arguments Returns Return type string array ReadConfigCollection Returns the contents of an entire section in the configuration file Note that only the values are returned not the names of the keys To get the names of the keys use the function ReadCon figSetting page 321 with an empty second argument Arguments Number Ty
174. 3 SelectSimplisAnalysis Opens SIMPLIS choose analysis dialog box This function reads and writes the schematic s F11 window directly Arguments No arguments Returns Return type real array The return value indicates how the user closed the box as follows as shown in the table Index Description 0 Ok pressed 1 Cancel pressed 2 Run pressed 3 No schematic open Dialog doesn t open in this case 345 SIMetrix SIMPLIS Script Reference Manual SelectSymbolDialog Opens the following dialog box allowing the user to select a schematic symbol from the symbol library Yi Select Symbol xj Symbols Analog Auto Created Symbols Connections Digital Jumpers Miscellaneous Mixed Mode Obsolete Opto Passives Capacitor AAA EE Infinite Capacitor Non linear an 1 nio Capacitor Subcircuit wiQuantity OO a p Pa a r ie ksh pen ead Capacitor Polarised European Style E ee Capacitor Polarised US Style e o CHR RR rr a Seve od eee a Conductor Nor linear nn ns Electrolytic Capacitor ladder model De ee ee Electrolytic Capacitor Level 1 3 Electrolytic Capacitor Level 4 5 0 ee A AAA Inductor Infinite pee Inductor Non linear Inductor Subcircuit wi Quantity e C a aaaaaa Inductor Table Lookup xl E Aa Internal name cap Cancel Arguments Number Type Compulsory Default Desc
175. 3 string array No Property types Returns Return type string array EditCurveMarker Dialog Opens a dialog intended for editing the characteristics of curve markers The Properties sheet behaves in the same way as the EditObjectPropertiesDialog page 113 func tion and is initialised by the functions arguments The Edit sheet allows the edit and display of certain properties as defined in the following table Property Name Affects Control Label Label 108 SIMetrix SIMPLIS Script Reference Manual Property Name Affects Control LabelJustification 1 o Nn OUA wn FF O Font Text Alignment box One of these values Automatic Left Bottom Centre Bottom Right Bottom Left Middle Centre Middle Right Middle Left Top Centre Top Right Top Font String defining font specification If any of the controls in the Edit sheet are changed the corresponding property values in the Properties sheet will reflect those changes and vice versa Arguments Number Type Compulsory Default Description 1 string array 2 string array 3 string array Yes Yes No Property names Property types Argument 2 Property values Returns Return type string array EditDeviceDialog Opens a dialog box used to select a device and optionally specify its parameters 109 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes options
176. 30 GetWindowNames aoaaa eee 230 Get RAAS a att be Societe Bowe eek eee Sete ead SS HE eae Oe Gas 231 GraphlmageCapture nee cea 2 bdo A e R a 231 Graphlimitsy e sot ot eee Oe cee ES A Seer dd 232 GioupDelayiicae o ape id ae Bs a oe A A alee aa 232 GYOUpS eea RRA Abie Reed Php eet ete ee GS Re RE ee nd Ske 233 GUIDO Hd ds A ee de GG Gee a e A LADA a 233 Hasta rs lla o fey cir ai once das 233 HasHAdd 2 2 ri A A ee a A AAA IS 234 HashUreade 0 a E A Sd ee ita da a a 234 Hash Deletes s y haa bd a ON ee OLE 235 Hashbearch ss bo droit A A e e ee eS 236 HasLogSpacide de rata dl ia a dd tee tee Mle a ida gh o 236 HasProperty anar iw e ee E a E DS De te ee 237 Haiveheatirers o a a a o A A ra SE 238 HavelnternalClipboardData 2 2 2 ee 238 HierarchyHighlighting ee 239 Highlighted Nets uo e ga ae a Ea a ae EAA AANE a 239 Histogram ss 4 ek RAR A MAAR ER SOY A RA AAA eR SSO 240 Toa aaa aaa a a 240 SIMetrix SIMPLIS Script Reference Manual Contents TEN ee ae He Be o mod My Mopar ee eee a ae oe SR Pe e de tan 241 IRo et od BS Oe BE ea hee dhe ees ee Re he hg a Se ee ee Oe 241 Ae oa bp Be Rod Shale a da a ee Ge BO ale 243 NMAC ea ee aot sa ai kok AN Ee bs me Ge ee ae eee Stal oia 243 InitRandormy 203 4 La O eee te tates oe oe He ee Moe fea 243 InputGr ph EI Cee a O AA IA TA 244 Inptitschemis sn DI A e eles 244 Instances 24 a e a a rs de IIA ds 245 InstNetst a A e a O id da 246 List Nets2s is cu
177. 34 elements containing the weighting coeficients from 10Hz to 20kHz The weighting coeificient vector can be used to calculate the weighted THD of a time domain vector using a FFT Note that the The weighting coefficients are defined in the IEC 61672 1 and IEC 60537 publications For further information see the externalreference href http Arguments Number Type Compulsory Default Description 1 String Yes The type of weighting to re turn Argument 1 Specifies the type of weighting one of e a A type weighting e b B type weighting e c C type weighting e d D type weighting The weighting coefficient argument is not case sensitive Returns Return type real array Vector of weighting coefficients with reference values from 10Hz to 20kHz TickCount Returns a time in seconds since current system was started Function may be used for timing measurement Arguments No arguments SIMetrix SIMPLIS Script Reference Manual Returns Return type real Time in seconds since current system was started Time Returns the current time in the format specified in control panel Arguments Number Type Compulsory Default Description 1 string No empty Options Returns Return type string ToLower Converts a string to all lower case Arguments Number Type Compulsory Default Description 1 string Yes Input string Returns Return type string The input string with all character
178. 431 0 0029579 0 002971553 0 002985269 Graph objects are the items displayed in a graph window These include curves axes cursors and the various objects used for annotation All graph objects possess a number of named properties all of which may be read and some may also be written Each graph object also has a unique id which is used to identify it A knowledge of the inner workings of graph objects will be useful if you wish to customise some of the annotation features provided by the waveform viewer However the interface is at a low level with much work carried out by internal scripts Consequently there is quite a steep learning curve to climb in order to make good use of the features available Object Types The following table lists all the available object types SIMetrix SIMPLIS Script Reference Manual Object Name Description Axis Axes and grids Crosshair Crosshair part of cursor CrosshairDimension Object used to dimension cursors Forms part of cursor Cannot be displayed on its own Curve Curve CurveMarker Marker used to annotate curves FreeText Free Text annotation object Displays unboxed text on graph Graph Graph sheet LegendBox Box enclosing LegendText objects LegendText Text objects used in legend boxes and linked to a displayed curve Text Box Box enclosing FreeText object Properties Properties are the most important aspect of graph objects Each type of graph object possesses a number of pr
179. 45 Cama e a goes do A al tia ta da A kal a de dk aM Se OS aL Ga ta 146 Gauss a oe SRG ES A cee e A Le hee bo eB cae ek oe ee oe 146 Gaussi e sites hs Mita dl of haltech oh Soke eS hice da ee Shee at ah A a ee Sioa ae aad gd of gh tte 147 Gauss Trine ute ihe OR ee as ee ee BA ee Oe e a E 148 GenPrint Dialog a oat rhe age eh ake eR eis pate a a eae nee Ee 148 GetActualPath 2 ha dower ee eee eh ee ee LL AAA A ee a a 150 Get AllCurtvyes oo MA Sid BA MN ORE EEE ERAS Dial BeBe 4 150 GetAllSimulatorDeviceS 2 2 26 e a ee E ea ek AAA 150 GetAllSymbolPropertyNames 1 0 020 000 ee e 151 GetAlYAX6s ra naan Hebb baa a oe eee eee bbe ae ede Qe PRET SG 151 SIMetrix SIMPLIS Script Reference Manual Contents GetAnalysisInfo Vela ype ea a E E AAA e 152 GetA alysislIMES a e e a eee ee Oe AA ea aa 153 GetAnnotation Texts e rere a a a a Boe SG da 153 GEbAXISCUEVES osa aa Gk RA Via a a a wale hie 153 Get Axis Limits 2 A a Ob tt Ia A NE 154 GebAsisT De ii A A a AA A A 154 Get Ass UM a o Ars A EA data 154 GetChildModulePorts cuarto a de ee is de EA 155 GetCodecNames 2 1 a a a 156 Get Colours Si o A AAA he te e BERENS A N a 156 GetColourspec s ed eine hie eye eee eh eee A A EE Eee YS 156 GetCompatiblePathName 0 00 0 02 ee 157 GetComponent Valle i por gow ee ead a DEAR EER eee EE Swe Ee a 157 GetConfighoe tia e ee a AAA Uh PRE o 158 GetConnectedPins 2 1 osoa pa a a a a ora e n a a a a aa a a e aaa 158 GetCoivergencelnfo
180. 48 SIMetrix SIMPLIS Script Reference Manual Returns Return type real array Returns real array of size 3 as defined by the table If no instance is identified by arguments 1 and 2 an empty value will be returned Index Description 0 X co ordinate 1 Y co ordinate 2 Orientation 0 to 7 Notes The co ordinates are those of the point defined to be at 0 0 in the symbol definition The scaling used is 120 points to one grid square Grid refers to snap grid This is the same as the visible grid for magnifications of 0 83 and higher Co ordinates are relative For a new schematic the zero point is at the top left corner of the window but this can change The orientation values are as follows Orientation value Description Normal as symbol def 90 deg clockwise 180 deg 270 deg clockwise Mirrored through y axis Mirrored through y axis 90 deg clock Mirrored through y axis 180 deg NO oT FP WY HO Mirrored through y axis 270 deg clock Note Mirror through x axis is equivalent to mirror through y with 180 rotation The values returned by this function can be used with the command Inst page 481 using the loc switch InstProps Returns an array of strings holding the names of all properties of an instance The functions PropValue page 309 or PropValues2 page 310 can be used to find values of these properties Arguments Number Type Compulsory Default Description 1 real No 1 Schem
181. A a A dd a 188 GetLegendProperties ee 188 GetLibraryModels s 4 40 a inia A EEE atc AAA eee 189 Getlicenselnto sanh 2 8 atea bd A ed owe OR A AR A eee a 190 Geticensestats aa a e a o aa BO 190 GebLine 4 4 4 GI ade A A a eee e E A eyes ee es 191 GetListSelected ee 191 GetlistUnselected rio eee Go A Bodh te ye ae ae RRR AN DO BE ae 191 GetLongPathNam a swine ee hese gels Se a Oe AA BE a 192 Get Max Cores oe a ee ded eb ot A Ee aoe we ee ES o ee 192 GetMenulteds g a os cure dad ALKA A hom oe a ew a de ae wl eels 193 GetModelBiles gt 44 daa a RR EEE tetas DAA nd E 193 GetModelLibraryErrors e e e 194 GetModelName i tia a a Gos A a a ech bd 194 GetModelParameterNames onoo a 194 GetModelParameters o oo a a a a a a a a 195 GetModelParameterValues a a a a a 196 GetModel Type 4 4 4020 E e de RD A Se Sk oe Baa eee A 196 GetModifiedStatus anie E ha A Ad doe ee POS ES e Ea 197 GetNamedSymbolPins e 197 GetNamedSymbolPropNames 2 0 ee 198 GetNamedSymbolPropValue 2 ee 198 GetNear stNeti o a t mele ere orator ete le dod Goo A a a wD 199 GetNextDefaultStyleName 2 e 199 GetNod Naim s 2 oe teagan a a er eee ee Ba a a AA Sh A a 200 GetNonDefaultOptions 2 2 0 2 0 ee 200 Get Nim Curves a aaia a amp amp Enka ee ee eh shea ae ee BEA ee BR GAA 200 GetOpenSchematics vars csa esei nacn A a a 201 Ge
182. C Dialog era oe eere ae pa A Ae S 84 DefineArbSourceDialog 0 a aa u ee 85 DefineBusPlot Dialog ss ses ra eds be ee ee E wt Pa e He 86 DefneCount erDialoges aaas aoe eS be ee PERSE E EE AR A a aa A 87 DefineCurveDialog 40 Re a Ad eet ce NP SE ea 88 De enineDACDialoe gt rat eG EGA EE A OS Oe eR ee EES 90 DefineFourierDialog ee ee ee 90 DefineldealTxDialog ee ee 91 DefineLaplaceDialog vio bp ee OE a De we ee a 4 93 DefineLogicGateDialog i iauna areae ee ee 93 DefinePerfAnalysisDialog aoaaa 94 DefineRegisterDialog soei a see eaa eaa neb e e e Daa E a a E E A 94 DefineRipp rDialoge cria a a AR A EA A A 95 DefineSatutableTxDialog be a A A a ee ee 96 DefineshiftRer Dialogs 2 nice pe betes ees gees Gee Se SRA Ae OS oe 97 DefineSimplisMultiStepDialog a 97 DeleteConfigCollection e e e 98 Delete limer e a a A A Ol ed 99 Delete Trees s a SAR AS A A A A A e o a 99 DescendDirectories e 100 Descend Hierarchy ss soe ic a er ts ee A AR eee we eee 100 DialogDesigner a s 4 4 b axis wa SO Or rr we Ea ale RE ER AY a 101 Oil ete ea ee hk E EA eee A eee Boe a ee ia da eG 101 DirectorylsWriteable so voor ood ea OMS ee bbe DOR ad eee EG 102 Distributions 2 56 424 pc doe ee RAE LAA KE we eS od oe e ee ole 102 EditArcDialog Ayude iii ot eet be Geto tha a ee EA 104 EditAxisDialog Yui ae ee ee Be o oe eg 105 EditBodePlot
183. Cancel the function returns an empty vector DefineFourierDialog Opens the Define Fourier dialog box used to specify a fourier transform This is similar to the Define Curve dialog on page 88 but has an extra tabbed sheet to define the fourier analysis options Select menu Probe Fourier Arbitrary to see how this dialog box looks The function takes an argument that is a string array with up to 37 elements which initialises the controls in the dialog box The first 25 have the same function as for the DefineCurveDialog page 88 function The remaining are described in the following table Index Description Default 0 24 See DefineCurveDialog on page 88 25 Fundamental Frequency 100 26 Frequency display Start Frequency empty 27 Frequency display Stop Frequency 10K 28 Number of points for FFT interpolation 256 if arg 2 not specified See below 29 Interpolation order for FFT 2 30 Fourier method Possible values continuous continuous Use continuous fourier interpolated Use interpolated FFT SIMetrix SIMPLIS Script Reference Manual Index Description Default 31 Window function Possible values hanning rectangular hanning hamming blackman 32 Start of data span 0 33 End of data span 0 01 34 Use specified span TRUE FALSE FALSE 35 Know fundamental frequency TRUE FALSE FALSE 36 Resolution 100 37 Plot options mag db or phase A
184. Default Description 1 real Yes Tolerance Returns Return type real Random number with a uniform distribution between 1 0 tolerance and 1 0 tolerance Returns 1 0 when used in non Monte Carlo contexts Example 1k Unif 0 1 will return 1000 10 with uniform probability distribution Returns 1 0 in a non Monte Carlo run Notes See Also Gauss page 146 Gauss Trunc page 148 Distribution page 102 also alias UD page 387 WC page 396 Units Returns the physical units of the argument 388 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 any Yes vector or vector name Returns Return type string Possible return values are meaning dimensionless meaning unknown y A Secs Hertz Ohm Sie Ve V2 V2 Hz V rtHz AZ A Hz A rtHz V s See Also PhysType on page 298 unitvec Returns a vector consisting of all 1 s Argument specifies length of vector 389 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Argument 1 Number of elements in result Returns Return type real array UpDownDialog Opens the following dialog box to allow the user to rearrange the order of a list of strings Pibsciect Pin order A A The box displays the strings given in argument 1 in the order supp
185. E Jeri mi one va de D Seta et E doe a CEES SARE a ar A 534 SetPinPrenx y ig kee Meat A see ee eR A AS Be at et ote a a Zoe a 535 Set PinSuMix wos py we ae ye Ee ee A ee oe ee 535 SetReadOnly cs aia ae oo ekki Bieta ea oe ena se eR ORE RES SPO eS 535 SetRef d odu de a a Lie ee a Gop eG DA od a REY 536 HetonapGnids a gas A Aoi bk eee Dee eta ees e 8 a 536 SetStyleColour gt 1 a ee a rere ee Be ale AAA AA ee 536 SetoymbolEl Style seid eh eS ee ee RARE SAE Re SS 536 SetSymbolOriginVisibility eu oo eee ee i ee ee SR EAA oe ee eS 537 Det UMS Yer i adn ok aE Re e E doa ts amp a ee ee el fa A 537 Shelli 2 norte a o AA A rs 538 ShellOld y nir e e A A A AAA a a a A E 538 SHOWS aa 2 AE AS A A A rr o ORE eG 539 ShowCurve E E es 540 ShowSimulatorWindow 002 eee ee ee 540 bizeGraph 2 a 2 x EA woe a rere es Wa ae a Ae AS es ok 540 TemplateEditProperty naa aa a e a a a A A a a a a a a a 541 TemplateSetVal a ee ea bk aa OR ED 541 TextEditorCommentLines ee 541 TextEditorFileWatcherlgnoreChanges e 542 TextEditorFileWatcherWatchChanges e 542 ext HGitorP ind 20 A ee e td amp a 542 TextEditorEindNext sv a A a 542 TextEditorGoLoLme ir a AAA Ci eee A 542 TextEditorUncommentlines 2 200 000 2 ee ee 542 ext Wal A A A e ER RR ea wa eee EE Bae ee 542 Mable ay ord RB 2 Mace thc theese te Ho ths the heat ihe ah oat a a dah Roh OY A he hk ol SE 543 SIMetrix SIMPLIS Script Reference Manual
186. Empty Values ta penis e eboney Ss hs a oy eel Ile DARTE wien tale as 10 Bmpty Strings Foseid e oe ak a BAe At ee 10 Quotes Single and Double 0 0 0000000000 0000 10 EX pressions io Re SH Aa Ak ee A A BOS 11 Opera t tS Ar eels Ge Be AAA ee EE ES 12 Functions sluts be Ge od Ede oe de bo ge ee Eee a a 13 Braced Substitutions gow kee A ALE Se etaee tl eee Dewes 13 Brack ted ists La gig eal es Bee ere A ee d 14 By pe Conversions a eer e lode ee de BORE ee Be Bi doe a Te ere GG 14 AMAS APS dt Oe A ds bas ah yg WO del BAe A ER and 14 Statements and Commands 0 2 00 eee ee 14 Commands fis foie a eS AN RAR ERE SAS a ee A 15 Command Switches 2 02242 PL AAA a AGRA bb ee as 15 Ti Statement 1 E A A AAA ES 15 While Statement 22 4 4 24 a e ee ed a 16 Script Statement Da a eet A he ER Soe a es Bette A SPE os 17 Exit Statement trea gore aha A E At A EE bo te le ia 17 Accessing Simulation Data 1 ee 17 Overview nia kde ee eee e GG eG ORES eee ER E 17 Groups s chan reo eee e ates da le ReGen taney ead Side Redeemer ose EG 18 Multisdivisi n Vectors 2 w e124 4 aca ware ee A AAA a 19 User Interface to Scripts 2 0 0 2206405 a a eee a Ve bb eee aa 22 Dialo 8 BOXES am AE Ae et el a eo ee ae G 22 User Control of Execution ee 22 ECOS na See a lp A ee de eh neta Beets hth eee fe 23 Syntax Errors o Se A B A EE I o a aa S 23 Execution EL OTS a g ae Page we hed ote ey ate wales Se ae ae cares
187. Fall Display Fall Time falltime bmp CalcHighPass3db Display 3dB Point High Pass 3dbhighpass bmp CalcLowPass3db Display 3dB Point Low Pass 3dblowpass bmp CalcRise Display Rise Time risetime bmp CalcRMS Display RMS Cycle rms bmp Capacitor Place Capacitor cap bmp Copy Duplicate copy bmp Delete Cut erase bmp DeleteAxis Delete Axis Grid delgrid bmp DeleteCurve Delete Curve delete bmp Diode Place Diode diode bmp Flip Flip flip bmp 588 SIMetrix SIMPLIS Script Reference Manual Button name Description Bitmap GraphClose Close Graph fileclose bmp GraphOpen Open Graph fileopen bmp GraphSave Save Graph filesave bmp Ground Place Ground gnd bmp HideCurves Hide Selected Curves hide bmp IGBT Place IGBT igbt bmp Inductor Place Inductor ind bmp IProbe Place Current Probe iprobe bmp ISource Place Current Source isource bmp Mirror Mirror mirror bmp MoveCurve Move Curve to Selected Axis Grid movecurve bmp NewAxis New Axis newaxis bmp NewGrid New Grid newgrid bmp NJFET Place N channel JFET njfet bmp NMOS Place N channel MOSFET nmos bmp NMOS3IC Place 3 term Nchannel MOSFET nmos_ic3 bmp NMOS4 Place 4 term Nchannel MOSFET nmos_ic bmp NPN Place NPN Transistor npn bmp Opamp Place Opamp opamp bmp Options Options options bmp PJFET Place P channel JFET pjfet bmp PMOS Place P channel MOSFET pmos bmp PMOS3IC Place 3 term Pchannel MOSFET pmos_ic3 bmp PMOS4 Place 4 term Pchannel MOSFET pmos_ic bmp PNP Place PNP Transistor pnp bmp Print
188. H NewVerilogHDL on page 495 to create a Verilog HDL source file NewPartSelector NewPartSelector Creates a new Part Selector and attaches it to the current window If the window already contains a part selector the command does nothing Parameters restore Whether this is a restore session call argument is the object name to use NewPrinterPage NewPrinterPage Advances printer to the a new page This may be used for customised or noninteractive printing See Non interactive and Customised Printing on page 582 493 SIMetrix SIMPLIS Script Reference Manual NewSchem NewSchem newWindow simulator simulator window title Creates a new schematic sheet within the currently selected schematic window If no schematic window is open one will be created Parameters newWindow If specified a new schematic window will be created simulator Specifies initial simulaor mode Set to SIMPLIS to open an empty schematic switched to SIMPLIS mode or SIMetrix to open in SIMetrix mode If not specified the schematic will open in a mode determined by the InitSchematicSimulator option setting Defined using command Set page 531 window title The name of the schematic which will appear in the schematics title bar and will be the default filename that will be used if File Save is used Note that no file is created by the NewSchem command NewsScript NewScript Creates a new plain text document
189. IS Pro and Elite Append Text Window AppendTextWindow file filename text Inserts text into the schematic editor s simulator command window also known as the F11 window Parameters copy If specified the text is copied to the F11 window replacing the existing text Otherwise text is appended file filename If specified the contents of the specified file is placed in the F11 window text If file filename is absent text is inserted in the F11 window Notes Text is always is always appended to the end of the window s existing contents See Also ReadF110ptions page 322 WriteF11Options page 405 WriteF11Lines page 404 GetF11Lines page 171 Arguments Arguments argument 444 SIMetrix SIMPLIS Script Reference Manual BuildDefaultOptions BuildDefault Options Resets preference settings to factory defaults Cancel Cancel Cancel current schematic editing operation wiring moving etc As the command line is inactive while editing operations are in progress this command is only of value when used in a key or menu definition with the flag set to 5 or with immediate switch for DefMenu command For more information see User Defined Key and Menu Definitions on page 556 Capture WaveformImage Capture WaveformImage Captures an image of the current highlighted graph By default it will store the image to the clipboard If file is set then it will output to the given filename Paramete
190. If the argument is complex it will return a complex result even if the imaginary part is 0 and the real part negative An error will always occur if both real and imaginary parts are zero Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns log to base 10 of argument mag Returns the magnitude of the argument This function is identical to the abs page 57 function Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array Magnitude of the input argument magnitude Returns the magnitude of the argument This function is identical to the mag page 261 function 261 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real array Magnitude of the input argument MakeDir Creates the directory specified by arg 1 Returns 0 if successful otherwise returns 1 Arguments Number Type Compulsory Default Description 1 string Yes Directory name Returns Return type real MakeLogicalPath Converts a file system path to a symbolic path using the automatic path matching mechanism This process is described in User s Manual Sundry Topics Symbolic Path Names Arguments Number Type Compulsory Default Description 1 string Yes Path 2 s
191. MACHINE top level trees Arguments Number Type Compulsory Default Description 1 string Yes Key name 2 string Yes Value name 3 string No HKCU Top level tree 324 SIMetrix SIMPLIS Script Reference Manual Argument 1 Name of key This must be a full path from the top level E g Software SIMetrix Argument 2 Name of value to be read Argument 3 Top level tree This may be either HKEY CURRENTUSER or HKEY LOCAL MACHINE or their respective abbreviations HKCU and HKLM Returns Return type string Returns value read from the registry If the value doesn t exist the function returns an empty vector ReadSchemProp Returns value of schematic window property value Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string No Currently displayed Schematic path Argument 1 Property name There are a number of built in properties that are always available Others can be created with the function WriteSchemProp page 408 The built in properties are Path Read only File system path name of schematic RootPath Read Write Path of root in hierarchy Value displayed in status bar of schematic Reference Read Write Full component reference of block representing schematic Readonly Read only Readonly status of schematic Return value may be TRUE or FALSE UserStatus Read Write Contents of user stat
192. Main Command Shell toolbar SchematicMain Main schematic toolbar SchematicFile Schematic file operations toolbar SchematicComponents Schematic component toolbar SIMetrix mode SIMPLISComponents Schematic components toolbar SIM PLIS mode SymbolMain Symbol editor toolbar GraphMain Graph window toolbar This name is used to reference the tool bar in the DefineToolBar page 459 command CreateToolButton on page 455 DefButton on page 458 GetToolButtons on page 226 CreateToolButton CreateToolButton toggle shortcut key class class name name graphic hint Creates or redefines a tool bar button This command creates the properties of the button but not the command it executes when it is pressed To define the command use DefButton on page 458 Parameters class shortcut toggle name This is used with the function GetToolButtons on page 226 to select buttons according to their function Set this value to compo nent if you wish the button to be displayed in the GUI which selects component button Specifies a shortcut key that will perform the same action as the tool button For key codes see DefKey on page 460 If specified the button will have a toggle action and will have two commands associated with it One command will be executed when the button is pressed and another when it is released The Wire pre defined button is defined in this mann
193. Menu page 462 for list of possible values top menu name The top level menu name This is the name that appears in the menu bar ReplayTraces ReplayTraces group name The definitions for graph curves that are created by fixed probes are stored in the simulation data group Normally these are automatically executed when the simulation is run This command can be used to execute those curve definitions at any later time Parameters groupname Name of group from which the fixed probe definition will be retrieved Reset Reset Frees memory associated with most recent simulation run It is not normally necessary to use this command unless available memory is low and is needed for plotting graphs or other applications Note that Reset does not delete the data generated by a simulation only the internal data structures set up to perform a run These are automatically deleted at the beginning of a new run Resize Window Resize Window width width height height Resizes the current window Parameters height The height in pixels to use 517 SIMetrix SIMPLIS Script Reference Manual width The width in pixels to use RestartTran RestartTran stop time Restarts a transient simulation that had previously run to completion To work the most recent simulation must have been a transient analysis If another analysis has since been run or if the analysis has been cleared using the Reset command this command will be inopera
194. Metrix SIMPLIS Script Reference Manual Argument 1 Internal symbol name This is the name used internally to reference the symbol and should not be confused with the user name which is usually displayed by the user interface The symbol must be present in a currently installed library If argument 3 is set to comp then this argument instead specifies the file system path name of a component SXCMP file Returns Return type string Returns a string holding the value of the selected property If the symbol component or property do not exist the function will return an empty vector Get Nearest Net Returns information about the schematic net nearest the mouse cursor Arguments No arguments Returns Return type string array Returns a string array of length 3 providing information on the net nearest the mouse cursor The elements of the array are defined in the following table Index Description 0 Local net name e g V1_P 1 Net name prefixed with hierarchical path e g U1 V1_P 2 1 if the net is a bus connections otherwise 0 Get NextDefaultStyleName Returns next fully available default style name This is used when creating new styles with a default name where an index increments for additional styles created Names are in the form MyStyleNormal index and MyStyleSelected index eg MyStyleNormal10 Returns a name that will be valid for both the normal style and the selected style
195. N SCriptss AAA hoe Sok ve Gees E Eh E a E EA 580 on_graph_anno_doubleclick o 02 00 0000 000004 580 on accept file drops us ia rs e e RE RRO ee A eR eels 580 on schem double click uva ae Ee Ee o ea 581 User Defined Script Based Functions a 581 Overview e a e Fhe eo aha ee bh a es DOS Od at E 581 Defining the Function s stee ae elo Be ee ee ar ae eae e a 581 Registering the Script it EA EE ESS BS Doe ee abe a 581 Example ds ana So A Aa eee ne A A Ai 582 User Defined Binary Functions 0 020000 eee ee eee 582 OVERVIEW 2nd pati a bh E A eM a hae a A a 582 Documentation lt x s d dobsta oe a a a ai S 582 Non interactive and Customised Printing aooaa 582 Ovenview rata e a decks a e eee E oe eee 582 Procedure i s a Sele we e a Gabe GOSS bdo eteta a a 583 Example ar td SAA be Dees eee Sie Be ee 583 Schematic Template Seripts oi aa A A ale SSE Ad aA 584 OVerview s 4 6 8 autii eb ena ME eee eee eRe RR eee eS 584 Defining a Symbol for a Template Script o e e 584 When is the Template Script Called 0 o o 585 The Template Script sai 4 knoe ok ee RO A erg BP a te 585 Template Commands and Functions 0 0000 ee eee 585 Creating and Modifying Toolbars 0 0 0 0 00000000 586 Modifying Existing Toolbars and Buttons o 586 Redefining Button Commandds 2 0 0 0 0000000202 586 Defining N
196. New Schematic menu is similar to DefMenu Shell amp File amp New Schematic NewSchem ne Shell amp File is the menu path and this what the GetMenultems function expects Argument 2 Can be set to recurse This instructs the function to recurse into sub menus and list all menu definitions The definitions are given as semi colon delimited strings providing the menu accelerator if present a unique ID and the full path of the menu Returns Return type string array Returns a string array listing all the menu item names Example GetMenuItems Shel1 amp File returns all the menu items in the command shell s File menu Get ModelFiles Returns a list of currently installed device models 193 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string array Get ModelLibraryErrors Returns list of error messages from model library install operations List is cleared when this function is called Arguments No arguments Returns Return type string array String array holding error messages Get ModelName Returns the model name used by an instance The model name is the name for the parameter set e g QN2222 as opposed to model type name e g npn and internal device name e g BJT Note that all simulator devices use a model even if it is not possible for the device to use a MODEL statement Inductors for example are not perm
197. OST_ PROCESS statement This is useful for example to embed data in a netlist to be accessed in that script This function may also be called after a simulation has been run to access data contained in any FILE ENDF block 170 SIMetrix SIMPLIS Script Reference Manual GetEnv Var Returns the value of a system environment variable Arguments Number Type Compulsory Default Description 1 string Yes System environment vari able name Returns Return type string GetEthernet Addresses Returns information about the installed Ethernet adapters Arguments No arguments Returns Return type string array Returns a string array providing information about the Ethernet adapters installed in the system Depending on the operating system this will either be a simple list of Ethernet addresses or a list of semi colon delimited strings providing the Ethernet address followed by a description of the adapter GetF11Lines Returns the contents of the schematic s text window also known as the F11 window Each element of the returned array contains a single line of the F11 text Arguments Number Type Compulsory Default Description 1 string No Options 2 real No 1 Schematic ID 171 SIMetrix SIMPLIS Script Reference Manual Argument 1 If set to spice the lines will be filtered to remove inline comments and join lines connected using the continuation character Note that with argl spice nor
198. PE Mead A ee a Ae ek Setar ata eet had abe tod Bo 261 Magnitude io Bw Oe ee ee ae AA A ae A i a A ae eee 261 Make DIr see ad B04 fies oh ote A A eee nba te 262 MakeLogicalPath 32 4 tasasen a se a dad ee ew aa 262 MakeStrings SA ii de che de ie Gna tt we wera a 263 ManageDataGroupsDialog ee 264 ManageMeasureDialog e 265 MaX peoe d oh al hanes o A A SG 265 MAA wiage Shee ss dsd ter E deg nn ge A 266 Maxima ANN Babak at gett II E Sok ak Aa oh gh gh ets 266 Maximum ta iS ft A Os we ae ee ee AA eS ae A ee 6 oe 267 Meana ont hp Glee A Ai Re aes A A eA aes EE a 267 Meant 2B te hs a a a G Gees A Se 268 MeastireDialogs 2 o tiny Bete OM He eA MM Na A 268 MenuModifier ri v 40 RI a a a A Ae i oe Be AT EE AIDA a 269 MessageBox seo aaa 4 82 o a 29 6208 ote Oo eee ee eee ERS SY 269 Mids ams Gb be ae ee ew eee oe Wee oo ee ee 270 SIMetrix SIMPLIS Script Reference Manual Contents MIN oe ee Bo Pa LE Pa A we a a AAA Ae ee a 271 Minds yos hee BS ooh hh eee oe ee ee oe Oe Be DE Bee eee 271 MIDA a 2 05 4 g ip a loo OU wa ded de ae hd ee Be Da ta 271 Minimtm so 554 200 6 SAR A A A de 4 ee cane EN e ae sc oleh od 273 MVEA a BAL ei le Aa e eee Li Ue ee Sido a 273 MLSplinebity i A a Ee Be AA A AS PE Pe 273 MIVecti r a 3 ar Alama gates ane ae wath ae Gs o wa MA AES Se ee ee hee els 274 ModellbibsChanged i irase u ee a ws os Gey eet amp hon Seas Aa 275 Navigation So a GN Dd hk 275 Neatestnst ii
199. PLIS Script Reference Manual Returns Return type See Also ReadF110ptions page 322 WriteF11Lines page 404 GetF11Lines page 171 AppendText Window page 444 WritelniKey Writes a value to an INI file See the function ReadIniKey page 323 for more information on INI files Arguments Number Type Compulsory Default Description 1 string Yes File 2 string Yes Section 3 string Yes Key 4 string No Empty string Value Argument 1 File name You should always supply a full path for this argument If you supply just a file name the system will assume that the file is in the WINDOWS directory This behaviour may be changed in future versions For maximum future compatibility always use a full path Argument 2 Section name Argument 3 Key name Argument 4 Key value Returns Return type real Returns 1 if function successful Otherwise returns 0 406 SIMetrix SIMPLIS Script Reference Manual WriteRawData Writes data to the specified file in a SPICE3 raw file compatible format See the built in script write_raw_ file for an application example This can be found on the install CD Arguments Number Type Compulsory Default Description 1 real complex array Yes data 2 string Yes File name 3 string No Options 4 string No d Format of index dis play Returns Return type string The function returns a single string according to the success or otherwise of the operation Pos
200. Print print bmp PSU Place PSU psu bmp Resistor Place Resistor Box shape res bmp ResistorZ Place Resistor Z shape resz bmp Rotate Rotate rotate bmp SatInd Place Saturable Inductor sat_ind bmp SatTx Place Saturable Transformer tx_sat bmp SchemClose Close Schematic fileclose bmp SchemNew New Schematic newschem bmp SchemOpen Open Schematic fileopen bmp SchemSave Save Schematic filesave bmp SchemSaveAll Save All Schematics saveall bmp SCR Place Thyristor scr bmp ShowCurves Show Selected Curves show bmp SimPause Pause Simulation pause bmp SIMetrix SIMPLIS Script Reference Manual Button name Description Bitmap SimRunNetlist Run Netlist run bmp SimRunSchem Run Schematic run bmp SymbolNew New Symbol newsymbol bmp TitleCurve Change Curve Name curvetitle bmp TL Place Transmission Line tl bmp Tx Place Transformer tx bmp Undo Undo undo bmp UndoZoom Undo Zoom undo bmp VProbe Place Voltage Probe vprobe bmp VSource Place Voltage Source vsource bmp Waveform Place Waveform Generator vsig bmp Wire Wire Mode pencil bmp Zener Place Zener Diode zener bmp ZoomFull Fit Window zoomfull bmp ZoomIn Zoom In zoomin bmp ZoomOut Zoom Out zoomout bmp ZoomRect Zoom Box zoomrect bmp Zoom X Auto Fit Width zoomwidth bmp ZoomYAuto Fit Height zoomheight bmp Custom Dialog Boxes Overview SIMetrix has a feature that permits the creation of custom dialog boxes without the need to write program code This can be done using a special graphical tool called
201. ProbeDialog ss ccc er a ee eS ae ee EE a 106 EditBodePlotProbeDialog2 0 0000000000000 0 0000 4 107 EditCrosshairDimensionDialog 2 0 0000002 eee eee 107 EditCurveMarkerDialog e 108 EditDeviceDialoS 2 A A AA A RA A A A 109 EditDiglnitDial gs cine bee bie aa aa Ee ee 111 SIMetrix SIMPLIS Script Reference Manual Contents BditBreeText Dialog 2 aie a bower a A ae AAA AA III 111 EditGraphTextBoxDialog 1 2 a a a ea eee 111 BditdumperDialoe aro eo oe EO OOS a aed eg be ba ee Ge EG a 112 EditLegendBoxDialog asks eRe Re A 112 EditObjectPropertiesDialog 2 0 0 0 0000002 a 113 Eidit Pin Dialog rss eee ee oS ee ese RAT Oe ee A ad 115 Edt Pot ial og e A cee gaa ean A oes Soca Soe aa a Aa hy O ene ale Ge SoBe 115 EiditProbeDialog 22 sa ista e as ap GG Spee da Re eS 117 EditBropertyDialogi fis aud Auk eS ee OA he Ae a 119 EditReactiveDialos t aeu oos ai ey Ge AA td a SA D E E 120 Edit elect a A fn be oe oe ea ek ee ei ta ol alae a Ret oe 121 EditSimplisMosfetDriverDialog 2 0 0 0 0 000 000 00000000004 122 EditStyles Pilot aoia wis ck eee a a ae eh ee hk LEE Re eee Gi ee ee ele od 124 EditSymbolBusDialog e 126 Edit TiMero aid ta a A a 126 EditWaveformDi log8 W o VV ross sra ss a EEA 127 EditWaveformStrDialog e e 128 ElemertPrOps e 2 a A lr dla A e a dd YS 130 Enter Text Dialog 00d da eRe BA da Be RR IAS A 131 Epoch
202. RegSetting IsTextEditorModified DefineArbSourceDialog DefineBusPlotDialog DefineCounterDialog DefineCurveDialog DefineDACDialog DefineFourier Dialog DefineLaplaceDialog Functions by Application SimulationHasErrors SelectColumns SelectRows Sort SortIdx SplitString SprintfNumber StringLength StrStr SubstChar SubstString ToLower Seconds Shell ShellExecute Sleep TickCount Time WritelniKey WriteRegSetting TextEditorHasComments DefineLogicGateDialog DefinePerfAnalysisDialog DefineRegister Dialog DefineRipperDialog DefineSaturableTxDialog DefineShift RegDialog DefineSimplisMultiStepDialog SIMetrix SIMPLIS Script Reference Manual Edit ArcDialog Edit AxisDialog Edit CrosshairDimensionDialog Edit CurveMarker Dialog Edit DeviceDialog Edit DigInit Dialog Edit FreeText Dialog Edit GraphTextBoxDialog Edit LegendBoxDialog Edit ObjectPropertiesDialog Edit PinDialog Edit Pot Dialog Edit ProbeDialog Edit PropertyDialog Edit ReactiveDialog EditSelect EditStylesDialog Edit WaveformDialog Edit WaveformStrDialog EnterText Dialog FilterEdit Menu FourierOptionsDialog GenPrintDialog GetFile GetFileCD GetFileSave GetFileViewerSelectedFiles GetHighlighted WidgetId 3 1 19 Vectors Groups CollateVectors ComposeDigital CyclePeriod ev ExistFunction Exist Vec GetGroupInfo GetLastCommand GetMenultems GetSimetrixFile GetToolButtons Get UserFile Get WidgetInfo Get WindowNames G
203. S 365 Sty leNames sete ww io ade oud A Ate ett ee eh SA RAR da 365 SubstGhar x an 445 6 wae E Ge ede hs PA Sh Ua aS Bie ee eee Br eS 366 DUBStS CLINE ari a di Ag AS ole Ea Se 366 BUM AR Mead at eee da Se east Ok Oh Sunk ty eee he at er A 367 SUMNOISE A Oe a a EE OE A A we eS 367 SupportedReadFormats 2 2 fe 367 SupportedWriteFormats 368 SymbollifoDialoges a0 is eg ek aod ue Ae ee Se ene Sew Bene sat sw A 368 SymbolLibraryManagerDialog 2 0 000 0002 ee ee 369 SymbolName 4 2 2 5 sa Shah ee eee Pate a Ree ee AAAS ee a da a 369 SymbolNames yr ba ri eye on e Ste et ee ds Ae eels eee ae eS 370 SymbolPimOrder e saw ded deg od ds A ee Pa da e a a 371 SymbolPinPomts we tal hee ae a he eater ee ea td oF E 371 SymbolPropertyAutoOrder 1 20 0 pk ae e e un a E a S e o a e 372 SystemVale Ja ead aa aa a a e A nde eg 372 SystemValucPath va ai cusss aae Sale a eG Ree ae be eee 372 SystemWidgetExistsInSelectedWindow 0 0 000000 002 2 eae 373 TableDialog s 3 aiii ae wh eae ar ree eee A AA DAA eS 373 Table Editor sa at fe fs A e de Ms Ge eo a A Se eS eee a 374 TabValueDialogs acia Gob eee Me bb de Pa ed Me AG 375 Gans bee eos Ht eek a B hs AAA KE eee eS owe ee A ee ele 376 GAD CECT ores eM Bath ot Giada debe Soke E AP of ta lig he Soak wt ahaa gh Oe tool 376 tana ds AS ay eee Shae A Oe Te ee A Go oad ed eae 376 TemplateGetPropValue ma manera 000 e a a a a R a A a a a E E E a 377 TemplateResolve w a
204. S Script Reference Manual The EditCopy commands differs from the older command CopyClipSchem page 451 in that only selected items are copied Further schematics copied with CopyClipSchem can only be pasted into other applications Parameters mono If specified the image obtained when pasting to other applications will be monochromatic This switch has no effect when pasting to SIMetrix windows See Also EditPaste on page 474 CopyClipSchem on page 451 EditCut Edit Cut Deletes selected components and places them in the clipboard Equivalent to the sequence Detach page 469 EditCopy page 472 Delete page 466 Parameters mono EditFile EditFile This is an alias to the command OpenBasicTextEditor on page 497 EditFont EditFont font name font spec Changes the spec for the named font object Parameters 473 SIMetrix SIMPLIS Script Reference Manual font name Name of font object This can be any of the names returned by the function GetFonts page 176 These are listed when the menu File Options Font is selected font spec Text string that defines the font The functions GetFontSpec page 177 and SelectFontDialog page 344 return font spec values EditGroupTitle EditGroupTitle group name group title Edit a group s title EditPaste EditPaste Pastes items from clipboard to a schematic sheet Only items copied by SIMetrix using the command EditCopy page 472
205. Selects the Command Shell and assigns it key board focus Select mode for next cursor zoom function Groups all selected schematic elements Display help system 417 SIMetrix SIMPLIS Script Reference Manual Command Name Description HideCurve HighlightCurve Highlight Widget Hint HourGlass ImportSymbol Inst KeepGroup Let Listing List Models ListOptions ListStdKeys LoadModelIndex LoadSimulatorStyleSheet LoadStyleSheet MakeAlias MakeCatalog MakeSymbolScript MakeTree MCD MD Message MessageBox Move MoveCurve MoveFile MoveMenu MoveProperty Netlist NewAnnotation Hides specified curve Highlights the selected curve Highlights a particular content view Display a hint to the user Displays the hourglass cursor shape indicating that some action is in progress Import symbol to symbol editor Place component on schematic Interactive un less loc specified Prevent group simulation data from being au tomatically deleted Evaluate expression Display or write to file current netlist Create dictionary of currently installed models List all global options to file Write standard key definitions to file Reload model library indexes into memory Applies a style sheet to simulator GUI elements Applies a style sheet to the whole application Make alias variable Makes OUT CAT file for use by parts browser Build script for symbol s Creates the specified directory path M
206. SiMetrix SIMPUS Script Reference Manual Version 8 AUGUST 2015 SIMetrix SIMPLIS Script Reference Manaul Copyright SIMetrix Technologies Ltd 1992 2015 Copyright SIMPLIS Technologies Inc 1992 2015 SIMetrix Technologies Ltd SIMPLIS Technologies Inc 78 Chapel Street P O Box 40084 Thatcham Portland OR 97240 0084 Berkshire USA RG18 4QN United Kingdom Tel 44 1635 866395 Tel 1 503 766 3928 Fax 44 1635 868322 Fax 1 503 296 5674 Email support simetrix co uk Email info simplistechnologies com Web http www simetrix co uk Web http simplistechnologies com J smem 6 Psimeus SIMetrix SIMPLIS Script Reference Manual Contents Contents 1 Introduction 1 2 The SIMetrix Script Language 2 A Rutonala o ie Sac ce Rett once dog dk RE ea as Be Bk Ai Gh ie UE 2 Example 1 Hello World o o 2 Example 2 An Introduction to Loops o o 2 Example 3 Cross Probing e o 3 Example 4 Making a Parts List e 5 Variables Constants and Types a 6 Variable ames A Pe NER h we SESE PARS EAR SESS 7 pesa SS Ahoy o CARA a Ae el le Min A de tn Ape steno th hy BED a 7 Constants ns A See ee ee a ERE eS Ee ek Oe ee SS 7 Creating and Assigning Variables 2 0 ee 8 Special Characters sc poeme de eae LAA MRR Eee EES ee ROS 9 MECHOLS ER a a ae A ae OB erie Be Ba ee ea 9 Scope of Variables Global Variables 0 0 0200000 2s 10
207. This creates a new graph Subsequently start is set to zero and the Curve page 456 command is executed which adds new curves to the graph already created The argument to the Plot page 506 and Curve page 456 commands netname is a braced substitution which we saw in the previous example The NetName page 276 function returns a string which is the name of the nearest net to the cursor at the time the function is executed The function is executed soon after the user presses the left mouse key so the string returned by NetName page 276 will be the net the user is pointing to The value returned by NetName page 276 is a string but the Plot page 506 command requires a numeric expression By putting netname in braces the result of evaluating it is substituted as if it were typed in So if the user pointed at a the net named VOUT netname would return VOUT and that would be placed after plot or curve i e plot vout would be executed The final command probe calls the Probe page 509 command This does the same as the Probe page 301 function but doesn t return a result It is needed because both the Probe function and the Probe command return on both up and down clicks of the mouse The second occurrence of Probe simply waits for the up click of the mouse button There are four other functions which are used for cross probing These are GetNearestNet page 199 NearestInst page 276 PinName page 299 and Branch page 66
208. Tines o a AA E AE AA A A a PS BS 131 U dd a Cy ede e E ES A e A eS 132 e E A oe eee Bes 132 Es ap String sa a dg wate TE E atte ALA A A A a eE 133 EscapeStringEnicode a c ii kee ee PA A Go a A eG 133 EV ae bade bb Baa te ti Meee naar Pasty ee dude bad Goh Qed det ET ah G 134 Execute vi a a anen a a da ae hs oe ra A es eG 135 Exist COMME kk te ir Or AEM oA oh ho oe RIE Me ar digas ads 135 Bixist Dit ese eh ie a Ae tie Te aa eds iy Mitta An As The NA AS Be A A a 136 ExistHileja st a III OS ote ee A ADA E a a 136 BxistBunctiont cng deduce oo A dp eel of ach en el 137 Eixistoym Oly to ee a lt ad Ce Ce aed e eaten te eA E bbe E 137 Exist VeGa Me ee aye a a oe ey EE PO os ae a ae 138 OX se hee he red MA Pay BPR eee eee ee doe Oe Le bo ve OO Bee ae ot ae ae Ga 138 Mita a a a age aM Meta a goo go ebb a dune 4 139 Field ais e Bld BS A eee hee aba Pati e 8 139 PilterEdit Menta a A ee ar ere ee ee ae A A ad 140 EllterEiler 2 44 a Je gt de de ee Oe eee eR MEER ER eee ee 140 FindModela a a 2 rare da a ee DEES ERA 4 Glee a ES 141 FEIRAS gh cae chain a bed Pee E Get ont E Ae es Eat AE a a aia 141 Flodeo O I ek a ee hk ee ee RI ak ok bE oF 142 O h Schaal os A Sia a Aas A Em os ads ee 143 Format Number sara et cpr a a A ey ey ett ates e a 143 Fouries ena 2 v Oats a e eas Gee Be a a ES 143 FourierOptionsDialol sii ls ode ee ee es Sha Pts ee eee we RA 144 Fourie Windows 00 PR Ore AA A AA a 145 PullPathi 94 66 fe a oR ag oe OA a eS he a A Eee WS G 1
209. User install time 0 if system installed Time is number of seconds since January 1 1970 189 SIMetrix SIMPLIS Script Reference Manual Get LicenseInfo Returns information about the current license Arguments No arguments Returns Return type string array String array as defined in the following table Index Description 0 License type One of Network NamedUser Nodelocked Portable or Unknown 1 License serial number 2 Licensee 3 License location Server name if network 4 Additional information specific to license type For portable licenses this is the type and serial number of the hardware key dongle 5 Expiry date Returns permanent if non expiring 6 License version this number is related to the maintenance expiry date T Enabled features 8 Encryption code 9 License server version GetLicenseStats Returns information about the license checkout process This function is typically used to provide diagnostic information when a license checkout fails Arguments No arguments Returns Return type string array Returns an array of strings Each entry provides details of each license location The first entry is always the license path for license files This is always the License directory under the SIMetrix root Subsequent entries refer to network license servers and there could be more than one of these Each entry is a semi colon delimited list of values in th
210. Yes X dimension and positions Y Dimension The ID for the CrosshairDimension object that displays the Yes Y dimension and positions Curve ID of attached curve No Division Division index of attached curve See page for details on No multi division vectors SIMetrix SIMPLIS Script Reference Manual Name Description Read Only Frozen On or Off If On the user will not be able to move the No cursor with the mouse Hidden Cursor is hidden No Label Cursor label displayed at base No LineStyle Style of line used for crosshair Comma delimited string of No numbers representing mark space values E g 1 1 defines short evenly spaced dots 3 1 1 1 defines a dotdash style OldStepMethod On or Off Selects method of choosing the position of the No cursor when stepped to a new curve using the TAB key Style Style of crosshair Possible values Crosshair or Cursor No Crosshair means the object is displayed as a crosshair with a width and height that extends to cover the whole grid Cursor means that the object is a small bitmap represent ing a cross X1 X data value of crosshair position No Y1 Y data value of crosshair position The value can be written No but this can only affects nonmonotonic curves where there are multiple y crossings at a given x value CrosshairDimension Object used to display the dimensions and positions of cursors There are two types namely hor
211. a key or menu item which has been defined with the direct execution option specified option flag 5 or immediate for DefMenu page 462 ScriptPause is assigned to shift F2 by default Note that it is not possible to use the normal user interface while a script is paused The main use of script pause is to allow single stepping for debug purposes Scripts can be single stepped by executing ScriptPause immediately before starting the script If the EchoOn option is also enabled each line of the script as it is executed will be displayed in the message window See Debugging Scripts on page 25 See Also ScriptStep on page 528 ScriptResume on page 528 ScriptAbort on page 528 ScriptResume ScriptResume Resumes script that has been paused with ScriptPause page 528 See Also ScriptStep on page 528 ScriptPause on page 528 ScriptAbort on page 528 ScriptStep ScriptStep Steps a paused script by one command See Debugging Scripts on page 25 528 SIMetrix SIMPLIS Script Reference Manual See Also ScriptAbort on page 528 ScriptPause on page 528 ScriptResume on page 528 Select Select wires prop prop name wire wire name all Select items on selected schematic If the prop switch is not specified the interactive select mode is entered Parameters all If specified all items on the current schematic sheet will be selected prop If value is specifie
212. a od o aa ee oS DR EAA A a a a 276 NetName gt 4 a eG E Bee beeen ei Eee ee ea ea eA el ele GS 276 NetNames ss 5 4 o ip pee ee elo WP Waa de ae a ed ee ee i 277 Net Wires cesa Swag e goeh a LAE A EE eee eee ee eee wel el ed 277 NewRassiveDialog gt tias wat ai As Wa he nee a Ee he aA 278 New Valuebialog cda test Hd fered eee RO eRe A e 279 DOL e are Seb ean aye be wheel ey gre MANS MES wow edd Sod a A 281 NumberSelectedAnnotations 2 2 ee 281 Naum Divisi n A e tae Tad OM Mak oh he hts das RE ak ak A 282 NumElems gt 2 oy ome See SH BEG he eS EE REE VERSE Dd 282 OpenEchoFiles s 2 4 4 4 te eae ais See es A aA A a AE Be AE 282 Open Pile xa ua art a EE SSA AEE ee 283 OpenP DE Printer som pus o a ie thee a eaeey ea 284 O penPrinter 2 4 4 EY teeta la a O E tt LA A A a da 284 Openschem cortar td at ds ia A 2 a aE 285 OpenSchemati d s sa perea o sd one G A od a A 286 Parse jn duna aa ra a De e o A ata e de E 288 ParseAnalysiss A A A oo ee eS a 288 Parselaplace pri A ta de A A EG 289 ParseParaimeter String m meere te de eh Gr a A A a ee ees 290 ParseSimplisInit 25 ac dodge a de a We eee a PO Se a 291 Pathbqual eS cnc ee eed ot ete eI ee A ie ok ee ge ROR ahd bk Ed 32 8 292 PerCycleTiming e wih yee de A Sw a Ge a EE oe SE 292 PerGycleValu s 4 4 46 4y i agare tetera rr ee Roe Ree a amp 294 DA sok Pots bP ete Adah on op Oh Bala A a heh ald 296 Phaser 24 4 8 amp ax a ee eon il be a ee ee eee Sie Be E 297 phasera
213. a particular value which the script can test The following example outputs messages if F2 or F3 is pressed and aborts if F4 is pressed defkey F2 scriptresume let global test 1 5 defkey F3 scriptresume let global test 2 5 defkey F4 scriptresume let global test 0 5 let global test 1 while 1 scriptpause if global test 0 then exit script elseif global test 1 then echo F2 pressed elseif global test 2 then echo F3 pressed endif let global test 1 endwhile unlet global test Errors Loosely there are two types of error syntax errors and execution errors Syntax Errors Syntax errors occur when the script presented deviates from the language rules An endif missing from an if statement for example SIMetrix will attempt to find all syntax errors it won t abort on the first one but it will not execute the script unless the script is free of syntax errors Sometimes one error can hide others so that fixing syntax errors can be an iterative process On many occasions SIMetrix can identify the details of the error but on some occasions it is unable to determine anything other than the fact that it isn t right In this instance a Bad Statement error will be displayed These are usually caused by unterminated if while or for statements Although in many cases SIMetrix can correctly identify an unterminated statement there are some situations where it can t Note that a syntax error in an expression will not be det
214. ably the simplest approach but not very flexible Simply create multiple versions of the netlist manually with different file names then run them one at a time 560 SIMetrix SIMPLIS Script Reference Manual Include Files A method of making complex changes to a netlist is to incorporate part of it in a separate file and include it in the main netlist using the INCLUDE simulator control A script can then generate the lines in the include file This can be done using the command Show page 539 with the switch plain to write a string array to a file The string array can be created using the function MakeString page 263 and built using custom code Organising Data Output from Automated Runs A feature is available to organise data from multiple automated runs in the same way as for multi step runs i e in the form of multi division vectors This is explained in the section describing the command Run page 519 An Advanced Example Reading Values from a File In this section we supply an example of quite an advanced script that runs several simulations on a circuit On each run a number of components are changed to values read in from a file This script is general purpose and can be used for any circuit without modification The script is quite complicated but is well commented throughout to explain in detail how it works The basic sequence is as follows 1 Get configuration file name from user Read first line of file This has the
215. according to its contents subject to MaxHeight Colour Background colour Either the name of a colour object or No a colour specification Font Font used for text objects added to the box In practice No this only affects the LegendBox object which is based on TextBox FontColour Colour used for text Either the name of a colour object or a colour specification Hidden Not implemented No Label Text displayed in box No MaxHeight Maximum physical height in mm of box This is only used No when AutoWidth On X1 X location of object in view units No Y1 Y location of object in view units No X2 Physical width of box in mm Ignored if AotoWidth On No Y2 Physical height of box in mm No SIMetrix SIMPLIS Script Reference Manual Graph Co ordinate Systems Three different units of measure are used to define the location and dimensions of an object on a graph sheet These are View units Physical units and Data units These are explained as follows Physical Units relate to the physical size of the displayed object and have units of millimetres Physical units are only used for dimensions of some annotation objects and are not used for location When objects are displayed on a screen an assumption is made for the number of pixels per inch This depends on the display driver but is typically in the range 75 100 Data Units relate to the units of the X and Y axes Typically an object such as curve marker is l
216. ace size style and other characteristics However these values should not be used directly as the format of the string may change in future versions of the product The return value should be used only as an argument to functions or commands that accept a font definition E g The SelectFontDialog page 344 function and EditFont page 473 command If the object name passed is not recognised the function will return the definition for the default font Arguments Number Type Compulsory Default Description 1 string Yes Object name Returns Return type string string GetFreeDiskSpace Returns free space on disk volume holding specified file or directory Arguments Number Type Compulsory Default Description 1 string Yes Directory 177 SIMetrix SIMPLIS Script Reference Manual Argument 1 A file or directory that resides on the disk volume whose free space is required On windows this may be simply the drive letter followed by a colon E g C Returns Return type real Free space available in bytes Get GraphObjects Returns a list of IDs for the graph objects defined by the optional arguments as follows If no arguments are specified the IDs for all graph objects are returned If the first argument is specified all objects of the defined type will be returned If both arguments are specified all objects of the defined type and located on the specified graph will be returned If the type name
217. ach row representing a single group The box allows editing of the information and also for groups to be deleted Arguments Number Type Compulsory Default Description 1 string array Yes List of data groups and associated information Argument 1 String array with each element comprising a semi colon delimited list of items that describe a single group The items are as follows Field Description 0 Group name 1 Group title 2 Analysis mode 3 Flags a combination of current global keep Returns Return type string array String array of the same length as argument 1 Each array element comprising a semi colon delimited list of items as follows Field Description 0 Group name 1 Group title 2 Flags a combination of current global keep and delete Items marked delete were deleted by the user The function will return an empty vector if the Cancel button is clicked 264 SIMetrix SIMPLIS Script Reference Manual ManageMeasureDialog Opens dialog box used to manage graph measurements Arguments Number Type Compulsory Default Description 1 string Yes Measurements Argument 1 String array defining measurements to be entered into the dialog box Each string is a semi colon delimited line with each element defined in the following table Token index Description Label listed in list box Expression Format template Label as displayed
218. action is disabled in all circumstances repeatalways If specified instance is placed directly on sheet without user interac tion at the location specified by x and y and orientation specified by orient These values are relative The origin of the schematic is not fixed Usually the values used would have been returned from a call to the function InstPoints page 248 select If specified the instance is selected after being placed on the schematic SIMetrix SIMPLIS Script Reference Manual useph Only effective if comp also specified Will place a place holder symbol if the component symbol specified is not found Without this switch an error message will be displayed if a component symbol is missing symbolname Name of symbol Symbol names caption and free_text are treated specially See notes propname If specified property of this name is changed to propvalue propvalue See above Notes The symbol name caption will instantiate the built in caption annotation object and not a sym bol called caption Similarly the symbol name free_text will instantiate the built in free text annotation object In both cases the text displayed will be the property value given The property name will be ignored If no property value is provided the default values Caption and Text will be used respectively KeepGroup KeepGroup group name on off Switches keep status of current group Groups gen
219. age and caption Note that there is also the function MessageBox page 269 which is more flexible Parameters message The message to display in the message box caption The title caption to use in the message box Move Move Initiates the schematic move operation User interactive command Parameters mode Specifies editing mode to use for move operation Options are default Use option setting SchematicMoveMode ClassicMove Basic rubberbanding mode Orthogonal Wires edited so that they remain at right angles as much as possible MoveCurve MoveCurve curve id axis id Moves a curve to a new y axis 487 SIMetrix SIMPLIS Script Reference Manual Parameters curve id Id of curve as returned by Curve id is returned by the functions Get SelectedCurves page 207 GetAxisCurves page 153 and GetAll Curves page 150 axis id Axis id as returned by functions GetAllYAxes page 151 GetSelect edYAxis page 208 or GetCurveAxis page 162 MoveFile MoveFile force path 1 path 2 Moves a file from path 1 to path 2 Parameters force If specified path 2 will be overwritten if it already exists If not specified the command will fail if path 2 exists MoveMenu MoveMenu bypos position menu path shift by Moves the position of a menu item by a specified count Parameters bypos Value position is an optional number that identifies a menu item by its position within a sub menu If this
220. ake and change current working directory Make directory Display message in schematic status window Displays message box Move selected schematic items Interactive Move specified curve to new axis Moves a file to a new location Moves the position of a menu item by a specified count Move a property on a schematic instance Create netlist of current schematic Interactive placement of a new annotation 418 SIMetrix SIMPLIS Script Reference Manual Command Name Description NewAxis NewBasicTextEditor NewFileView NewGraphWindow NewGrid NewLabel NewLogicDefinitionEditor NewNetlist NewPartSelector NewPrinterPage NewSchem NewScript NewStyle NewSymbol NewVerilogA NewVerilogHDL NoPaint NoUndo OpenAsciiFile OpenBasicText Editor OpenDirectory OpenExternalFile OpenGraph OpenGroup OpenLogicDefinitionEditor OpenNetlist OpenPrinter OpenRawFile OpenSchem OpenScript OpenSimplisStatusBox OpenVerilogA Create new y axis Create a new plain text document Creates a new File View Open new graph window Create new graph grid Adds a new unplaced text label to a schematic Create a new plain text document Create a new plain text document Creates a new Part Selector Start new page in print job Open new schematic window Create a new plain text document Creates a new style Opens a new symbol editor view Create a Verilog A editor Create a Verilog HDL editor Disable graph painting for duration of
221. al ellipse height width Argument 1 Initial value for start to finish angle Argument 2 Initial value for ellipse height width Returns Return type real array If the user selects Cancel the function returns an empty vector otherwise the following real array of length 2 is produced Index Description 0 Start to finish angle 1 Ellipse height width Edit AxisDialog Opens a dialog box used to edit graph axes Arguments Number Type Compulsory Default Description 1 string array Yes initial settings Argument 1 The argument is a string array of length 25 which defines how the various controls are initialised This array has the same format as DefineCurveDialog page 88 and EditProbeDialog page 117 but not all the elements are used here The following table describes the elements that are used Index Purpose Notes Default 0 10 Not used with this function 105 SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default 11 X axis scale options Setting of scale options for X Axis in Axis Scales auto sheet Possible values nochange No Change auto Auto scale defined Defined 12 Y axis graduation Not used with this function 13 Y axis scale options Setting of scale options for X Axis in Axis Scales auto sheet Possible values as for X axis 14 X axis min limit Min value for X Axis in Axis Scales sheet Must 0 be specified as a string 15 X
222. al text 1 Dialog box caption Returns Return type string The function returns the text entered by the user EpochTime Returns the number of seconds elapsed since midnight January 1 1970 131 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type real Example Notes The return value has a numerical resolution of 1 ms but the useable resolution is system dependent and usually much coarser erf Calculate erf x Arguments Number Type Compulsory Default Description 1 real array yes x Returns Return type real array erf x Example erfc Calculate erfc x Arguments Number Type Compulsory Default Description 1 real array yes x Returns Return type real array erfc x 132 SIMetrix SIMPLIS Script Reference Manual Example EscapeString Process string to replace escaped characters with literals Arguments Number Type Compulsory Default Description 1 string Yes input string 2 string Yes options Argument 1 Input string Argument 2 Set to replacespaces to enable s which is substituted with a single space Returns Return type string Returns the input string but with the following character sequences substituted with their literal values as follows t Replaced with a tab character ASCII code 9 n Replaced with a new line character ASCII code 10 r Replaced with a carriage return character ASCII co
223. ally caused by excessive junction voltage LTE reject full Time step rejected because local truncation error too high LTE accept full Local truncation error below tolerance Time step accepted The items marked full will only be listed if the OPTIONS setting FULLEVENTREPORT is specified when the simulator is run The remaining values are listed below Index Description 0 See above table 1 Top level analysis mode One of none Op Tran AC Sweep Noise TF Sensitivity Pole zero 2 Operating point mode One of none JIZ GMIN Source PTA 3 Transient analysis time 4 Time step 5 Real time measured from start of run not output for all events 6 Iteration number 7 Event specific message GetSimulatorMode Returns the simulator mode that is SIMetrix or SIMPLIS of the current schematic Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string Return value may be SIMetrix or SIMPLIS 213 SIMetrix SIMPLIS Script Reference Manual GetSimulatorOption Returns the value of a simulator option as used by the most
224. alog DefineArbSourceDialog DefineBusP lot Dialog DefineCounterDialog DefineCurveDialog DefineDACDialog DefineFourierDialog DefineldealTxDialog DefineLaplaceDialog DefineLogicGateDialog DefinePerfAnalysisDialog DefineRegisterDialog DefineRipperDialog DefineSaturableTxDialog DefineShiftRegDialog DefineSimplisMultiStepDialog DeleteConfigCollection DeleteTimer DeleteTree DescendDirectories DescendHierarchy DialogDesigner diff Displays the title block creation dialog Create a shortcut to the specified path Create a timer to schedule events in the future Alias to GetCurveVector page 163 Returns the time between zero crossing pairs with the same slope direction It can be used for plot ting frequency vs time Return current system date in string form dB x 20 x log10 mag page 261 x Opens Edit DC Source dialog box UI function to define generic ADC UI function to define arbitrary source Opens a dialog box to allow the user to plot a bus UI function to define generic counter Opens define curve dialog box UI function to define generic DAC UI function opens define fourier dialog UI function to define ideal transformer UI function to define S domain transfer function UI function to define generic logic gate UI function for defining a performance analysis UI function to define Bus register UI function to define schematic bus ripper Open dialog box to define a saturable transformer UI function to
225. ame Description GetConfigLoc GetConnectedPins GetConvergencelnfo GetCurDir GetCurrentGraph GetCurrentStep Value GetCursorCurve GetCurveAxis GetCurveName GetCurves GetCurveVector GetDatumCurve GetDeviceDefinition GetDevicelnfo GetDeviceParameterNames GetDevicePins GetDeviceStats GetDotParamNames GetDotParamValue GetDriveType GetEmbeddedFileName GetEnvVar GetEthernetAddresses GetF11Lines Return location of config information Returns instance and pin name for all instances connected to net at specified point Return convergence data for most recent simula tion Returns current working directory Returns id of the currently selected graph Get current step value in a script based multi step analysis Returns curve id and source group name of curve attached to measurement cursor Returns axis id of specified curve Returns name of specified curve Returns curve names in selected graph Returns data associated with a graph curve Returns curve id and source group name of curve attached to reference cursor Retrieve the text of a model definition from li brary Returns information about the specified simula tor device Returns list of device parameter names for spec ified SPICE device Get electrical connections of a simulator device Get simulation statistics for each device type Returns names of PARAM variables used in lat est simulation Returns value of specified
226. ame manner as multi step runs such as Monte Carlo This makes it possible to develop customised multi step runs using the script language Simple multi step runs may be defined using the simulator s built in features which cover a wide range of applications The simulator s multi step features allow the stepping of a single component or a parameter which can define several components But it doesn t allow for example a complete model to be changed or any kind of topological changes The script language may be used to control multiple runs of a circuit with no limit as to the changes that may be performed between each run In such situations it is useful to be able to organise the data in the same way that the native multi step facilities use This can be done by linking runs using the sweep append and label switches By running simulations in this manner the data generated by the simulator will be organised using multi division vectors which are similar to 2 dimensional arrays 520 SIMetrix SIMPLIS Script Reference Manual Care must be taken when making topological changes between runs Names of nodes that are of interest must always be preserved otherwise the data generated for their voltage may be lost of mixed up with other nodes Note also that the data for new nodes created since the first run will not be available The same problems arise for device pin currents Note that the netlist for a linked run must specify a single analysis
227. ame number of values and in the same order as those function given the same arguments SymbolPinOrder Returns pin order of symbol in currently open symbol editor sheet Also sets new pin order if argument supplied Arguments Number Type Compulsory Default Description 1 string array No New pin order Argument 1 Array of strings with names of pins in the required order Returns Return type string array Array of strings containing pin names of current symbol in the current order If no symbol editor sheets are open the function returns an empty vector SymbolPinPoints SymbolEditor function Returns the location of specified pin 371 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Pin name Returns Return type real array Returns the position of the pin as x and y values SymbolProperty AutoOrder Arguments No arguments Returns Return type SystemValue UNSUPPORTED See page 26 for more information Returns the value of a system defined variable System defined variables are values that are hard wired in the program This function provides access to these variables The function is used by some internal scripts Arguments Number Type Compulsory Default Description 1 string Yes Value name Returns Return type string SystemValuePath UNSUPPORTED See page 26 for more information
228. an alias to ResolveTemplate page 332 Arguments Number Type Compulsory Default Description 1 string Yes Template string 2 string Yes Property names 3 string Yes Property values 334 SIMetrix SIMPLIS Script Reference Manual Returns Return type string Returns the result of evaluating the template SaveSpecialDialog Opens the dialog used by the schematic s Save Special menu Arguments Number Type Compulsory Default Description 1 string array No Initial values Returns Return type string array A length three array of strings The elements are defined as Index Description 0 Filename 1 ASCII format 1 or 0 2 Save complete component 1 or 1 Scan Splits a character delimited string into its components known as tokens Returns result as string array Character used as delimiter may be passed as argument 2 If argument 2 omitted delimiter defaults to a semi colon Arguments Number Type Compulsory Default Description 1 string Yes String to scan 2 string No Delimiter 3 real No Min number of return val ues Argument 1 String to scan 335 SIMetrix SIMPLIS Script Reference Manual Argument 2 Delimiter Semi colon if omitted Only a single character is permitted To scan with multiple delimiters see the function Parse page 288 Argument 3 If present forces the result to be a minimum size For example if the input string
229. and last points of the result if the start and end values do not coincide with actual points in the input vector Arguments 2 and 3 define the beginning and end of the vector Arguments Number Type Compulsory Default Description 1 real array Yes Vector 2 real No start of vector Start x value 3 real No end of vector end x value Returns Return type real array Example Suppose we have a vector called VOUT which was the result of a simulation running from 0 to 1mS We want to perform some analysis on a portion of it from 2504S to 75045 The following call to Truncate would do this Truncate VOUT 250u 750u If VOUT did not actually have points at 2504S and 7504S then the function would create them by interpolation Note that the function will not extrapolate points before the start or after the end of the input vector TwoFileSelectionDialog Opens a dialog to define two file names While originally intended for file parsing applications this dialog function has been made general purpose for any application where the user needs to be prompted to select two file names The dialog has file selection buttons which open a typical File Selection Dialog The first file is the Input file and must exist on disk when the dialog is closed The second file is the Output file and doesn t need to exist when the dialog is closed SIMetrix SIMPLIS Script Reference Manual op oo Encrypt Model File Description Enter the input and ou
230. aphic png or JPEG jpg format You can use almost any paint appli cation to do this But if you want to define a mask that is you wish to define transparent areas then you must use an editor capable of creating portable network graphics PNG images However this is rarely necessary in practice and none of the built in graphics define a mask This is because SIMetrix will automatically create one that makes the area outside the perimeter of the image transparent The result is usually satisfactory You can make your graphic any size but to be compatible with the built in images you should make them 16x16 pixels The built in graphics are all 16 colour but you can use any colour depth supported by your system When you have created your image you should save or copy it to the images directory This is located at simetrix root support images where simetrix root is the top level directory in the SIMetrix tree 2 Execute the command CreateToolButton page 455 As with menu and key definitions the definitions created by this command are not persistent that is they will be lost when SIMetrix exits To make permanent definitions you should place the commands in the start up script See Startup Script on page 26 for more details CreateToolButton will not add the button to any toolbar nor does it assign a command to be executed when it is pressed These operations are described in the following steps 3 Define a command to
231. arg is a full absolute path FALSE if it is a relative path IsImageFile SIMetrix schematics and symbols can display graphical bitmap images This function tests whether a given image format is supported Arguments Number Type Compulsory Default Description 1 string Yes Image file format name Argument 1 Image file format name including leading Examples include png jpg and bmp Returns Return type string array IsModelFile Returns 1 if the specified file contains MODEL SUBCKT or ALIAS definitions Otherwise returns 0 The function will unconditionally return 0 if the file has any of the following extensions EXE COM BAT PIF CMD SCH SXSCH SXDAT SXGPH This will be overridden if the second argument is set to AIIExt Arguments Number Type Compulsory Default Description 1 string Yes Path of file 2 string No Options Returns Return type real IsNum Returns 1 TRUE if the supplied argument is numeric real or complex and 0 FALSE if the argument is a string 254 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 any Yes Vector Returns Return type real IsOptionMigrateable Determines if an option variable may be migrated in a version upgrade This function is used in the script that is run when SIMetrix is started for the first time Certain option variables defined using the command Set
232. aries Add Remove Libraries see User s Manual Device Library and Parts Management Result is written to filename A single line will be produced for each model or subcircuit found containing the device name its type NPN JFET subcircuit etc and the filename in which it was found along with the line number Parameters name ListOptions ListOptions filename List all global options to file Global options are set using the command Set page 531 Listing contains one line per option with each line being a semi colon delimited list in the following form name type default value where name Name of option type Type of option One of bool string or real default_value Default value if not set or if unset using command UnSet page 545 Parameters 483 SIMetrix SIMPLIS Script Reference Manual filename File to receive options ListStdKeys ListStdKeys filename Writes built in key definitions to filename LoadModelIndex LoadModelIndex Forces model library indexes to be re checked and loaded Model library indexes are binary files that allow the rapid location of simulation models When SIMetrix starts it checks that the indexes are up to date by comparing file dates If any files have been changed the appropriate index file will be rebuilt When this process is complete the indexes are read in to memory for fast access This command forces SIMetrix to repeat the above procedure This may
233. array of length 3 providing XY co ordinates and orientation of an instance Arguments Number Type Compulsory Default Description 1 string No Property name 2 string No Property value 3 real No 1 Schematic ID Argument 1 Property name to identify instance Along with parameter 2 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness Argument 2 Property value to identify instance Along with parameter 1 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness Argument 3 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used 2
234. at return information about a schematic It may also be used by some commands If the schematic cannot be opened for any reason the function returns 1 Notes The OpenSchematic function along with the functions listed below that support schematic IDs allow information to be retrieved from schematics that are not currently on display If the specified schematic is displayed then the values returned by the supported functions will reflect the state of the displayed schematic and not the saved schematic The return value from OpenSchematic can be used with the following functions CloseSchematicTab page 70 DescendHierarchy page 100 ElementProps page 130 GetChildModulePorts page 155 GetComponent Value page 157 286 SIMetrix SIMPLIS Script Reference Manual GetF11Lines page 171 GetInstancePinLocs page 184 GetModifiedStatus page 197 GetReadOnlyStatus page 204 GetSchematicTabs page 205 GetSchematicVersion page 205 GetSimulatorMode page 213 HasProperty page 237 HighlightedNets page 239 Instances page 245 InstNets2 page 246 InstPins page 247 InstPoints page 248 InstProps page 249 NetNames page 277 NetWires page 277 PropFlags page 303 PropFlags2 page 304 PropFlagsAll page 305 PropFlagsAnnotations page 306 PropFlagsWires page 307 PropValues page 309 PropValues2 page 310 SetComponent Value page 347 SetReadOnlyStatus page 352 SymbolName page 369 SymbolNames page 370 WirePoi
235. atch to property name and value is found Also returns empty value if the schematic ID is invalid integ Integrates the argument with respect to its reference See Vector References on page 21 for details The function uses simple trapezoidal integration An error will occur if the argument supplied has no reference Arguments Number Type Compulsory Default Description 1 real array Yes vector Returns Return type real array 250 SIMetrix SIMPLIS Script Reference Manual Interp Interpolates the data in argument 1 either to a fixed number of points or at a specified interval Arguments Number Type Compulsory Default Description 1 real array Yes Vector to be interpolated 2 real Yes Number of points 3 real No 2 Interpolation order 4 real No Mode Argument 1 Vector to be interpolated The data should have a reference x values see Vector References on page 21 but this is not compulsory when interpolating using a fixed number of points as opposed to a fixed interval Argument 2 Either the number of points or the x interval depending on the mode See argument 4 below Argument 3 Interpolation order This can be any integer 1 or greater but in practice there are seldom reasons to use values greater than 4 If interpolating a signal containing fast pulses interpolation order should be set to 1 Argument 4 Two element boolean array that is its values should be either TRUE 1 or FALSE 0
236. atic ID 2 string No Property name 3 string No Property value 249 SIMetrix SIMPLIS Script Reference Manual Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Argument 2 Property name to identify instance Along with parameter 2 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness Argument 3 Property value to identify instance Along with parameter 1 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness Returns Return type string array Array of strings with property values Returns empty value if no m
237. ation CD Defining the Function User defined functions are defined as a script The arguments to the function and the return value from the function are passed as the script s arguments The script s first argument is passed by reference and is the return value while the remaining arguments are the arguments passed in the call to the function The function may have up to seven arguments and they may be of any type See example below Registering the Script For the expression evaluator to recognise the function name the script and function name must be registered This is done with the RegisterUserFunction page 515 command The definition of this is RegisterUserFunction Function Name Script Name min num args max num args For details see RegisterUserFunction on page 515 Note that function registration is not persistent That is the registration only lasts for the current session If you wish to make a permanent function definition place the RegisterUserFunction command in the startup script 581 SIMetrix SIMPLIS Script Reference Manual Example Here is a trivial example The following shows the steps to create a function that multiplies a number by 2 First the script Arguments rv argl Let rv 2x argl Save this to a file called say times_two sxscr and place it in the script directory Now register the script as a function called Times2 To do this execute the command RegisterUserFunction Times2 time
238. ations x and y values along with a parameter controlling the smoothness of the required output the function returns a set of values that make up a curve that fits to the parameters and observations 273 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes Training parameters x values 2 real array Yes Training observations y values 3 real array Yes Smoothness parameter 4 real array Yes Result parameters x val ues Argument 1 The parameters for the training data This would normally be the values on the x axis of a graph The values must be ordered from lowest to highest value Argument 2 The observations for the training data This would normally be the values on the y axis of a graph Argument 3 Parameter that controls how smooth the fit to the data will be Value must be 0 positive where the smoothness of the fit increases as the parameter increases At the extremes a value of 0 produces a result made up of straight lines between each training point in order whilst a value tending towards infinity produces a single straight line through the whole of the data Argument 4 The parameters to fit the resulting curve to Returns Return type real array Vector the same length as parameter 4 Result parameters x values with fitted values for each parameter in order Product SIMetrix and SIMetrix SIMPLIS Pro and Elite MLVector
239. atusBox See Also OpenSimplisStatusBox on page 503 CloseTextEditor CloseText Editor 448 SIMetrix SIMPLIS Script Reference Manual Closes the currently selected text editor based widget Parameters type Optional Specifies the type of editor to close Options are LogicDef initionEditor NetlistEditor ScriptEditor TextEditor VerilogA Edi tor VerilogHDL Editor CollectGarbage CollectGarbage Deletes temporary vectors This command is only needed for scripts running endless or very long loops SIMetrix creates temporary vectors when calculating vector expressions These do not get deleted until control is returned to the command line In the case of a script that calculates many expressions it is possible for the memory used by the temporary vectors to become excessive Calling CollectGarbage at regular intervals will resolve this problem CombineMenu CombineMenu menu1 menu2 new__menu_name Combines several menus into a separate menu Parameters menus Set of menu names to merge separted by new_menu_ name The name of the new menu to merge to CompareSymbolLibs CompareSymbolLibs detail file1 file2 Compares two symbol libraries by comparing each symbol in turn A message will be output for each symbol that is different or is not found in one of the libraries Symbols are classed as identical if 1 All graphical elements are identical Graphical elements are segments and arc segmen
240. ault 2Meg 3 Offset voltage default 0 4 Range default 5 Arguments Number Type Compulsory Default Description 1 real array Yes initial values Returns Return type real array The function returns a real array of length 5 with the same format as the argument described above If the user selects Cancel the function returns an empty vector DefineArbSourceDialog Opens a dialog box to define an arbitrary source Argument is a string array which specifies the initial values for each control as follows Element index Description 0 Expression 1 Number of input voltages Default 1 Must be entered as a string 2 Number of input currents Default 0 Must be entered as a string 3 Output config 0 Single ended voltage default 1 Single ended current 2 Differential voltage 3 Differential current value must be entered as a string SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes initial values Returns Return type string array The function returns a string array of length 4 with the same format as the argument described above DefineBusPlot Dialog Opens a dialog box to allow the user to plot a bus Arguments Number Type Compulsory Default Description 1 string array Yes Initial values 2 string No options Argument 1 String array of length up to 9 Elements defined in the following table Index Descripti
241. ay Average Power Cycle CalcFall falltime bmp Display Fall Time CalcHighPass3db 3dbhighpass bmp Display 3dB Point High Pass CalcLowPass3db 3dblowpass bmp Display 3dB Point Low Pass CalcRise risetime bmp Display Rise Time CalcRMS rms bmp Display RMS Cycle Capacitor cap bmp Place Capacitor Copy copy bmp Duplicate Delete erase bmp Cut DeleteAxis delgrid bmp Delete Axis Grid DeleteCurve delete bmp Delete Curve Diode diode bmp Place Diode Flip flip bmp Flip GraphClose fileclose bmp Close Graph GraphOpen fileopen bmp Open Graph GraphSave filesave bmp Save Graph Ground gnd bmp Place Ground HideCurves hide bmp Hide Selected Curves IGBT igbt bmp Place IGBT Inductor ind bmp Place Inductor IProbe iprobe bmp Place Current Probe ISource isource bmp Place Current Source Mirror mirror bmp Mirror MoveCurve movecurve bmp Move Curve to Selected Axis Grid NewAxis newaxis bmp New Axis NewGrid newgrid bmp New Grid NJFET njfet bmp Place N channel JFET NMOS nmos bmp Place N channel MOSFET NMOS3IC nmos_ic3 bmp Place 3 term Nchannel MOSFET 596 SIMetrix SIMPLIS Script Reference Manual Button Name Graphic Function NMOS4 NPN Opamp Options PJFET PMOS PMOS3IC PMOS4 PNP Print PSU Resistor ResistorZ Rotate SatInd SatTx SchemClose SchemNew SchemOpen SchemSave SchemSaveAll SCR ShowCurves SimPause SimRunNetlist SimRunSchem SymbolNew TitleCurve TL Tx Undo UndoZoom VProbe VSource Waveform Wire
242. be used in the control expression for conditional statements while loops and for loops For example the following is not permitted if netname lt 4 56 then To achieve the same result the result of the braced expression must be assigned to a variable e g let v netname if v lt 4 56 then SIMetrix SIMPLIS Script Reference Manual Bracketed Lists These are of the form expressionl expression2 The result of a bracketed list is a vector of length equal to the number of expressions separated by commas There must be at least one expression in a bracketed list an empty list is not permitted For example Let v 3 5 7 assigns a vector of length 3 to v So v 0 3 v 1 5 and v 2 7 The expressions in a bracketed list may be any type as long they are all the same The following for example is illegal Let v 3 Hello World The second element is of type string whereas the first is real The following example is however legal Let v 3 Hello World 3 which is real has been replaced by 3 which is a string Type Conversion Most functions and operators expect their arguments to be of a particular type For example the operator expects each side to be a numeric real or complex type and not a string Conversely the amp operator which concatenates strings naturally expects a string on each side The majority of functions also expect a particular type as arguments although th
243. ber Type Compulsory Default Description 1 string Yes Command name 135 SIMetrix SIMPLIS Script Reference Manual Returns Return type real Returns 1 0 if the command is available otherwise 0 0 Notes There are two situations where a documented command may not be available e The command is not implemented in the currently executing version of the application e The command is not enabled with the current license A few commands are licensed and are not available with all products See Also ExistFunction page 137 Exist Dir Checks if the specified directory exists Arguments Number Type Compulsory Default Description 1 string Yes Directory name Returns Return type real Function returns a real scalar with one of three values Index Description 0 Directory does not exist 1 Directory exists with write privilege 2 Directory exists but with no write privilege ExistFile Tests whether the given file exists Does not test whether the file can be opened Use CanOpenFile page 67 to test if a file exists and can also be opened Arguments Number Type Compulsory Default Description 1 string Yes File path 136 SIMetrix SIMPLIS Script Reference Manual Returns Return type real 1 0 if file exists otherwise 0 0 ExistFunction Returns TRUE or FALSE depending on whether specified function exists Arguments Number Type Compulsory Default Descriptio
244. ber Type Compulsory Default Description 1 string Yes File filter 2 string No Default extension 3 string No empty Options 4 string No empty Initial file 227 SIMetrix SIMPLIS Script Reference Manual Argument 1 Defines file filters The save as type list box may contain any number of entries that defines the type of file to be displayed This argument defines the entries in this list box Each entry consists of a description followed by a pipe symbol then a list of file extensions separated by semi colons Entries are also separated by the pipe symbol For example to list just schematic files enter Schematic files sxsch sch Note that the text is enclosed in both single and double quotes Strings in expressions are denoted by single quotes as usual but the semi colon is normally used to separate commands on a single line This is inhibited by enclosing the whole string in double quotes If you wanted to provide entries for selecting say both schematics and netlists you could use the following Schematic files sxsch sch Netlist files net cir Argument 2 The default extension specified without the dot This is the extension that will automatically be added to the file name if it does not already have one of the extensions specified in the filter Argument 3 String array that specifies a number of options Any or all of the following may be included ChangeDir
245. boBox A drop down combo box otherwise the same as the ListBox Parameter View This is experimental and currently unsupported Using Geometry Management SIMetrix Dialog Designer features an advanced system known as geometry management that automatically arranges widgets in the dialog Geometry management controls the position and size of the widgets in a manner that maintains the layout in an aethestically pleasing form even if the dialog is resized These features are available via the Layout menu via the toolbar and also with the context popup menu The features available are 1 Layout horizontally Lays out selected widgets in a horizontal line 2 Layout vertically Lays out selected widgets in a vertical line 3 Layout in a grid Lays out widgets in a grid arrangement using their initial position as a guide 4 Layout vertically horizontally in a splitter Lays out two widgets with a splitter bar in between allowing the user to control their relative sizes The geometry management actions work on either selected widgets or all the widgets in a selected container If no widget or container is selected the action will be applied to all the widgets in the form A container is a widget that is designed to hold other widgets The containers are the widgets in the containers group and also the RadioGroup widget in the SIMetrix group The best way to learn about geometry management is to experiment with various widgets and
246. by a script by examining the last event in the return value The following is accurate for version 4 0b Later versions may be different but any changes are likely to be made by adding additional events or and adding additional fields to the event line Arguments No arguments Returns Return type string array Returns a string array each element of which describes an event that occurred during the most recent simulation Each element is a string consisting of a number of values separated by semi colons The first value is the name of the event This can be one of the following Singular matrix Singular matrix may lead to abort but not necessarily Floating point error Floating point error occurred such as divide by zero or log of a neg ative number May lead to abort but depends on where it occurred Operating point complete Operating point failed GMIN step started Source step started Pseudo transient started Job started Always the first event Job complete Final event Job failed Final event Job paused Final event Job resumed Job aborted Final event Node limit exceeded Means that a node voltage exceeded the value of the NODELIMIT option Default 1e50 The iteration is rejected when this happens but does not directly lead to an abort 212 SIMetrix SIMPLIS Script Reference Manual Iteration succeeded full Iteration failed full Load failed Iteration failed because device equations could not be evaluated Usu
247. by reference which provides a means of passing data back to the calling script To pass by reference you must pass a variable prefixed with the character E g SIMetrix SIMPLIS Script Reference Manual Let var 10 my_script var To retrieve the value in the called script we use the Arguments page 444 command as we did for passing by value but also prefix with E g Arguments var Let var 20 The above modifies var to 20 and this change will be passed back to the var in the calling script In the above example we have used the same variable name var in both the called and calling scripts This is not necessary we have just done it for clarity You can use any name you like in either script Optional arguments passed by reference work the same way as arguments passed by value except that instead of using the variable argn you must use varn You do not need to use when accessing arguments in this way See the internal script define_curve for an example Important There is currently a limitation that means you can t use an argument passed by reference directly in a braced substitution E g var where var is an argument passed by reference will not work Instead you can assign the value to a local variable first Passing Large Arrays In many computer languages it is usually recommended that you pass large data items such as arrays by reference as passing by value involves making a fresh copy which is both time consumin
248. by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns the property flags for all applicable properties Each row of the resulting array will be a different element s property flag See Also PropFlagsAll on page 305 PropFlagsAnnotations on page 306 PropOverrideStyle Returns the override style of the selected property if one exists Override styles are used in the schematic and symbol editors to assign a different font style to a property Uses the currently selected schematic 308 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Property name Returns Return type string The override style name if any used by the property with the name specified PropValue Returns the value of the property supplied as an argument for the selected component If no components are selected or more than one component is selected an empty string will be returned Arguments Number Type Compulsory Default Description 1 string Yes Property name Argument 1 Property name Returns Return type string PropValues Returns a property value for instances identified by arguments 2 and 3 This function has been superseded by PropValues2 page 310 and it is n
249. ccupy when the command is executed comp Places a component symbol whose path is specified by symbolname loc If specified instance is placed directly on sheet without user interac tion at the location specified by x and y and orientation specified by orient These values are relative The origin of the schematic is not fixed Usually the values used would have been returned from a call to the function InstPoints page 248 nolocal Only effective if comp also specified Forces reloading of the com ponent symbol from the original file instead of using a local cached copy This may be different if the source file has changed norepeat If specified a single instance will be placed regardless of the value of the RepeatPlace global option orient Specifies orientation of symbol Value from 0 7 as illustrated below x 4 Y orient 0 orient 1 orient 2 orient 3 orient 4 orient 5 orient 6 orient 7 repeat If specified the instantiation is repetitive This means that once one instance has been placed another will be presented This continues until the user presses the right mouse key This switch will be ignored if the RepeatPlace option is set to Never Placement options set to Never in schematic sheet of options dialog If RepeatPlace is set to Always the repeat action will be enabled even if this switch is not present as long as norepeat isn t present If the loc switch is present repeat
250. ce models that is the binary code that implements the device equations have an internal name that is used to uniquely identify it but this name is not used externally Instead MODEL statements use their own name e g nmos pnp coupled with an optional LEVEL parameter to define the actual device referred to For example the MOS level 3 device is referred internally as MOS3 but the MODEL statements use the names NMOS or PMOS and set the LEVEL 328 SIMetrix SIMPLIS Script Reference Manual parameter to 3 The mapping between NMOS and LEVEL 3 to MOS3 is defined in an internal table which can be modified by this function A call to this function can add new entries to the table so providing additional methods of accessing a device It can also modify existing entries to point to a new device To modify an existing mapping you only need to provide ModelName Device and Level values The modelname and level must point to an existing combination that is already in use e g Mod elName D and Level 1 and device would then be set to the new device that this combination is to point to e g Diode3 So this is what the spec would be RemapDevice ModelName D Level 1 Device Diode3 The above would make level 1 diodes use the same model as level 3 Here is another example RemapDevice ModelName R Level 0 Device HspiceRes Level 0 is the level value when the LEVEL parameter is not specified In the case of resistors no MODEL statement is
251. ch is documented in the User s Manual Parameters check If specified a dummy renaming process will be performed All reports logs and messages will be output but no actual renaming will take place log If specified all renamed models will be listed in logfile report If specified a report of progress will be displayed in the command shell filename Name of model library file or file spec to be processed This may include or wild card characters Any models within this file that have duplicates already installed in the global model library will be renamed using the suffix supplied suffix Suffix applied to duplicate model name catalog file Usually called OUT CAT If specified alongside user catalogfile any user association of renamed models will be appropriately modified user catalog file If specified a report of progress will be displayed in the command shell RenameMenu RenameMenu menu path new item name Renames a menu item Parameters menu path The full path of the menu to change the name for new item name The new name to use for the menu item 516 SIMetrix SIMPLIS Script Reference Manual RepeatLast Menu RepeatLastMenu window name top menu name Executes the menu most recently selected by the user SIMetrix remembers the last command executed for each top level menu and this menu must be specified with this command Parameters window name Identifies the window type that owns the menu See Def
252. colons The output may be pasted into a spreadsheet program that has been set up to interpret a semicolon as a column separator The first element of the array lists the names for each column and therefore provides a heading The following headings are currently in use type Node or Device name Name of node or device that failed to converge count Number of times node device failed to converge during run time first step Time of most recent occurrence of a first step failure required tol Required tolerance for most recent first step failure actual tol Tolerance actually achieved for most recent first step failure absolute val Absolute value for most recent first step failure time cut back step Time of most recent occurrence of a cut back step failure required tol Required tolerance for most recent cut back step failure actual tol Tolerance actually achieved for most recent cut back step failure absolute val Absolute value for most recent cut back step failure final Node or device failed on the final step that caused the simulation to abort top analysis Main analysis mode Tran DC etc current analysis Current analysis Either the same as top analysis or Op op mode Method being used for operating point PTA JI2 GMIN or SOURCE A first step failure is a failure that occurred at the first attempt at a time step after a previously successful step If a time point fails the
253. convenient in situations where a short expression is desirable Arguments Number Type Compulsory Default Description 1 real Yes curve id 2 real No Return all divisions Division index 3 string No Obsolete no longer used Returns Return type real array CyclePeriod Returns the time between zero crossing pairs with the same slope direction It can be used for plotting frequency vs time by using 1 CyclePeriod SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real vector Yes Input vector 2 real Yes Baseline 3 real No 2 Interpolation order 4 real No 0 X start position 0 1 or 2 Argument 1 Input vector to be processed Argument 2 Baseline for zero crossing detection Argument 3 Interpolation order may be 1 or 2 The actual zero crossing point from which the measurements are based are calculated by interpolation from points either side of the zero crossing This sets the order of the interpolation algorithm Argument 4 Can be 0 1 or 2 This shifts the x axis of the result So for example if the input vector is a 1kHz sine wave the first element of the result will be the duration of the first cycle i e 1mS What this argument does is set what the x value will be If set to 0 it will be 1mS i e the location of the end of the first cycle If set to 1 it will be 0 5mS i e the location of the end of the first half cycle and if set to 2 it will be 0 i
254. cript Reference Manual Example do while GetOption opt lt gt FALSE let n ntl let opt LibFile n 99 loop Both forms are equivalent In while loops the expression is evaluated and if it is TRUE the statement is executed The expression is then tested again and the process repeated When the expression is FALSE the loop is terminated and control passes to the statement following the endwhile Script Statement A script statement is a call to execute another script Scripts are executed initially by typing their name at the command line or if the script has sxscr extension the sxscr can be omitted or selecting a key or menu which is defined to do the same Scripts can also be called from within scripts in which case the call is referred to as script statement Note that a script may not call itself Exit Statement There are four types exit while exit for exit script exit all exit while forces the innermost while loop to terminate immediately Control will pass to the first statement after the terminating endwhile or loop exit for does the same for for loops exit script will force the current script to terminate Control will pass to the statement following the call to the current script exit all will abort all script execution and control will return to the command line Accessing Simulation Data Overview When a simulation is run a number of vectors scalars for dc operating point are created provid
255. cription GetNamedSymbolProp Value GetNearestNet Get Next DefaultStyleName Get NodeNames GetNonDefaultOptions GetNumCurves GetOpenSchematics GetOption GetPath GetPlatformFeatures GetPrinterInfo GetPrint Values GetReadOnlyStatus GetRegistryClassesRootKeys GetSchematicFileVersion GetSchematicTabs GetSchematicVersion GetSchemTitle GetSelected AnnotationText GetSelectedCurves GetSelectedGraphAnno GetSelectedStyleNames GetSelected YAxis GetShortPathName GetSimConfigLoc GetSimetrixFile Returns the value of a property defined for a li brary symbol Returns information about the schematic net nearest the mouse cursor Returns next fully available default style name Returns all node names used in most recent sim ulation Returns names of all explicit OPTION settings in the most recent simulation Returns number of curves in curve group Returns the path names of all open schematics Returns the value of an option variable Returns application path Returns information on the availability of some platform dependent features Returns information on installed printers Returns the names of all quantities specified in PRINT controls in the most recent simulation Retruns internal read only status of specified schematic List sub keys under key in registry HKEY CLASSES _ ROOT root Returns the file version for the schematic Returns the IDs of the schematics Returns version informa
256. ction forms part of parts browser system Function opens Associate Models dialog box which allows user to associate electrical models with schematic symbols as well as be able to specify part categories and pin mapping The function modifies the user catalog file second argument The return value is FALSE if the user cancels the box otherwise it returns TRUE For full details on using this dialog box refer to the Device Library chapter in the User s Manual The dialog box may be opened in one of two modes namely multiple and single In multiple mode a list of models and categories is displayed allowing the association of many devices together In single mode a single device name is provided as an argument and only that device may be associated To open in single mode provide a two element string array to argument 4 with the first element set to the model to be associated and the second element set to single Otherwise the box will be opened in multiple mode in which the first element of argument 4 if present defines the initial selected device Arguments Number Type Compulsory Default Description 1 string Yes Catalog file usually OUT CAT 2 string Yes User catalog file usually USER CAT 3 string No empty Command to execute to create symbol 4 string No empty Options Returns Return type Real atan Returns the arc tangent of its argument Result is in radians Arguments Number Type Compul
257. ctors specified in argument 1 Argument 3 Three element array Element 1 is the start index for the return values element 2 is the number of values to be returned for each vector and element 3 is the division index The default values for the three elements are 0 the length of the first vector and 0 respectively Returns Return type real or complex array If the vectors supplied in arg 1 are real the return value will be a real array If they are complex the return value will be a complex array The length of the result will be 34 number of vectors vector length The first three elements of the array are 0 number of vectors 1 start index 2 length of each vector The remaining elements hold the vector data This is in the following order veci 0 vec2 0 SIMetrix SIMPLIS Script Reference Manual vec3 0 vecatol veci 1 vec2 1 vec3 1 veiti vec1 2 vec2 2 vec3 2 sa etc Where vecl is the first vector specified in arg 1 vec2 the second and so on This function is used by the write_raw_ file script to create SPICES raw file data The source for this script is provided on the install CD CommandStatus Obtain information about the current script execution context Arguments No arguments Returns Return type real array Four element array Elements described in the following table Index Description 0 Drag and drop 1 if current script was called as a result of a drag and drop opera
258. cts Cancel the function returns an empty vector DefineLogicGateDialog Opens a dialog box to define a logic gate The argument is a real array of length 3 and defines the initial settings for the box controls as follows SIMetrix SIMPLIS Script Reference Manual Index Description 0 Number of inputs 1 Propagation delay 2 Gate type 0 AND 1 NAND 2 OR 3 NOR Arguments Number Type Compulsory Default Description 1 real array Yes initial settings Returns Return type real array The function returns a real array of length 3 with the same format as the argument described above If the user selects Cancel the function returns an empty vector DefinePerfAnalysisDialog Essentially the same as DefineCurveDialog page 88 but with a different design for the expression entry Used by the Probe Performance Analysis and Probe Plot Histogram menus Arguments Number Type Compulsory Default Description 1 string array Yes initial values Returns Return type string array DefineRegisterDialog Opens a dialog box to define a bus register Arguments Number Type Compulsory Default Description 1 real array Yes initial settings 94 SIMetrix SIMPLIS Script Reference Manual Argument 1 The argument is a real array of length 4 and defines the initial settings for the box controls as follows Number of bits 1 if Has output enable box checked Otherwise 0 Setup time Clock dela
259. current script Inhibits saving to undo buffer Opens a schematic ASCII file in the text editor Opens a text file in the text editor Opens the directory given Opens the file in the operating system default Opens a SIMetrix graph file Create new group of simulation data from data file Opens a logic definition file in the text editor Opens a SPICE netlist or model file in the text editor Begin print job Opens a SPICE 3 format ASCII raw file Open existing schematic Opens a script source file in the text editor Opens the SIMPLIS simulation status box Opens a Verilog A source file in the text editor 419 SIMetrix SIMPLIS Script Reference Manual Command Name Description OpenVerilogHDL OpenWebPage OptionsDialog Pan PasteGraphImageToSchematic Pause PlaceCursor Plot PreProcessNetlist PrintGraph PrintSchematic Probe Prop Protect Quit RD ReadLogicCompatibility RebuildSymbols Redirect Redirect Messages Register UserFunction RenameLibs RenameMenu Repeat Last Menu Replay Traces Reset ResizeWindow RestartTran RestoreCommandShell RestoreDefaultStyles Opens a Verilog HDL source file in the text edi tor Opens a web page in the system default browser Open options dialog box Pan scroll schematic specified number of grid squares Copies a picture of the graph to a schematic Pause current simulation Position graph cursor Create new graph window and plot curv
260. d AE A A SS A II E 297 Phys Tyipe 224 da a de de Ss RA ee hE A EE Oy aa A 298 PinNames amp o AAA E A A A SRA Mis RR G 299 PrepareSetComponentValue 299 EroD s pisar a IO ee ee da add 301 ProcessingAccelerator s r ee ee es 301 Proc ssingDragAnd Drop enc ae ee eee ee aa ee EE 301 ProcessingGuiAction 2 00606 66 a e a a A Ea E E p E a A E a 302 Progtessis s a a a A de ta e da e o A e as a E 302 PTOPE AES 5 2 2 a a O A A aa AA AID 303 a A E Da BA ot ES a eR A ES ee eae 304 PropElags All o ara bob eae ds Has eh Mee BEG 305 PropFlagsAnnotatious y ya dos eee hE AAA RR eR ee EERE eee 306 Propk lags Wires 2 an lt eth oo Oh ida itll We the the it at ay lee te be Mune gh et 307 PropOverrideStyle iii oe eS Oe Be A A A OT a G 308 Prop Val ia a sala tice ee A A ee Ee el ee ee e ee 309 PropValu s 2 2 x ds a ae eee eh Ge Be bb LAA eee See 309 PropValues2 2 6 oS SS iid Be ee SAAR a YM 310 Prop Values Allp a eo ecg ai ee ee A a a A BAe a 312 PropValuesAnnotations ee 313 PropValues Wites a tolera bb bee ee ee ee ee ee eed dee ee EG 314 SIMetrix SIMPLIS Script Reference Manual Contents PutEnvVar aorta ly See aa a a LA E A 315 PWiDialo8 ca na nu Bie a bea eet ee ee ae ae A a ee ae 315 Query Data 5 i gi eee A EA i eee e etl a eed ee Be 317 Radioselect a ss fa si eke REAL A DE be ee ane ee wee ee deleed 319 RadioSelectWidgetStackDialog 2 0 0 00 00 0000000000004 320 Rangers oc Sahat a Aha ee ea A A Ne ha Ble o
261. d all components on the current schematic with property of name name and value value will be selected If value is not specified then all components possessing the property name will be selected wire Select wire with handle defined by wirehandle wires If specified only wires will be selected Otherwise both components and wires will be selected Notes The prop switch makes it possible to automate modification of component values using a script For example supposing you have a circuit with a resistor R2 and capacitors C4 and C5 you could modify the values of all of them with a script something like Unselect Select prop ref R2 Prop value 1 1K Unselect Select prop ref C4 Prop value 120p Unselect Select prop ref C5 Prop value 1 2n The above script would change R2 C4 and C5 to 1 1k 120p and 1 2n respectively SelectCurve SelectCurve unselect all curveld Selects unselects the identified curve or all curves 529 SIMetrix SIMPLIS Script Reference Manual If the all flag is used then all curves on the currently selected graph are selected or unselected depending on the unselect flag Otherwise a single curve must be specified with curveld Parameters all All curves will be selected or unselected unselect Curve or curves will be unselected curveld Only used if all flag is not used Specifies a particular curve by it s ID which can be obtained from the functions GetSelectedCurves page 207 GetAxisCur
262. d according to the string passed as the function s arguments It returns a string giving the definition of the source selected by the user The string may be used as the value for a current or voltage source Arguments Number Type Compulsory Default Description 1 string No empty Initialisation string Returns Return type string 360 SIMetrix SIMPLIS Script Reference Manual SplitPath Splits file system pathname into its component path Arguments Number Type Compulsory Default Description 1 string Yes Path Returns Return type string array Return value is string array of length 4 Index Description 0 Drive including E g Cv 1 Directory including prefix and postfix E g Program Files SIMetrix 2 Filename without extension E g SIMetrix 3 Extension including period E g EXE SplitString Takes two values the string and the sub string token Returns the token removed and the string split into new sub strings Arguments Number Type Compulsory Default Description 1 string Yes Input string 2 string Yes token Returns Return type string array String array containing the component parts of the string Example SplitString fred bill jill bil Pfred jill SplitString fred bill bill jill bill Pfred jill SprintfNumber Returns a string formatted according to a format specification 361
263. d adds a RMS measurement 435 SIMetrix SIMPLIS Script Reference Manual let curves GetSelectedCurves let numCurves length curves for idx 0 to numCurves 1 Script lines to retrieve RMS value AddLegendProp curves idx RMS rms_value next idx E Y yout RMS 316 37726mY Legend Property ATT AT AN A typical result is displayed above In this example the property name is RMS and its value is 316 37726mV AddPin AddPin pin name pin number x y label x label y label fags qualifier list AddPin is a Symbol Definition Command A pin is a point on a symbol where wires can be connected Refer to Schematic Symbol Script Definition on page 564 for more details Parameters pin name Text string Any pin name can be used as long as it does not contain spaces However in order to allow the plotting of currents from the schematic certain pin names must be used for primitive components SIMetrix SIMPLIS Script Reference Manual pin number Integer Determines the order in which the pins appear on the de vice s netlist entry Must be in a certain order for primitive compo nents LY Integer Symbol co ordinates of pin As wires always snap to grid points pins must lie on grid points if is to be possible to connect to them This means that the x and y co ordinates must be a multiple of 100 label x label y X and Y position relative to pin of pin label Text of label will be
264. d of providing user control of script execution Notes Unshifted letter and number key definitions will not function when a text edit window such as the simulator command window F11 is active Space bar definitions must always be shifted The same codes can be used for menu short cuts See DefMenu on page 462 Key definition will be lost when SIMetrix exits To make a key or menu definition permanent you can place the command to define it in the startup script To do this select command shell menu File Options Edit Startup Script and add the line above Example To define control R to place a resistor on the schematic sheet enter the command DefKey CR inst res 4 The built in definition for F12 to zoom out a schematic is DefKey F12 SCHEM zoom out 4 461 SIMetrix SIMPLIS Script Reference Manual This definition only functions when a schematic is active A similar definition for F12 GRAPH zooms out a graph when a graph window is active DefMenu DefMenu immediate shortcut norepeat id command id comgroup command group menu path command string when enabled Defines custom menu Supersedes Defltem Parameters comgroup This can be used with the function GetLastCommand page 187 GetLastCommand returns the text of the most recent command ex ecuted which specifed the supplied command group value The com mand DefButton page 458 also uses this feature forceUpdateCommandf set th
265. d only file viewer with specified file name The file viewer is internal while the file editor called by EditFile is an external program WebOpen WebOpen URL title title Parameters restore Identifies this is part of a restore session call the argument is the widget name title Sets the title of the View welcome Identifies that this is the welcome page URL The URL to open Wire Wire start loc x1 y1 x2 y2 mode startloc x1 y1 Enter schematic wiring mode Parameters loc If specified command in non interactive and wire is placed at location specified by x1 yl x2 y2 Co ordinates are relative and would usually be derived from a call to WirePoints page 397 mode If specified the schematic editor is placed in a temporary wiring mode The next left click will start a wire and wiring may proceed in the usual manner After pressing the right mouse button wiring mode will be cancelled start If specified a new wire is started startloc WireMode WireMode On Off Switches schematic wiring mode on or off WM__CloseAllSystemWidgets WM_CloseAllSystemWidgets 550 SIMetrix SIMPLIS Script Reference Manual Closes all the System Views from the currently selected window WM_ CloseNonPrimary Windows WM_ _CloseNonPrimary Windows This will close all windows that are not the primary window If the window does not close for example due to a user pressing cancel on a file modified save or not bo
266. d provided that this instance of SIMetrix created the file in the first place A second element may be specified and set to autodelete In this case the file will automatically be unlocked when control is returned to the command line Returns Return type string May be one of the following values success Operation successful failed Lock failed because the file has already been locked notexist Attempt made to unlock a file that was not locked by this instance or has not been locked at all locked File has already been locked by this instance CreateNewTitleBlockDialog Displays the title block creation dialog Arguments Number Type Compulsory Default Description 1 string vector No Initial display values SIMetrix SIMPLIS Script Reference Manual Argument 1 Initial display values for the dialog Each value is in a separate vector element and will start with one of the following prefixes including the colon Prefix Description CompanyName Company name to appear Title Title of the schematic Author Author of the schematic Notes Notes about the schematic LayoutStyle Either Horizontal or Vertical Vertical mode will not display an image Logo Full path to an image to use Version Schematic version number Use auto for an automatically assigned version number Date Schematic version date Use auto for an automatically assigned ver sion number No
267. dB Use phase auto limits 1 on 0 off Minimum limit phase CAN OT FF WwW NY FF O Maximum limit phase Returns Return type string array Returns the values entered in the dialog controls as defined in the table above EditBodePlotProbeDialog2 Arguments No arguments Returns Return type Edit CrosshairDimension Dialog Opens a dialog intended for editing the characteristics of cursor crosshair dimensions The Properties sheet behaves in the same way as the EditObjectPropertiesDialog page 113 func tion and is initialised by the function s arguments The Edit sheet allows the edit and display of certain properties as defined in the following table Property Name Affects Control Labell Label 1 Label2 Label 2 Label3 Label 3 107 SIMetrix SIMPLIS Script Reference Manual Property Name Affects Control Style Contents of Style box One of six values Auto Automatic Show Difference Internal Internal Show Difference External External Show Difference P2P1 Show Absolute P2P1 AutoAutomatic Show Difference Show Absolute None No controls selected Font Font String defining font specification If any of the controls in the Edit sheet are changed the corresponding property values in the Properties sheet will reflect those changes and vice versa Arguments Number Type Compulsory Default Description 1 string array Yes Property names 2 string array Yes Property values
268. ddProperty Dialog AddRemoveDialog AddRemoveDialogNew AddSymbolFiles area arg arg_rad Ascii AssociateModel atan atan_deg Absolute value Displays dialog box intended for the user defini tion of an AC source Adds a list of entries to a named section in the configuration file Adds a new cursor to the current graph Installs Model Files User interface function Open add property dia log for symbol editor User interface function Allows selection of a list of items User interface function Allows selection of a list of items Adds file or files to list of installed symbol library files Calculates the area under a curve Phase of argument in degrees Result always be tween 180 to 180 Phase of argument in radians Result always be tween 7 to 7 Returns ASCII code for character Special purpose function for managing parts browser Arc Tangent radians Arc Tangent degrees SIMetrix SIMPLIS Script Reference Manual Function Name Description avg BoolSelect Branch CanOpenFile ChangeDir Char ChooseDir ChooseDirectory Chr CloseEchoFile CloseFile CloseSchematic CloseSchematicTab CollateVectors CommandStatus CompareSymbols ComposeDigital ConvertLocalToUnix Convert UnixToLocal CopyTree CopyURL cos cos_deg cosh CreateDiodeDialog CreateLockFile Returns the average of argument User interface function Returns state of up
269. de 13 f Replaced with a form feed character ASCII code 12 s Replaced with a single space Enabled is arg2 set to re placespaces Can be used to create strings that contain no spaces Replaced by a single followed by any other char Replaced by the character following the The itself is acter omitted EscapeStringEncode Process string and replace literals with escaped characters Performs the reverse operation to EscapeString page 133 133 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes input string Argument 1 Input string Returns Return type string Returns the input string but with the following literal values substituted with character sequences as follows Literal value Replaced with Tab character ASCII code 9 t New line character ASCII code 10 n Carriage return character ASCII code 13 r Form feed character ASCII code 12 f ne ev Special function used to evaluate a sequence of expressions without requiring multiple Let state ments Useful for schematic TEMPLATES and similar This function may be supplied with up to 8 arguments All arguments except the last is ignored by the function Arguments Number Type Compulsory Default Description 1 any type Yes vector 2 any type No vector 3 Up to 8 arguments in total No Returns Return type real complex array
270. define generic shift register Open dialog box to define SIMPLIS multi step dialog Deletes a list of entries in the config file Deletes a timer Delete an entire directory tree Returns all directories under the specified direc tory recursing through all sub directories Analyse schematic hierarchy Simple dialog designer Return derivative of argument SIMetrix SIMPLIS Script Reference Manual Function Name Description DirectoryIsWriteable Distribution EditArcDialog EditAxisDialog EditBodePlotProbeDialog EditBodePlotProbeDialog2 EditCrosshairDimensionDialog EditCurveMarkerDialog EditDeviceDialog EditDigInitDialog EditFreeText Dialog EditGraphTextBoxDialog Edit Jumper Dialog EditLegendBoxDialog EditObjectPropertiesDialog EditPinDialog EditPotDialog EditProbeDialog EditPropertyDialog EditReactiveDialog EditSelect EditSimplisMosfet DriverDialog EditStylesDialog EditSymbolBusDialog EditTimer Edit Waveform Dialog Tests whether or not a directory can be written to Returns random number with a custom distribu tion UI function to edit symbol editor arc UI function opens edit axis dialog UI function for editing Bode plot fixed probes UI function opens dialog for editing cursor di mension UI function opens dialog to edit curve marker UI function to select device and edit device pa rameters UI function to edit digital initial condition UI function opens dialog to edi
271. define print settings Arguments Number Type Compulsory Default Description 1 string array Yes initial settings 2 string No Enabled modes 148 SIMetrix SIMPLIS Script Reference Manual Argument 1 The argument is a string array of length 13 and defines the initial settings of the dialog box as follows Index Description 0 aon A won rR 10 11 12 area Fit Area grid Fixed Grid Schematic scale entered as a string Schematic caption Graph magnification entered as a string Graph caption Orientation landscape or portrait Layout 0 Schematic only Y Graph only 2 Schematic Graph 3 Graph Schematic Left margin The value is entered and returned in units of 0 1mm but will be displayed according to system regional settings Must be entered as a string Top margin Comments as for left margin Right margin Comments as for left margin Bottom margin Comments as for left margin Major grid checked on Checked off Not checked Minor grid checked on Checked off Not checked Argument 2 Specifies whether schematic mode graph mode or both are enabled If omitted the mode is determined by the schematic and graph windows that are open To enable schematic mode only set this argument to Schem to set to graph mode set to Graph and to set to both set to Schem Graph Returns Return type string array The
272. ditor windows this means that the definition of a new top level menu will not take effect until the windows are closed and reopened For the command shell top level main menu definitions can only be made in the startup script which runs before the command shell is visible This restriction only applies to the top level menu that is the menu name that is permanently visible in the menu bar Menu items and sub menus under the top level menu can be added removed and redefined at will Example The following are definitions for some of the standard menus Definitions for all the standard menus can be found on the install CD in the Scripts folder A CD image may be downloaded from our web site if you do not have the physical CD Change value schematic popup menu by calling the value script Note this must be entered on one line DefMenu Schem Change amp Value value ne InstSelected amp amp LiveMode Separator in schematic popup DefMenu Schem Graph popup to enable cursors DefMenu Graph Cursors amp 0n cursormode ne on LiveMode Del Del noerror filespec Deletes the specified file Wildcards may be used for filename e g matches any sequence of zero or more characters matches a single character Any file matching the specification will be deleted Parameters noerror DelCrv DelCrv curve id curve name Deletes the specified curve or curves on the selected graph cu
273. e Let global abortScript 1 The script would test this value at appropriate times then exit cleanly If this switch is omitted the script will execute the ScriptAbort page 528 command which will abort the execution of the script immediately abortmessage Message shown when pressing abort caption Title bar caption displaymessage The message displayed inside the dialog status Initial status message steps The number of progress steps that will occur If 0 or not set no progress bar will be shown See Also UpdateRunningDialog on page 548 DestroyRunningDialog on page 469 453 SIMetrix SIMPLIS Script Reference Manual CreateSym CreateSym local file libfile flags flags symbol name description catalog Parameters file flags local symbol name symbol description catalogue CreateToolBar If specified the symbol will be saved to libfile If neither file nor local are specified the symbol will be saved to the file default sxslb in the SymbolLibs directory If flags 1 then the symbol will be stored with tracking enabled This means that any existing instances of the symbol with the specified name will be automatically be updated when the symbol is edited If specified the symbol will be created in the currently open schematic and will not be saved to the global library Text string Name of symbol being defined This can be anything not already used in a previous symbo
274. e Pre processes a netlist Intended for use with SIMPLIS but is general purpose in nature Print graph Interactive Print current schematic in non interactive print job Change schematic cursor to probe and wait for mouse click Interactive Change add property of to schematic instance Protect selected schematic components Exit SIMetrix Remove directory Read logic compatibility tables Reload symbols from library file Redirect messages to message window to file Redirects all command shell messages to a file Register a user defined function Run rename model utility Renames a menu item Executes most recently selected the menu Re builds graph curves created by fixed probe definitions Release memory used for simulation Resizes the current window Restart a transient analysis Re opens the command shell if closed Restores default styles 420 SIMetrix SIMPLIS Script Reference Manual Command Name Description Resume RotInst Run RunAsync RunCurrentScript RunSIMPLIS Save SaveAs SaveGraph SaveGroup SaveRhs SaveSnapShot SaveSymbol SaveSymlib SaveText Editor SaveText EditorAs SchematicEnableFileWatcher SchematicFile WatcherlgnoreChanges SchematicFile WatcherWatchChanges ScreenShot Window ScriptAbort ScriptPause ScriptResume ScriptStep Select SelectCurve SelectGraph SelectLegends SelectSchematic SelectSimulator SelectSymbolPin Resumes a previously paused simulation R
275. e Returns curve id and source group name of curve attached to reference cursor Arguments No arguments Returns Return type string array Returns a string array of length 3 providing information on the curve attached to the reference cursor Index Description 0 Curve id 1 Source group name This is the group that was current when the curve was created 2 Division index if curve is grouped E g for Monte Carlo Get DeviceDefinition Searches for the specified device model in the global library and returns the text of the model definition If the device is defined using a MODEL control the result will have a single element containing the whole definition If the device is defined using a subcircuit then the result will be a string array with a single element for each line in the subcircuit definition Arguments Number Type Compulsory Default Description 1 string Yes Device name 2 string Yes Device type 3 string No SIMetrix Simulator type 4 string No Options 164 SIMetrix SIMPLIS Script Reference Manual Argument 1 The model subcircuit name E g Q2N2222 or TLO072 Argument 2 The type of the device This may be either the device letter e g Q for a BJT or the model type name e g npn A list of device letters is given in the Simulator Reference manual in the Running the Simulator chapter If the device is a subcircuit use the letter X Argument 3 Th
276. e page 289 status code to an error message Retrieve last command issued by a menu or tool bar Returns result of most recent command Returns array of legend property Returns a string array containing information about each model in the specified model library Returns information about the current license Returns information about the license check out process Returns a single line from a file Return list of selected elements from the ListSub setDialog Return list of unselected elements from the List SubsetDialog Returns long path name for path specified either as a long or short path Return maximum cores available taking account of hardware capability and license Returns all menu item names in the specified menu Returns a list of currently installed device models Returns list of error messages from model library install operations Returns the model name used by a simulator de vice Returns the names of all real valued parameters of a simulator device model Returns information about a device s model pa rameters Returns the values of all parameters of a simula tor model Returns the simulator internal device name given a user model name Returns modified status of the specified schematic Returns the names for all the pins of a symbol or hierarchical component Returns names of all properties defined for a li brary symbol SIMetrix SIMPLIS Script Reference Manual Function Name Des
277. e 397 function for example Argument 2 Property whose value will be used to identify instance in returned values Argument 3 Specify whether pins to be identified by their name or number If set to pinnumber the number will be used otherwise the name will be used Returns Return type string array An array of strings of length equal to 2 times the number of pins on the net The even indexes hold the property value identifying the instance and the odd indexes hold either the pin s name or number according to the value of argument 3 Note that this function does not return pins on implicit connections An implicit connection is one that is made by virtue of having the same netname as defined by a terminal symbol or similar but has no physical connection using wires Example The following sequence will display the output of this function for a single selected wire on the schematic Get selected wires Let wires SelectedWires Get locations for first wire in selected list Let points WirePoints wires 0 Show connected pins Show GetConnectedPins point 0 points 1 Get Convergencelnfo Return convergence data for most recent simulation Arguments No arguments 159 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Returns a string array providing convergence information about the most recent run Each ele ment of the array is a list of values separated by semi
278. e 69 Elos Biles acs aa ata BAe oe eee gee be et eS RARE Came eee OS 70 SIMetrix SIMPLIS Script Reference Manual Contents CloseSchemati ppal Whee aa wae a AAA E es 70 GloseScheniatic Tab A aao 4 de da ete ogee ee oe AAAS DES Ak ee a a 70 CollateVectOrs s aul een hp be OE A a a ae de ee ES G 71 Commands tatus saaa do cork ae eh ee LE Se ee ee oe a ele a 4 72 GompareSymbols s 4 8 42 etn A e a rio ee 73 ComposebDigital ha A Gye A A o a a aE 73 ConventLocal To Unik rigna a o a ts e he 75 GonvertUnixToliocal e 2 5 s016 tec e e as des de GG ps de da we a 75 Copy TEE a A a O o id a 75 Copy UR iodo Se AAA A eee iy Beir de Se He AS ae 76 COB AS A te DAA el He ee eee dee th bak de Ae et oak walt MER RB Ot ee 77 COS AOR re Meee go Olaf OMY Mts dade erg bye a ee he ee a 77 COS O eka goes ei gee Agu awa ehh beh We 2k eke a ada gE eka se ee lee a4 78 CreateDiodeDialog iii a EE ee Ee ee a 78 CreateliockPFile ne ica a8 aye a ter bb doa ow 2b A CoP ee eer ered 79 CreateNewTitleBlockDialog 0 00 00 0000 0000000000000 79 GreateShorteut 42 a pis a a ds dec ap Gey aay Ge a 80 Greate Timer spas a a ESP ASE BM Ar Soe eel MM Mss he dhe ood Sud id Ok ot OD 81 CVE ke he A i Sel So Us ea ae Ha Ae Beds tide Se Gah RE NRE RG O A a aa 82 CyclePeriod cs 2 2 AAA We ee eR AD Be Anes Be oaks 82 Date eL aa a oh oe at E IE AA EE St eek ee 83 Aia sb EE ca a a A e e oe a ear ala 84 D SourceDialog ia egg a e A E ALA AR AR eee 84 Define AD
279. e RGB value Font Font String defining font specification If any of the controls in the Edit sheet are changed the corresponding property values in the Properties sheet will reflect those changes and vice versa Arguments Number Type Compulsory Default Description 1 string array Yes Property names 2 string array Yes Property values 3 string array No Property types Returns Return type string array EditJumperDialog Arguments No arguments Returns Return type EditLegendBoxDialog Opens a dialog intended for editing the characteristics of a graph legend The Properties sheet behaves in the same way as the EditObjectPropertiesDialog page 113 and is initialised by the function s arguments The Edit sheet shown above allows the edit and display of certain properties as defined in the following table Property Name Affects Control Label Label SIMetrix SIMPLIS Script Reference Manual Property Name Affects Control Colour Background Colour An integer defining the RGB value Font Font String defining font specification If any of the controls in the Edit sheet are changed the corresponding property values in the Properties sheet will reflect those changes and vice versa Arguments Number Type Compulsory Default Description 1 string array Yes Property names 2 string array Yes Property values 3 string array No Property types Returns Return type string array EditObjectPropertiesDia
280. e a At ee th A A eg 246 InstPins 364 eG E Rae SA A A A AA as 247 InstPoints yp a ii Ri do OA id eee ai 248 InstProps oad owas dana gh Ad a es la 249 IET a a A A Ce Rees oe Hats BeOS EL ENE dod a 250 TED A ae la a a bb dh eae ee oe AAA A A yee es 251 IsComiplex s 2 2 fm te Bree eee needa ahs y wed dig good a DADE bb atea a A 252 Is omponent Lider bbb eee eee 252 IsDoctimented s a Bet A a REE MSA SRI A ee A 252 IsPileOfT pee as ad td REDE VDDD RR n a 253 TSEUUPSTH G 5 da IAE te ode ie EA Eee A A AE a ee 253 TslniageP ile conto jo odo e i Sea Dawe A da ee 254 IsModelFile de sms rm sua a le d a A e aaa a 254 ISN UI 4 4 20 AE Begg ee eB tt A A hoe ak 254 IsOptionMigrateable s a i ie eje dc e a A a 255 IssameRil s eens a eterea a e a a dr G DA bb at a 255 ISS Ctd a a oe a a td ts a a A die Bae ee 256 ISS a e e A a aid 256 IsTEMEAIOE 2 ias Shae Se eH A ee Ee GREE AS N a 256 IsTextEditorModiled tamos to te See a E EE EES 257 JOS tring Anay wn a it A A ee ed A e e dd 257 MST SG ies se Lt Rah ad of nd Oo ld tee 2h oh Rae ad be bd 258 List Directory asc ai es SO faye eyes ae oe My E A a a e 258 ListSchemProps 2 4 0402 fa bre bier mang 4 rc Re E eee 258 ListSubset Dialog s a tara id gos a dele le le gaged A 259 Wie fi ee tod amp AGA a Go pele aonana n a ele be At Sn nora PE Sie ee ee 259 LoadPile s s 2 rannte a A A ee rere A Re A A E 259 Located a da de e a A ee A A a a a a 260 A A 2 Be Goh 260 MOP LO hi ES eh et 261 TOE ue y e a
281. e are embedded in the binary executable but can also be overridden by placing files of the same name in the biscript directory Both files use the same format Each entry in the tree list is defined by a single line in the file Each line contains a number of fields separated by semi colons The first field is that command that is called to perform the action while the remaining fields describe the hierarchy for the entry in the tree list control The command is usually a script often with a number of arguments To add a new function simply add a new line to the relevant file The order is not important measure measure_span Scripts These are the driver scripts that perform the curve analysis and curve analysis over cursor span analysis respectively These don t perform the actual calculations but carry out a number of housekeeping tasks The calculations themselves are performed by a script whose name is passed as an argument To add a new function you need to create one of these scripts For simple functions the script is not complicated In the example below we show how the Mean function is implemented and you will see that it is very simple An Example The Mean Function The entry for the full version of this in analysis_tree txt is measure_mean Measure Transient Mean Full This means that the script measure_mean will be called when this function is selected mea sure_mean is quite simple it is
282. e aware that SetComponent Value will not work for all types of device only those whose method of storing values it has been configured to accept Arguments Number Type Compulsory Default Description 1 string Yes Address 2 string No If omitted value will not Value be changed but the current value will be returned 3 real No 1 Schematic ID Argument 3 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array String array of lenght 6 with elements defined by the following table Index Description 0 Current value before being edited 348 SIMetrix SIMPLIS Script Reference Manual Index Description 1 Status code May be one of Noerr BadAddress AmbiguousAddress In completeAddress MissingChild WriteProtected or NewProp See table below for details 2 Full path of hierarchical schematic that contained the part that was processed 3 Handle property of instance that was processed 4 Parameter or property name that was processed 5 Debug error message This has more detailed information than the error code Status code Description Noerr No error function completed successfully BadAddress The address given was not recognised AmbiguousAddress The addr
283. e ce ao eae Be eh Eo oyna ea a ae 334 DavespecialDialog Lacie Rietele wa od ota e e ae OS Be A a eee SS 335 DCAM verb ob ob a bow a e dud dre e DRS Oe delete dead 335 SCEP NAME s 2 a SA a dilo to di o e Dee ati de e E i 336 SEM A A A RA LE AL AA alee 336 Search Models 4 at A de de ten A ee A a a a eS 337 HecOnds LW ara E A A AA RR Kao e GR 338 Nelect2 Dialog cada added a e A A a da e A 338 DelectAnalysiS A a e dt aie de td ta 339 SelectColourDialo Soi rl AA A Ee Oe ee 339 SelectColtimins a LALA A a amp a tt Be es 340 Selectos As a e e A eee es 340 Del ctDevicess a sa A Blow werk Me e o o deis ds 341 SelectDialo n ay a e eaa o A AA ADS AA ee 341 SelectedProperti s s lea a de eee ee A a a eS 342 SelectedStylelnto atado Gop ee ee Ai as dd a SG 343 Selected Wifes o m ead ers dr e a E e e ees 343 SelectFontDialos o vise al las Moe oe eh OE A ria e bP he 344 SelectRGwsy 4 a6 vice Ole ee ee SRS Eee a La en O ol ae 344 sel ctoimplisAnalysis adria eee eS Ee lake em E Ges 345 SelectSymbolDialog I o aaas u ee a GR Ga da a a a 346 SelGraphy spss wee e a O eS INA DO 347 SEIS CHA si a a A e a ae E a eee a AA AAA 347 SetComponent Valte z 2049 485244000 eee eR ERE ES EEE EHS 347 SetInstanceParamValue 2 0 2 ee ee 349 SIMetrix SIMPLIS Script Reference Manual Contents SetModelParamValti s g 2 23 oly a eee a oe ea a a ERA ees 350 SetProperty Styles aia de da ce aa oe ee be AAAS BES Ae e eG 351 SetReadOnlyStatu
284. e do 320 LO Ute ce ad BG E oe a ae eee Bt te AA Be tite ee 320 ReadClipboard ua tra a af aa a de ee Be 321 ReadConfigCollection 0 a 321 ReadContigSetting ot He A Ree th Ge a a SA A 321 ReadFlVOptions rs een Be eee Ge ee A eee Ae Ee eee Ge 322 ReadBiles as aa a a ed DORE EGG 323 Readinikey s a iiaa Adige eae edd obi 2k eae e eae Oe ee ee lee ola 323 ReadRegsetting diia ge a WOR ee BE a a AAA E ER een A 324 ReadschemProp 4245 2 oles dd dd eed ee bo oA a 325 Read Text EditorProprs renee arn pea ee ee edd oS GRADE Ee olen ba EG 326 real aay Mesh E tea as ey sen te tere We age Es LR oh Monee Geet 327 Rei se ra A A Sek BD ty he Mee et SS e 327 RetNames 205 ey ee ee SEA a eee ee BR EG a E 327 RelativePathiv Y asima nu eaen ts ee Gee es Seen A AA AAA ES ed 328 Remap Device so on Se dodo A we eee Ee ee as 328 RemoveConfigCollection ee ee 329 RemoveModel File v 2h fa nagg ea e O E labs erate EA ne ep a 330 RemoveSymbolFiles a oia marete e dd de ee a RAR a amp 330 ResolveGraphTemplate 20 0 0 ee ee 330 ResolveTemplate oa Pata one il be eb bee pew eae the Bee ee 332 RestartPranIvialog pc a O kB te ee AMEN be oe de RE ES he ial 332 Risa o es Gk ge SS Te do ee Ae dnd vets nh eta A Oe ae 333 RMS T cde al A Ai ape ene eS aes E A AA dt Bete ei rs 333 PT Chase Me Cie as aint Dag dy duded a Es EA ee ae aE fick Oe Se Gk E 334 RootsumOisquares s e aa A PEE heer BP ee dh td oof Be 334 A eR aS a ew aes SP ed
285. e form location type checkout success ful checkout time error code type may be path or server error code will be 0 if successful otherwise it will be a negative number according to the cause of failure A list of error codes is provided in the FLEXI m end user documentation provided on the install CD checkout time is the time taken to check out the license SIMetrix SIMPLIS Script Reference Manual GetLine Returns a single line from a file Arguments Number Type Compulsory Default Description 1 real Yes File handle Argument 1 Handle as returned by the function OpenFile page 283 Returns Return type string The first call to this function after opening the file will return the first line in the file Subsequent calls will return the remaining lines in sequence The function will return an empty vector when there are no more lines in the file The function will also return an empty vector if the file handle is not valid GetListSelected Return list of selected elements from the ListSubsetDialog Argument list will be in the form selected elements notselected elements Arguments Number Type Compulsory Default Description 1 string array Yes List elements Returns Return type string array Selected elements Get List Unselected Return list of unselected elements from the ListSubsetDialog Argument list will be in the form selected elements notselected elements
286. e le ele gg ged 514 Redirect 2 06 ged meant Balok BA ee Deane ant dhe Bee ee 514 Redirect Messages bo pao wi i a re A ale A IS 515 Register UserPuniction 202505444 2444 0 0 WG ee eee SA Ra oe a a 515 Renamebibs 3 5 2 4 4 wetter amp amp ewe ee Sar peel SADE RR 4 Mies e de SoG 516 RenameMenu sy 2 2 20 sa e teak to a ee es ee ee 516 RepeatliastMentr ad al ele eee BS hb a ed an 517 Replay lracess 0 04 Be a Rw Ee A AA Ole ee 517 RESET td o E A Ad os a aa tee A ey cet a rea 517 Resize Window ads taoga e Oe a a a a e a U A ee 517 Restart Irans siu A as a doe a E D e ue eke A E Paw Ge cee a E 518 RestoreCommandShell raseda uaaa eee ee Pee a EEE a a 518 RestoreDefaultStyles ee ee 518 Resum 2 0 5 d a jaa oo eh ea wa deh ob bbe Pade eee SS 518 Rotinst usina goer eee Wha A Kee hee A e we goer od 519 RUNE ie i de Ce ee Ne Beata ot ght Ft Ea Ea Or le Te andi dW Ale She Cen ak ak ae he RR 519 RUDA SDE o ae ay EA ee Beas ah oA ee AD O oe eS 521 RunGurrentscript A A ee ee eee eb ee 521 RunSIMBLIS us ur ee ae ae a aah Ge Be bb baa eee eee 522 DAVE a SS Sitio BN E AA 522 DAVCAS Cd SA ges Hemera ta a aa ea og ae teat ee A ada AS A A 523 SaveGraph a Lar AAA eRe Oe OE See eR a a E 523 baveGroup e cpu bob he we eee dhe oo WES ede ee RE EE a 524 SIMetrix SIMPLIS Script Reference Manual Contents DaveRhscs ws 2 4 bk poe E e E or fe ly ads 524 Savesnapohot s EA eae kee oe ee be ee de SER ER eee as 525 Savesymbol h 4 e g
287. e name The attribute name for the element being created attribute value The attribute value for the element being created reference Reference for the XML document XMLAddElement XMLAddElement element name reference Adds an element to the XML at the current location then sets the new element as the current focus element Parameters element name The tag name for the element being created SIMetrix SIMPLIS Script Reference Manual reference Reference for the XML document XMLClose XMLClose reference Closes the XML reference Parameters reference Reference for the XML document XMLGoUpLevel XMLGoUpLevel reference Moves the current focus element up to its parent Parameters reference Reference for the XML document XMLNew XMLNew reference Creates a new XML reference object Parameters reference Reference for the created XML document to be used to refer to it later XMLOpenElement XMLOpenElement index idx tag tag name reference Opens the XML element and sets it as the current focus level Parameters index Chooses the element based on the index number as defined by XML GetElements page 411 554 SIMetrix SIMPLIS Script Reference Manual tag Chooses the element based on the tag name If there are multiple tags with the same name it opens the first one unless index is defined then it uses that index position in the elements of the type requested reference Reference for the
288. e of interest on the schematic then press ctrl S The node name and therefore the vector name will be displayed in the command shell A similar procedure can be used for currents Place the mouse cursor on the device pin of interest and press ctrl P Launching Other Applications Data import and export makes it possible to process simulation data using other applications SIMetrix has a facility to launch other programs using the Shell command You could therefore write a script to export data process it with your own program then read the processed data back in for plotting To do this you must specify the wait switch for the Shell command to force SIMetrix to wait until the external application has finished E g Shell wait procdata exe will launch the program procdata exe and will not return until procdata exe has closed Data Files Text Format There are two alternative formats The first is simply a series of values separated by whitespace This will be read in as a single vector with a reference equal to its index The second format is as follows A text data file may contain any number of blocks Each block has a header followed by a list of datapoints The header and each datapoint must be on one line The header is of the form reference_nameydatai_name ydata2_name Each datapoint must be of the form reference_valueydatai_value ydata2_value The number of entries in each datapoint must correspond to the
289. e pin Leave blank if no prefix is to be set SetPinSuffix SetPinSuffix pin name suffix text Sets the suffix for the selected pin property This is a symbol editor command Parameters pin name The name of the pin to change prefix text The suffix to apply to the pin Leave blank if no suffix is to be set SetReadOnly SetReadOnly vecname Sets a vector to be read only Once so assigned a vector can not be written to Note that this is a one way operation It is not possible to remove the read only status of a vector This command is intended for use when the program starts possibly called from the startup script to assign values as constants which can never be changed or deleted 535 SIMetrix SIMPLIS Script Reference Manual SetRef SetRef vector name reference expression Attaches reference expression to vector name Previous reference is detached and deleted if no longer used See Expressions on page 11 for details on references See Also Expressions on page 11 SetSnapGrid SetSnapGrid snapgrid Warning only change the snap grid if there is no alternative We strongly recommend against changing the snap grid simply to satisfy personal preferences as doing so may introduce compati bility problems especially if applied to symbols Sets the snap grid for the currently selected schematic or symbol editor window The snap grid is the grid on which wires and symbol pins lie The default value is 120
290. e schematic file cannot be opened for writing Returns Return type string The return value may be one of the following Code Description NOERR Schematic opened successfully SC_READONLY Schematic file is read only If readonly or selectiveRead Only was specified as an option then the schematic would have been successfully opened but it will not be possible to save it to the same file 285 SIMetrix SIMPLIS Script Reference Manual Code Description SC_LOCKED Schematic file is in use by another SIMetrix user If readonly or selectiveReadOnly was specified as an option then the schematic would have been successfully opened but it will not be possible to save it to the same file FILE_NONAME No file name was given Argl an empty string FILE_CANTOPENFORREAD Can t open specified file because it doesn t exist or the path is bad OpenSchematic Opens a schematic given its file system path The return value may be used with a number of other functions and commands This function does not display the schematic The function GetSchematicTabs page 205 returns the IDs for all currently displayed schematics Arguments Number Type Compulsory Default Description 1 string Yes File path Argument 1 File system path to schematic file The schematic does not need to be currently displayed Returns Return type real Returns an integer ID that can be used for a wide range of functions th
291. e to radio button 1 Global library 2 Current schematic only 3 Both 4 5 T if All references to symbol automatically updated box is checked otherwise 0 SymbolLibrary Manager Dialog Opens the Symbol Library Manager dialog box See User s Manual Symbol Editor and Library Sym bol Library Manager for details of this feature Arguments No arguments Returns Return type string array Index Description 0 User operation 0 Close button pressed 1 Place button pressed 2 Edit button pressed 1 Internal name of selected symbol Full path of selected library file Empty reserved for future use SymbolName Returns symbol name of specified instance 369 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string Yes Property value 3 real No 1 Schematic ID Argument 1 Along with argument 2 property name and value to identify instance If these arguments are not supplied the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Argument 2 See argument 1 Argument 3 Schematic ID as returned by the function OpenSchematic page 286 This allows this fu
292. eable or readonly ListSubset Dialog Arguments No arguments Returns Return type In Returns the natural logarithm of the argument If the argument is real and 0 or negative an error will result If the argument is complex it will return a complex result even if the imaginary part is 0 and the real part negative An error will always occur if both real and imaginary parts are zero Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the natural logarithm of the argument LoadFile Returns an array of strings holding lines of text from the file specified by argument 1 Arguments Number Type Compulsory Default Description 1 string Yes File name 2 string Yes auto Encoding 259 SIMetrix SIMPLIS Script Reference Manual Argument 2 Character encoding assumed for input file May be any value returned by the function GetCodec Names page 156 Examples include utf 8 UTF8 encoding This is the encoding used internally and for output utf 16 UTF16 also known as UCS 2 Shift JIS Commonly used on Japanese systems In addition the following special values may be used locale uses the default encoding for the system s locale auto uses utf 8 if successful Otherwise uses locale Returns Return type string array Locate Function performs a binary search on the input vector argum
293. eateRunningDialog on page 453 UpdateRunningDialog on page 548 Detach Detach Unselects partially selected wires on schematic A partially selected wire is one which is selected at one end only Executing this command immediately prior to a move operation effectively disables rubberbanding Discard Discard vec vecname groupname Frees up memory used for vectors This does not destroy the vectors just removes any copies that reside in RAM The data is always stored on disc and can be recovered to RAM when needed Parameters vec If specified vecname specifies a single vector groupname Name of group data is to be discarded Use current group if omitted 469 SIMetrix SIMPLIS Script Reference Manual Notes It is rare that this command is needed but may be useful if you are running long simulations and the data generated is so large that a great deal of disk swapping is taking place The vectors created by the simulator are initially stored in a file If they are needed usually for plotting a graph the data is copied to memory Once the data has been copied to memory it will stay there until the group to which the vector belongs is destroyed Simply closing the graph that used the data will not free up the memory as it is assumed that the data may be needed again and the process of reading from the disk can be time consuming If the data is very large it will consume a lot of memory which can have adverse c
294. eating a netlist for use with SIMPLIS Forces switches dotEnd f11Top nodemap num nopinnames sort If template is not specified a default of template simplis_templateltemplate will be forced Finally if wireTemplate is not specified a default of wireTemplate busname wirenum will be forced If specified the netlist lines will be output in alphanumeric sorted order If specified circuit is netlisted as subcircuit In this case the netlist is enclosed with a subckt control at the beginning and a ends control at the end Property names to be used as templates A template is a string that specifies a format to be used for the netlist line for the device that owns it By default the template property name is TEMPLATE This can be overridden with this switch Multiple template prop erty names may be specified by separating them with a pipe symbol See the description of the template property in User s Manu al Schematic Editor Template Property For hierarchical schematics the line KEEP subs is automatically output to tell the simulator to output data for all subcircuits Spec ifying this switch inhibits this action thus restricting data output to the top level Format for bus wires wire template may contain the keywords BUSNAME and WIRENUM These resolve to the bus name and wire number respectively So a spec set to BUS NAME WIRENUM would give the default i e bus names like BUS1 2 A spec
295. ect was originally created Graph ID of parent graph Yes ID ID of this object Yes Parent ID of parent object If text is placed freely on the graph Yes this will be the same as the Graph property Free Text objects however are also used in TextBoxes in which case this returns the id for the TextBox Time Time that the object was created If the object is on a Yes graph that has been saved to a file then subsequently restored the time will be the time that the object was originally created Type Type of object always FreeText Yes Version Product name and version Yes Font Font for label No Hidden Not implemented No Label Text displayed Symbolic values may be used E g No Time will display the time the object was created LabelJustification As CurveMarker see above except 1 automatic not No allowed X1 X location of object in view units No Y1 Y location of object in view units No Graph Name Description Read Only FirstCurve ID of the oldest curve on the graph Yes GroupTitle Title of the data group that was current when the graph Yes was created SIMetrix SIMPLIS Script Reference Manual Name Description Read Only ID ID of this object Yes MainCursor ID of Crosshair object comprising the main cursor Yes Value 1 if cursors are not enabled RefCursor ID of Crosshair object comprising the reference cursor Yes Value 1 if cursors are not enabled SourceGroup The data group that was current when t
296. ected until execution Execution Errors These occur when the script executes and are mostly the result of a command execution failure or an expression evaluation failure Executing Scripts Scripts are executed by typing their file name at the command line running them from the script editor or dragging and dropping the file to the Command shell Additionally scripts can be assigned to a key or menu See User Defined Key and Menu Definitions on page 556 SIMetrix SIMPLIS Script Reference Manual If a full pathname is not given SIMetrix first searches a number of locations The rules are a little complicated and are as follows 1 Search the BiScript directory followed by all its descendants On Windows the BiScript directory is usually at simetrix_root support biscript 2 Search for a built in script of that name Built in scripts are bound into the executable binary of SIMetrix See Built in Scripts on page 25 3 Search the SCRIPT directory This is defined by the ScriptDir option setting see Set on page 531 which can also be accesses in the File Locations tab of the options dialog box see File Options General 4 Search the User Script list of directories This is defined by the UserScriptDir option variable see Set on page 531 This may be set to a semi colon delimited list of search paths 5 Search the current working directory if the script was executed from a menu or the command line
297. ed by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If 1 the currently selected schematic will be used Argument 2 Property name to identify instance Along with parameter 3 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one 246 SIMetrix SIMPLIS Script Reference Manual Argument 3 Property value to identify instance Along with parameter 2 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Argument 4 If set to full the full hierarchical path of the net names will be supplied Otherwise the local names will be returned Returns Return type string array InstPins Returns an array of strings holding pin names for each pin of either the selected instance or an instance identified by one or both arguments Arguments Number Ty
298. ed curves Legend properties are the text associated with curve names in the graphs legend panel The legend panel is the area between the graph and the toolbar where the curve legends are located If argument 2 values the function returns legend property values Otherwise it returns legend property names 188 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Curve ID 2 string No names Options Returns Return type string array Get Library Models Returns a string array containing information about each model in the specified model library Arguments Number Type Compulsory Default Description 1 string Yes Library spec 2 string No Options Argument 1 Library specification for installed library This could be a single file or a folder containing a wildcard specification All installed libraries are returned by GetModelFiles page 193 Argument 2 If set to usermodelsonly only models installed by the user will be returned Returns Return type string array String array with each element describing a single library model Information is supplied as a semi colon delimited string with the following fields Index Description 0 Model name 1 File where model found Filename only not full path 2 Line number 3 SPICE letter E g x for subcircuits 4 Is alias false not an alias true is an alias 5
299. ed model paths have changed Returns path name of hierarchical block given root path and full component reference Cross probe function Returns nearest schematic instance to cursor Cross probe function Returns the net name of the nearest wire or instance pin Returns array of all net names in selected schematic Return all wires on specified net UI function to select passive component value and parameters General purpose user input function Opens a user configurable dialog box Returns argument scaled so that its largest value is unity Returns number of selected annotations Returns number of divisions in a vector Returns number of elements in a vector SIMetrix SIMPLIS Script Reference Manual Function Name Description OpenEchoFile OpenFile OpenPDF Printer OpenPrinter OpenSchem OpenSchematic Parse ParseAnalysis ParseLaplace ParseParameterString ParseSimplisInit PathEqual PerCycleTiming PerCycleValue ph phase phase_rad PhysType PinName PrepareSetComponent Value Probe Processing Accelerator ProcessingDragAndDrop Redirects the output of the Echo command Opens a file and returns its handle This may be used by the Echo command Sets up printing for PDF output Starts a print session Opens a schematic and returns value indicating success or otherwise Opens a schematic without displaying it Re turned ID useable by various functions and com mands Sp
300. ed with each file type can be set with the options dialog box opened by menu File Options General You can combine multiple file types delimited by amp For example Netlist amp Model will select both netlist and model file types Argument 2 String array that specifies a number of options Any or all of the following may be included ChangeDir If present the current working directory will change to that containing the file selected by the user Open If present a File Open box will be displayed other wise a Save As box will be displayed NotExist If used with Open the file is not required to already exist to be accepted AV If present an All files entry will be added to the Files of type list Argument 3 Initial file selection Returns Return type string GetSimplisExitCode Returns the application exit code for the most recent SIMPLIS run This may be used to determine whether SIMPLIS completed its run successfully Arguments No arguments Returns Return type real Returns a single value according to the most recent SIMLIS run GetSimulationErrors Returns all errors raised by the most recent simulation SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string array Returns a string array with all errors raised by the most recent simulation If the simulation ran correctly with no errors an e
301. ee A kD AEM oa oe add 454 Create Tool Button yc code A ad SS AA Al et ee ee EEN RDO EG 455 CursorModess lo sa AA wean ete de E en ce as ee A as A ie a Ea a 456 Curve Pet athe nde ed ok LE dee ee SAAS BASE oe a 456 CuiveHditCopys sc agus dea eden EL de aoe eo we e e ele de 458 DetButtone s zr 4 boa ca E eR OE ate Mage Behe A ala EtA 458 Detin Tool Bai ii tte bh a oe OR A AB A arene 459 DetKey feted dake atk Sere a bE a a 460 WerMiens 2 2 gs 2 ns el dd ds he ar Se o one rah Ate E 8 462 Dl epi tos A AK ett ek MOE LTR e Dy Od AN hb da 465 DEL Gry ick ge rah oF do PSN E Ed A den Ue Toe a Bh Tae CPE Mh ie Be Si TR DE te 465 Delete Loko aa AA pA ea ee ee eee se lis SRA i ee E E a 466 Delete AXIS Lac a eee bE SSS A Ae ee EE Ee es 466 DeleteGraph Anno san a ga oe A Aen RR ea dtd PP 466 DeleteSymbolProperty 2 aaa ee ee 466 DelG toup wef 43 eGe e at lara Oe es eae Cole ee 467 Delb gend Props a tee ee ge ge geek ee Aah Gok he a hk Ae tele gg ged G 467 Wel MGiiis s a ri naa eal do dole Ge Ate de o bade Reh Bhat ie i E E 468 DelPropiies 2 2 EA A ere eee ee ee A BE A 468 Del SYliinc ie a a Bie Re ok Ee de le a A A eS ee A AOE EE Oe ee YG 469 DestroyRunning Dialog suc amp 4 fie Be ior koe Ge EE RAD Ae ORS eS 469 Detach nea agaaa one Ge ude ee ee a Rh S A Ae Aone aS eS a 469 Discard et Seance Alda e ee eek Ak rr I hat ot a 469 Display doha a RSE eA A EA oo a A eS 470 TPA WAT aae a Geet ee Atte ee Maa Page es PS ht A ene Me GREG 470
302. efault Description 1 string Yes Command 2 real Yes Interval 3 string array No 2 options Argument 1 Command to run This can be a primitive command or the name of a script and may include arguments to the command or script Argument 2 Interval in milliseconds The first event will occur after the interval time has elapsed SIMetrix SIMPLIS Script Reference Manual Argument 3 Options String array containing any combination of oneshot and echo oneshot defines a timer that will trigger only once echo enables message output in the command shell Returns Return type real The function returns an integer id This can be used as an argument to functions DeleteTimer page 99 EditTimer page 126 and GetTimerInfo page 225 CV Returns the data for a curve For a single curve i e not a group of curves as created from a Monte Carlo plot only the first argument is required and this specifies the curve s id If the curve id refers to a group of curves created by a multi step run then the second argument may be used to identify a single curve within the group The data for the complete curve set is arranged as a Multi Division Vector on page 19 The second argument specifies the division index If absent the entire vector is returned Note that the arguments to this function for version 4 and later have changed from earlier versions This function is identical to GetCurveVector page 163 and is
303. eference Manual ParseParameterString Parses a string of name value pairs and performs some specified action on them The function can read specified values and return just the values It can write to specific values and return a modified string It can also delete specific values Arguments Number Type Compulsory Default Description 1 string Yes String to parse 2 string Yes Parameter names to pro cess string Yes action 4 string No Write value string No Options Argument 1 String to parse This is a list of name value pairs but may also contain any number of unlabelled values at the start of the string The number of unlabelled values must be specified in argument 3 see below Examples Without any unlabelled value W 1u L 2u AD 3e 12 AS 3e 12 With 1 unlabelled value 2 0 DTEMP 25 0 The above shows an equals sign separating names and values but these may be omitted Argument 2 String array listing the names to be processed If reading see below only the values of the names supplied here will be returned If writing the names listed in this argument will be edited with new values supplied in argument 4 If deleting these names will be removed Unlabelled parameters may be referenced using the special name unlabelled followed by the position Le the first unlabelled parameter is position 1 the second 2 and so on So unlabelled 1 refers to the first unlabelled parameter Argument 3 1 or 2 eleme
304. eference Manual Returns Return type string array The style information for the requested styles If a style does not exist and the global flag has not been set the default style will be returned If a style does not exist and the global flag has been set no style information is returned for that style StyleLineTypes Returns list of possible style line types Arguments No arguments Returns Return type string array List of available style line types StyleNames Returns a list of existing style names Arguments Number Type Compulsory Default Description 1 string array No Optional arguments Argument 1 If set each element can provide an optional argument Options are Argument Description global Returns only global styles NotProperty Returns only styles that are not property styles Property Returns only styles that are property styles Returns Return type string array List of in use style names 365 SIMetrix SIMPLIS Script Reference Manual Subst Char Scans string in arg 1 and replaces characters found in arg 2 with the character specified in arg 3 This function is case sensitive Returns the result Arguments Number Type Compulsory Default Description 1 string Yes string to process 2 string Yes characters to replace 3 string Yes character to substitute Returns Return type string SubstString Replaces a substring in a string This function is case sensitive
305. efines the positioning of the arrow as 4 integer values relating to position within the schematic x1 yl x2 y2 DrawPin DrawPin forcerepeat loc x y base name Initiates pin draw mode in the currently open symbol editor In this mode a pin symbol is presented for the user to place at the desired location on the symbol sheet Parameters forceRepeat If specified the operation will be repeated until the user cancels with the right mouse button Each new pin be named according to the base name appended with an integer to make it unique loc base name Name of pin Ifa pin of that name is already present on the schematic the name will be appended with a number to make it unique If the base name is already appended with a number that number will be incremented until an unused name is found Echo Echo text Echoes text to the message window or to a file Parameters append If present text is appended to filename If filename does not exist it is created SIMetrix SIMPLIS Script Reference Manual box Text is output inside a box composed of asterix characters This is useful for titles and headings Currently only works correctly when used with file or append debug file If present text is output to filename If filename exists it is overwrit ten handle File handle as returned by the function OpenFile page 283 Text will output the file referenced by this handle html If present text is assumed t
306. el file or netlist file 499 SIMetrix SIMPLIS Script Reference Manual OpenBasicTextEditor on page 497 to open a plain text file OpenScript on page 502 to open a script OpenVerilogA on page 503 to open a Verilog A source file OpenVerilogHDL on page 504 to open a Verilog HDL source file OpenAsciiFile on page 496 to open a schematic file in the text editor OpenNetlist OpenNetlist filename Opens a SPICE netlist or model file in the text editor This will apply syntax highlighting for the simulator command language Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto filename Path of netlist or model file to open See Also OpenLogicDefinitionEditor on page 499 to open a logic definition file for the abritrary logic block OpenBasicTextEditor on page 497 to open a plain text file OpenScript on page 502 to open a script OpenVerilogA on page 503 to open a Verilog A source file OpenVerilogHDL on page 504 to open a Verilog HDL source file OpenAsciiFile on page 496 to open a schematic file in the text editor OpenPrinter OpenPrinter portrait numCopies num copies index index title title printer printer greyscale on off Starts a print session This may be used for customised or non interactive printing See Non interactive and Customised Printing
307. elLibsChanged RemoveModelFile SearchModels WC Probe PropF lags PropFlags2 PropFlagsAll PropFlagsAnnotations PropFlagsWires Prop Value Prop Values PropValues2 PropValuesAll PropValuesAnnotations Prop Values Wires ReadF110ptions ReadSchemProp SelectCount SelectedProperties Selected Wires SelSchem SetComponent Value SetReadOnlyStatus TemplateGetProp Value TemplateResolve SIMetrix SIMPLIS Script Reference Manual WirePoints Wires 3 1 11 Schematic Styles GetNextDefaultStyleName GetSelectedStyleNames PropOverrideStyle AddSymbolFiles CompareSymbols ExistSymbol Get AllSymbolPropertyNames GetNamedSymbolPins GetNamedSymbolPropNames GetNamedSymbolProp Value 3 1 13 Script CommandStatus Execute ExistCommand 3 1 14 Simulator GetAllSimulatorDevices GetAnalysisInfo GetAnalysisLines GetConvergencelnfo GetCurrentStep Value GetDeviceDefinition GetDevicelnfo GetDeviceParameterNames GetDevicePins GetDeviceStats Get DotParamNames Get DotParamValue GetEmbeddedFileName GetInstanceParamValues WriteF 11 Lines WriteF110ptions SelectedStyleInfo SetPropertyStyles StyleInfo 3 1 12 Schematic Symbols and Library GetSymbolArcInfo GetSymbolFiles GetSymbolInfo GetSymbolOrigin GetSymbolPropertyInfo GetSymbolPropertyNames GetSymbols GetLastError IsDocumented IsScript GetInternalDeviceName Get ModelName GetModelParameterNames GetModelParameters GetModelParameter Values GetM
308. em will be tested but there are no rules to determine which instance will be used An example of this property would be a handle name such as 12 237 SIMetrix SIMPLIS Script Reference Manual Argument 4 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type real Outcome of test TRUE 1 or FALSE 0 If no instance matches argument 2 and 3 an empty value will be returned HaveFeature Detrmines whether a specified license feature is available Arguments Number Type Compulsory Default Description 1 string Yes Feature name Argument 1 gt 6 Name of license feature Currently may be one of basic advanced micron rtn simplis_ if AD schematic or scripts Returns Return type real Returns 1 0 if the license feature is available otherwise it returns 0 0 HavelnternalClipboardData Returns the number of items in the specified internal clipboard The internal clipboard is currently only used for graph curve data Arguments Number Type Compulsory Default Description 1 string Yes Data type Argument 1 The name of the internal clipboard to be queried Currently there is only one internal clipboard so this argument must always be GraphCurve
309. ement cursor Position is determined by z main y main is only used for non monotonic curves e g Nyquist plots where there is more than one y value for a given x value Plot Plot x1 xlimit low xlimit high y1 ylimit_low ylimit_high xdelta xdelta ydelta ydelta ylabel ylabel xlabel xlabel yunit yunit xunit xunit title graph title xlog ylog loglog dig new select name autoxlog autoylog xauto yauto newaxis newgrid axisid id autoaxis bus hex dec decsigned bin y expression x expression Plot can be used to add a new curve to an existing graph created with Plot or to change the way it is displayed Parameters autoAxis Does nothing For compatibility with the command Curve page 456 autoXlog If specified the x axis will be logarithmic if the x values are logarith mically spaced auto Y log Same as autoxlog except that if x values are logarithmically spaced the Y axis will be logarithmic axisid Does nothing For compatibility with the command Curve page 456 bus Specifies that the curve is displaying a bus value dig If specified the curve will be plotted on a digital axis Digital axes are stacked on top of main axes and are sized and labelled appropriately for digital waveforms loglog Forces both y and x axes to be logarithmic name If specified curve will be named curve name new Opens a new graph window newAr
310. emoveDialog page 60 except that the return value has an additional element to specify the number of selected items This makes it possible for the selected items list to be empty Arguments No arguments Returns Return type string array The first element of the result returns the number of items in the selected list which can be zero This is followed by the items themselves The return value will an empty vector if Cancel is selected AddSymbolFiles Adds file or files to list of installed symbol library files Arguments Number Type Compulsory Default Description 1 string array Yes Files to add SIMetrix SIMPLIS Script Reference Manual Argument 1 A string array containing the path names of the symbol libraries to be installed The names may use symbolic constants Returns Return type Real Number of files actually added to the library This may not be the same length as the argument as the function will not install files that are already installed area Calculates the area under the curve of the argument This function returns a single value that can be used for measurements The integ page 250 function may be used to obtain a vector of the area area arg is equivalent to the value of integ arg length arg 1 Arguments Number Type Compulsory Default Description 1 real array Yes Vector 2 real No 0 0 Start x value 3 real No Final x value in data End x value Argument 1 Vector
311. ension INI and is used for storing configuration information INI files are used by many applications and follow a standard format as follows section_name1 key1 valuel key2 value2 section_name2 key1 valuel key2 value2 323 SIMetrix SIMPLIS Script Reference Manual etc There may be any number of sections and any number of keys within each section The ReadInikey function can return the value of a single key and it can also return the names of the all the keys in a section as well as the names of all the sections Arguments Number Type Compulsory Default Description 1 string Yes Inifile name 2 string Yes Section name 3 string Yes Key name Argument 1 File name You should always supply a full path for this argument If you supply just a file name the system will assume that the file is in the WINDOWS directory This behaviour may be changed in future versions For maximum compatibility always use a full path Argument 2 Section name If this argument is an empty string the function will return the names of the sections in the file Argument 3 Key name If this argument is an empty string and argument 2 is not an empty string the function will return the names of all the keys in the named section Returns Return type string array string array ReadRegSetting Reads a string setting from the windows registry Currently this function can only read settings in the HKEY_CURRENT_USER and HKEY_LOCAL_
312. ent 1 for the value specified in argument 2 The input vector must be monotonic i e either always increasing or always reducing This is always the case for the reference vector see Vector References on page 21 of a simulation result If the input vector is increasing positive slope the return value is the index of the value immediately below the search value If the input vector is decreasing negative slope the return value is the index of the value immediately above the search value Arguments Number Type Compulsory Default Description 1 real Yes Vector 2 real Yes Search value Returns Return type real log Returns log to base 10 of argument If the argument is real and 0 or negative an error will result If the argument is complex it will return a complex result even if the imaginary part is 0 and the real part negative An error will always occur if both real and imaginary parts are zero This is identical to log10 on page 261 We recommend always using log10 log variably means In or log10 depending on the program language etc and it is rarely clear exactly which is meant 260 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns log to base 10 of argument log10 Returns log to base 10 of argument If the argument is real and 0 or negative an error will result
313. ents 2 and 3 Each element will hold a value for the property specified in argument 1 The function will return an empty vector if the specified schematic could not be found If no instance matches arguments 2 and 3 an empty string will be returned PropValues2 Returns a property value for instances identified by arguments 3 and 4 This function replaces PropValues page 309 Its behaviour is similar but the arguments have been rearranged and its behaviour in the event of no instance match is different and more convenient 310 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Property name whose value is required 2 real array No 1 Schematic handle and sort option 3 string No Use selected components Property name to identify if omitted instance 4 string No All instances with prop Property value to identify erty name in arg2 instance Argument 1 Property whose value is to be returned Argument 2 First element is a schematic handle as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If equal to 1 the currently selected schematic will be used A second element may be supplied and if non zero the results will be sorted by location Otherwise they will not be sorted Argument 3 Along with argument 4 if present these arguments identify the instances
314. er Name of button This may be one of the pre defined types described in DefineToolBar on page 459 in which case this command will redefine its properties You may also specify a new name to create a completely new button 455 SIMetrix SIMPLIS Script Reference Manual graphic Graphical image to be displayed on the button This may be one of the pre defined images listed in DefineToolBar on page 459 or you may use a user defined image specified in a file The file must be located at simetrix root support images where simetrix root is the top level directory in the SIMetrix tree The file may use windows bitmap bmp portable network graphic png or JPEG jpg formats The PNG format supports masks and this format must be used if transparent areas are needed in the graphic hint Text that describes the operation of the button This will be dis played when the user passes the mouse cursor over the button See Also CreateToolBar on page 454 GetToolButtons on page 226 CursorMode CursorMode onl off toggle step stepref stepshift steprefshift Switches cursor mode of selected graph In cursor mode two cursors are displayed allowing mea surements to be made See the User s manual for more information on cursors Parameters on Switch cursors on off Switch cursors off toggle Toggles on off step Step cursor to next curve stepref Step reference cursor to next curve stepShift Steps cursor to next curve
315. er of the parameters in this case will match the return value of parameter names from the function GetDeviceParameterNames page 166 Argument 3 If set to readback and argument 2 is empty this function will return the values of all read back values for the devices read back values are values calculated during a run and give useful information about a device s operating conditions Note that the value returned will reflect the state of the device at the last simulation point For example if a transient run has just been performed the values at the final time point will be given If a small signal analysis has been performed the results will usually reflect the DC operating point conditions Returns Return type string or string array If argument 2 is provided and valid will return a single string expressing the value of the parameter If arg 2 is missing or empty a string array will be returned with all parameter values GetInstancePinLocs Return an array of pin locations for the symbol identified by arguments 1 and 2 184 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string No Property name 2 string No Property value 3 string No relative Options 4 real No 1 Schematic ID Argument 1 Property name to identify instance Along with parameter 2 if these arguments are not supplied the selected instance if any will be used instead If there are no
316. erated by the simulator start with their keep status set to off This means that it will automatically be deleted when a certain number set by the GroupPersistence option of new groups are created If the keep status is set to on then automatic deletion is disabled Groups read from a file using OpenGroup start with their keep status set to on Let Let vector expression Evaluates a vector expression To be meaningful vector expression must contain the assignment operator If vector expression is omitted a list of vectors in the current group will be displayed Parameters vector expression Vector expression to be evaluated Information on vector expressions can be found in Expressions on page 11 Listing Listing error filename filename append filename anno Displays or outputs to a file a listing of the current netlist Note the current netlist is the netlist for the circuit most recently run or checked It will include all models and subcircuits pulled in from libraries 482 SIMetrix SIMPLIS Script Reference Manual Parameters anno append Result is appended to file of name filename converted errors Only lines that are in error are output fileName Result is written to file of name filename icap pspice spice List Models ListModels filename Generates a dictionary of all models and subcircuits currently available to the simulator e g installed with menu File Model Libr
317. ere are some that can accept any type In the event that the type presented is wrong SIMetrix will attempt to convert the value presented to the correct type To convert a numeric value to a string is straightforward the value is simply represented in ASCII form to a reasonable precision When a string is presented but a numeric value is required the string is treated as if it were an expression and is evaluated If the evaluation is successful and resolves to the correct type the result is used as the argument to the operator or function If the evaluation fails for any reason an error message will be displayed Aliases An alias is a special type of string Alias strings hold an expression which is always evaluated when used The simulator outputs some of its data in alias form to save memory and simulation time For example the currents into subcircuit pins are calculated by adding the currents of all devices within the subcircuit connected to that pin If its efficient to do so this current is not calculated during simulation Instead the expression to perform that calculation is stored as an alias so that it can be calculated if needed Aliases may also be created using the MakeAlias page 485 command Statements and Commands Scripts are composed of a sequence of statements Statements usually comprise at least one com mand and optionally control words such as if and then A command is a single line of text starting with one of the comma
318. erty or the pin however there are no rules to determine which The displayed names used for pins are represented as properties and this function can be used to gain information about them The equivalent property name for a pin is the pin name prefixed with Pin Format of result is as follows Index Description 0 Property name 1 Property flags value see Prop Attribute flags on page 510 for details 2 Property value 3 Number of properties selected 4 Number of pins selected GetSymbolProperty Names Returns string array containing names of all selected properties in the currently open symbol editor sheet If there are no selected properties or the symbol editor is not open the function will return an empty vector Note the displayed names used for pins are represented as properties and this function can be used to list them The equivalent property name for a pin is the pin name prefixed with SPin Arguments No arguments Returns Return type string array GetSymbols Returns a string array containing information about installed symbols Arguments Number Type Compulsory Default Description 1 string No name Options 2 string No all Catalog name 222 SIMetrix SIMPLIS Script Reference Manual Argument 1 Defines what the function returns as defined in the following table Options value Description description Returns the user name of each symbol catal
319. es are provided it will search for a selected element of the different types in order meaning that if there is a match for the first array index any subsequent indexes will not be searched Available elements types are ArrowAnnotation ImageAnnotation Instance LineAnnotation ShapeAnnotation Text Annotation TitleBlock Wire Returns Return type string Handle of the first selected element of the type requested or an empty string if no matching elements were found Get Fonts Returns the names of all objects in the program whose font may be edited The function is usually used in conjunction the function GetFontSpec page 177 the function SelectFontDialog page 344 and the command EditFont page 473 176 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes options Argument 1 If set to supportcolour will return only fonts that have an editable colour Returns Return type string array Get FontSpec Returns the current font specification for the object whose name is passed to argument 1 Valid object names can be obtained from the GetFonts function page 163 The return value may be used to initialise the SelectFontDialog page 286 which allows the user to define a new font The return value represents the font of the object as a string consisting of a number of values separated by semi colons The values define the font in terms of its type f
320. ess given could refer to more than one item Incomplete Address The address was incomplete For example it might refer to a valid part without specifying which parameter is to be written or read MissingChild Address refers to a hierarchical block which is missing that is the schematic file could not be found WriteProtected The operation required an instance property to be edited but that property was protected and could not be edited NewProp A new property was added to the part to complete the required edit This is not necessarily an error Some pa rameters will assume default values if not present If set to an explicit value a property may be added to the schematic instance Notes If the address requires a hierarchical schematic to be written that schematic will be automatically opened SetInstanceParamValue Script based multi step analyses use a script call to define each step This function can be used in such a script to a set an instance parameter SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string yes Instance name 2 string Yes Parameter name 3 string Yes New parameter value 4 real No 0 Vector index for vector pa rameters Returns Return type String indicating status of function call Return string Description success badparam noinstance nocircuit Example Function successful Unknown
321. estore itself Arguments Number Type Compulsory Default Description 1 string Yes Window name 399 SIMetrix SIMPLIS Script Reference Manual Argument 1 The window name as given by the function WM_ Get WindowNames page 403 Returns Return type string array Each element is a string that can be used to restore the widget WM_ GetContent WidgetsLayout Returns layout information for the content widgets editors etc that can be used to restore the positioning within the window Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1 The window name as given by the function WM_ Get WindowNames page 403 Returns Return type string Layout information for the content widgets as a single string WM_ GetContent WidgetTypes Returns the workspace view types in a particular window Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1 The window name as stated on the window title bar of the window to report the workspace view elements for 400 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array List of workspace view types in the window requested WM_ GetCurrent WindowName Returns the name of the highlighted window Arguments No arguments Returns Return type string Name of the highlighted window WM_ GetNumberModifiedEditors Returns the number of editors that have a
322. etDefaultEncoding encoding When text files such as scripts netlists and Verilog A files are open in text editors and when processed the encoding is expected to be in UTF 8 8 bit UNICODE The encoding affects 532 SIMetrix SIMPLIS Script Reference Manual how characters are encoded in the file UTF 8 is a universal format that is able to render all characters world wide but retains compatibility with 7 bit ASCII If at least one character in an input sequence is detected that is not a valid UTF 8 sequence an assumption has to be made as to what the encoding is The default is to use the setting defined by the system locale which can be set in the control panel This function can be used to set an alternative encoding The argument to the command is the encoding Some possible values are default resets to system locale windows 1252 the default on English language windows systems shift jis Japanese characters UTE 8 Input unconditionally assumed to be UTF 8 A complete list of valid values is returned by the function GetCodecNames page 156 Note that the default encoding only affects behaviour when an input sequence does not comply with UTF 8 Some character encoding schemes e g UTF 16 cannot be easily differentiated from UTF 8 and so are not easily detected It is usually not appropriate to use this command to set such a default encoding SetGraphAnnoProperty SetGraphAnnoProperty object id property name property value
323. eters and netlist the circuit If any of the components don t exist then we will find out here array to store original values so that we can restore them later Let origValues MakeString numComponents Unselect Let error 0 Scan through list of components for idx O to numComponents 1 Select it Select prop ref components idx if SelectCount 0 then Select count is zero so select failed This means the circuit doesn t have this component Output a message and set error flag Echo Cannot find component components idx Let error 1 else if HasProperty value then Save original value to be restored later Let origValues idx PropValue value Set value as a parameter of name which is the same as the ref Let newVal amp PropValue ref amp Prop value newVal else The component does not have a value property to alter Echo Component components idx Echo does not have a value Let error 1 endif endif Unselect 562 SIMetrix SIMPLIS Script Reference Manual next idx We have changed all the components so now we can netlist the circuit if NOT error then Netlist design net endif Once we have the netlist we can restore the original values Unselect for idx 0 to numComponents 1 Select prop ref components idx if SelectCount lt gt 0 then if HasProperty value then Prop value origValues idx endif endif Unselec
324. eturn type real See Also ReadConfigSetting on page 321 WriteF11Lines Writes lines directly to the F11 window overwriting any existing lines 404 a l SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes Lines Argument 1 Lines to write in the form of a string array Each element in the array creates a new line Returns Return type real Returns 1 0 if the function is successful otherwise returns 0 0 The function will only fail if there are no schematics open See Also ReadF110Options page 322 WriteF110ptions page 405 GetF11Lines page 171 AppendText Window page 444 WriteF110Options Write SIMetrix simulator options to the F11 window Arguments Number Type Compulsory Default Description 1 string array Yes Option values Argument 1 Array of semi colon delimited string in form name value type name Name of option value Value of option type Type One of BOOL INT REAL or STRING The given type determines how the value is interpreted REAL values can use engineering suffixes e g 1k will be interprted as 1000 BOOL options can have values of true or 1 to indicate a true condition All other values will be treated as false STRING values will entered literally Unlike ReadF110ptions page 322 this function does not check that the option names entered are valid 405 SIMetrix SIM
325. ew Buttons and Editing Buttons 00 0 587 Creating New Toolbars e u eee yk do es oe eee A ee a a 588 Pr defined Buttons cueca adds Pee a DEG a 588 Custom Dialog Boxes ecu gece ee ak a A Ke SHR Bo ee oe ge ee 4 590 OVETVIEW cots ty Bid cee dod Se Stk ar dera a a She he Sie Lave at syste te he I gh ob aortas 590 Starting SIMetrix Dialog Designer o e 590 Developing DialOgss tec xg ce ests a A a A a rs 591 The Widgets wa ares tee a ae es ae eG Ge EL Ae sae ee 591 Using Geometry Management 594 Examples ra a a er ae ie E A EE IA DIAS 594 ExecuteDialog Function 2482085 5 e508 e ee eee ERE GODS SEE 595 Pertormance a s ae ee bh a eb ee ee AEE EE EEE EE 596 SIMetrix SIMPLIS Script Reference Manual Contents Predefined Buttons 100 eg yy Bee ae eee i AA A Sg is OS 596 SIMetrix SIMPLIS Script Reference Manual Chapter 1 Introduction SIMetrix features a simple interpreted script language loosely based on BASIC in which most of the user interface is written This manual provides the means for users sympathetic to the concept of computer programming to develop their own scripts or to adapt the user interface by modifying the internal scripts We have identified three main applications for script development although there may be others we haven t thought of These are 1 User interface modification perhaps to suit individual taste or for specialised applications 2 Automated simu
326. ext 2 string array No empty Dialog Configuration 3 string array No empty File history an other configuration Argument 1 The argument is a string array of length 3 which defines the input file output file and description text Index Purpose Notes Default 0 Input file name populates the input file name combo box empty 1 Output filename populates the output file name combo box empty 2 Description text populates the description combo box empty Argument 2 The argument is a string array of length 13 which defines the dialog text Index Purpose Notes Default 0 Dialog Box Caption empty 1 Box Title empty 2 Upper group box ti Description tle 3 Upper group box empty text 4 Input file group box Input file title 5 Input group box empty text 6 Output file group Output file box title 7 Output group box empty text 8 Checkbox text Open out put file when complete 9 Description group File descrip box title tion optional 10 Description group empty box text 385 SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default 11 Flag to hide the de If set to 1 the description groupbox will 1 scription groupbox be hidden 12 Help context id For internal use only empty Argument 3 The argument is a string array of length 8 which defines the memory and file selection dialog filters Index Purpose Notes Default 0 Input file history ke
327. f the path If the path actually points to a directory the value returned will be the parent directory The function does not check that the path supplied actually exists Arguments Number Type Compulsory Default Description 1 string yes Path to file May be a rela tive path Returns Return type Full directory path where file is located GetFileExtensions Returns a string array containing all valid extensions without prefixed 7 for the given file type Arguments Number Type Compulsory Default Description 1 string Yes File type Returns Return type string array Returns a string array containing all valid extensions without prefixed for the given file type The extension returned in the first element is the default File extensions can be changed in the general options dialog box File Options General and are stored in a number of option variables These are listed in the following table Argument Used for Option name Default Schematic Schematic files SchematicExtension sxsch Data Data files DataExtension sxdat dat Text Text files TextExtension txt log Symbol Binary symbol files SymbolExtension sxslb slb 173 SIMetrix SIMPLIS Script Reference Manual Argument Used for Option name Default LogicDef Logic definition files used LogicDefExtension ldf with arbitrary logic block Script Script files ScriptExtension sxscr Model Model file
328. f a simulator option as used by the most recent analysis Returns type and default value of a simulator op tion setting Return list of simulator options Returns statistical information about the most re cent run Returns the current status of the simulator Returns all Safe Operating Area definitions spec ified in the most recent analysis Returns the maximum and minimum values reached for all SOA definitions Returns the overload factor for each SOA defini tion Returns the SOA results for the most recent sim ulation Returns information on symbol editor arc Returns full paths of all installed symbol library files Returns information on symbol editor symbol Returns the location of the symbol editor s sym bol origin point Returns information about symbol editor symbol properties Returns symbol editor symbol property names Returns array of available schematic symbols Returns information about the user s system Creates a temporary file name Returns text in the selected text based editor SIMetrix SIMPLIS Script Reference Manual Function Name Description GetThreadTimes GetTimerInfo Get TitleBlockInfo GetToolButtons GetUncPath Get UserFile Get VecStepParameter Get VecStep Vals Get WidgetInfo Get WindowNames GetXAxis GraphImageCapture GraphLimits GroupDelay Groups GuiType Hash HashAdd HashCreate HashDelete HashSearch HasLogSpacing HasProperty HaveFeature
329. fault or type If set to default function returns the default value instead of the name If set to type returns the type of the option one of real integer boolean or string Returns Return type Array of strings holding names of all available options that can be set using the OPTIONS state ment Optionally can return default value or type according to argument 2 See Also GetSimulatorOptionInfo page 214 GetSimulatorStats Returns statistical information about the most recent run Arguments No arguments Returns Return type real array Returns a 30 element real array providing statistical information about the most recent run The meaning of each field is described below 215 SIMetrix SIMPLIS Script Reference Manual Index Description 0 Number of event driven outputs 1 Number of event driven ports 2 Number of event driven instances 3 Number of event driven nodes 4 Number of equations matrix dimension total number of nodes including internal nodes 5 Total number of iterations 6 Number of transient iterations 7 Number of JI2 iterations First attempt at DC bias point 8 Number of GMIN iterations 9 Number of source stepping iterations 10 Number of pseudo transient analysis iterations 11 Number of time points 12 Number of accepted time points 13 Total analysis time 14 Transient analysis time 15 Matrix load time The time needed to calcu
330. for control or A for alt Note that in windows the right hand ALT key performs the same action as CONTROL ALT A command line command or commands to be executed when the specified key is pressed Multiple commands must be separated by semi colons Unless the command string has no spaces it must wholly enclosed in double quotation marks 460 SIMetrix SIMPLIS Script Reference Manual option flag A number between 0 and 5 to specify the manner in which the com mand is executed These are as follows 0 4 Default Command is echoed and executed Any text already in command line is overwritten 5 Immediate mode Command is executed immediately even if another operation such as a simulation run or schematic editing operation is currently in progress For other options the command is not executed until the current operation is completed Only a few commands can be assigned with this option The following commands can be used with the flag set to immediate mode Cancel page 445 DefMenu page 462 DefKey Echo page 471 Let page 482 Move page 487 Pan page 505 Pause page 505 Quit page 512 RotInst page 519 Select page 529 ScriptAbort page 528 ScriptPause page 528 ScriptResume page 528 Shell page 538 Wire page 550 Zoom page 555 Note the command Let page 482 can be used to set a global variable which can then be tested in running script This is a convenient metho
331. for the simulation Arguments No arguments Returns Return type real array Array of values of length equal to the number of threads used for the most recent simulation Each value represents the execution time in seconds used for each device thread Example Get TimerInfo Returns information about a timer object created using CreateTimer page 81 Arguments Number Type Compulsory Default Description 1 real Yes Timer id Argument 1 Timer id returned by CreateTimer page 81 Returns Return type 225 SIMetrix SIMPLIS Script Reference Manual Notes If a timer is defined using the oneshot option the return value for the timer interval will change after the timer has triggered Before the timer triggers the specified interval will be returned After the timer has triggered it will return 0 Get TitleBlockInfo Returns information about the selected schematic title block Arguments No arguments Returns Return type string array Information about the selected title block Index Description 0 Company name Title Author Notes Layout either horizontal or vertical Logo Version Date NOT FW NY FH Get ToolButtons Returns name and description for available tool buttons Arguments Number Type Compulsory Default Description 1 string No All Button class Argument 1 Class name of buttons With no user defined buttons this can be empty or component
332. for the vector otherwise the current group is also searched See Groups on page 18 for further details Arguments Number Type Compulsory Default Description 1 string Yes vector name 2 string No global options Returns Return type real exp Returns e raised to the power of argument If the argument is greater than 709 016 an overflow error occurs Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array The exponential of the argument 138 SIMetrix SIMPLIS Script Reference Manual fft Performs a Fast Fourier Transform on supplied vector The number of points used is the next binary power higher than the length of argument 1 Arguments Number Type Compulsory Default Description 1 real array Yes vector 2 string No Hanning window function Argument 2 Values are either Hanning default or None Returns Return type complex array Notes User s should note that using this function applied to raw transient analysis data will not produce meaningful results as the values are unevenly spaced If you apply this function to simulation data you must either specify that the simulator outputs at fixed intervals select the Output at PRINT step option in the Simulator Choose Analysis dialog box or you must interpolate the results using the Interp page 251 function The FFT plotting menu items
333. function returns a string array with the same format as argument 1 and assigned with the user s settings If the user selects Cancel the function returns an empty vector SIMetrix SIMPLIS Script Reference Manual Get ActualPath Returns actual file or directory path as a full path even if the path passed is a symbolic or hard link If the path is a network share it will return a server style UNC path It will also convert 8 3 short paths to long paths Path returned will always use native path separators i e backslashes but will accept forward slashes on input This will return an empty string if the object pointed to does not exist or cannot be opened Arguments Number Type Compulsory Default Description 1 string Yes Path Returns Return type string Resolved path Get AllCurves Returns an array listing id s for all curves on currently selected graph All curves are referred to by a unique value that is the id Some functions and command require a curve id as an argument Arguments No arguments Returns Return type string array Get AllSimulatorDevices Returns a list of semi colon delimited strings containing information on all built in simulator de vices Arguments No arguments Returns Return type string array Array of semi colon delimited strings The strings in the field are defined in the following table 150 SIMetrix SIMPLIS Script Reference Manual Field Description
334. g 156 SIMetrix SIMPLIS Script Reference Manual GetCompatiblePathName Returns a short path name if the supplied path has white space or non ascii characters This function may not function as desired on all systems as not all file systems support short path names The function only replaces the parts of the path that have spaces or non ASCII characters A short path is one that complies with the DOS 8 3 naming convention Arguments Number Type Compulsory Default Description 1 string Yes Path Argument 1 Input path Maybe full or partial and the function will return its argument in the same form that it it won t convert to a full path If the input path does not exist this function will simply return its argument unmodified Returns Return type string See Also GetLongPathName on page 192 GetComponent Value Same as SetComponent Value page 347 except that it can only read values Refer to SetCompo nentValue page 347 for full details Arguments Number Type Compulsory Default Description 1 string Yes Address 2 real No 1 Schematic ID Argument 2 Schematic ID as returned by the OpenSchematic page 286 function This allows this function to be used with a schematic that is not open or not currently selected If equal to 1 the currently selected schematic will be used 157 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Refer to SetComponent Value
335. g and memory hungry Passing by reference only passes the location of the data so is much more efficient In the SIMetrix script language however you can efficiently pass large arrays by value as it uses a technique known as copy on write that does not make a copy of the data unless it is actually modified Built in Scripts All the scripts needed for the standard user interface are actually built in to the executable file The source of all of these can be found on the installation CD Debugging Scripts Displaying Commands Executed You can watch the script being executed line by line by typing at the command line before starting the script Set EchoOn This will cause the text of each command executed to be displayed in the message window When you have finished you cancel this mode with Unset EchoOn SIMetrix SIMPLIS Script Reference Manual Single Step a Script Run the script by typing at the command line ScriptPause scriptname where scriptname is the name of the script you wish to debug To be useful it is suggested that you enable echo mode as described above To single step through the script press F2 Note that ScriptPause page 528 only remains in effect for the first script Subsequent scripts will execute normally Abort Currently Executing Script Press escape key To pause a currently executing script Press shift F2 Note that it is not possible to run other commands while a script is paused but you can
336. g box used to create a new property in the symbol editor E g as opened by Property Pin Add Property The first and third arguments initialise the Name and Value boxes respectively Argument 2 initialises the text location and property attributes For details on the meaning of attribute flags see Attribute Flags in the Prop command on page 510 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string No empty initial property name 2 string No 0 initial property attribute flags 3 string No empty initial property value 4 string No empty options 5 string No empty font override style 6 string No empty available font override styles Returns Return type string array length 3 String array of length 4 providing the users settings The function returns an empty vector if Cancel is selected Index Description 0 Property name 1 Flags value 2 Property value 3 Font override style AddRemoveDialog Opens a dialog box to allow user to select from a number of items This dialog box is used by the menu File Model Library Add Remove Models horizontal style and also by the schematic menu View Configure Toolbar vertical style The function will display in the lower list box all items found in both arguments 1 and arguments 2 with no duplicates In the top list box only the items found in argument 1 will be displayed The
337. ge 184 Example The following Show GetDeviceParameterNames M returns Oo UL 1o w 2 M 3 AD 4 as 5 pp 6 PS 7 NRD 8 NRS 9 IC VDS 10 IC VGS 11 IC VBS 12 TEMP Get DevicePins Returns information about the electrical connections on a specified simulator device Arguments Number Type Compulsory Default Description 1 string Yes device identifier 2 string array No options 167 SIMetrix SIMPLIS Script Reference Manual Argument 1 Device identifier If instname is specified in argument 2 this will be the instance reference of the device Otherwise the device name must be specified Argument 2 Can be a combination of instname and getterms instname means use the instance name to define the device getterms is functional for Verilog HDL devices and will instruct the function to return information on vectored terminals Returns Return type string array Array of semi colon delimited strings providing the following information about the electrical con nections to the specified simulator device Field index Description 1 Pin name 2 Direction in out or inout Currently only Verilog HDL devices will return anything other than in or out for this field 3 Discipline Verilog A devices will return the defined disci pline for the connection This field will be empty for other devices 4 Connection size for vector connections Currently only
338. ght TickCount Time ToLower TransformerDialog TranslateLogicalPath Returns names of image formats types that SIMetrix can create for graphical windows such as schematics and graphs Returns name of schematic symbol Opens the Symbol Library Manager dialog box Returns symbol name of specified instance Returns symbol names of schematic instances Set and or return pin order of symbol editor sym bol Returns the location of specified pin Returns the value of a system defined variable Returns the value of a system defined variable that accesses a file system path States whether particular system view is in the highlighted window Displays a spreadsheet style table to allow the user to enter tabular data Displays a table of combo boxes to allow select tabular data Tangent radians Tangent degrees Hyperbolic tangent radians Function returns the value of a property For use in template scripts only Resolve TEMPLATE value For use in template scripts only Returns whether the editor supports comments Returns a vector of weighting coefficients used to weight the harmonic coefficients before making a THD measurement Returns a time in seconds suitable for timing measurement Return system time as string Converts a string to all lower case Special function to select transformer character istics Converts symbolic path to a physical path SIMetrix SIMPLIS Script Reference Manual Function Name
339. gic zero The upper threshold is the value above which an analog signal is considered to be a logic one SIMetrix SIMPLIS Script Reference Manual Returns Return type real vector The return value is a real vector that is the binary weighted sum of the vectors defined by arg 1 and arg 2 but treating invalid values 0 5 as described above So in the example above the result will be BUS140 BUS1 1 2 BUS1 2 4 BUS1 3 8 Convert LocalToUnix Convert file name to UNIX format using as the directory separator Arguments Number Type Compulsory Default Description 1 string Yes File path Returns Return type string This function returns argument 1 but with any back slash characters replaced by forward slash See Also ConvertUnixToLocal page 75 Convert Unix ToLocal Convert filename to local format using backslash for the directory separator Arguments Number Type Compulsory Default Description 1 string Yes File path Returns Return type string Any forward slash found in the input string is replaced by a back slash Copy Tree Copy a directory tree Requires target to be empty 75 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Source directory 2 string Yes Target directory Returns Return type string Single string value providing status of operation as follows Value Description
340. graph window as returned in the user index field by the function GetWindowNames page 230 with the full option specified However since version 8 the GUI design of SIMetrix has changed and there is no longer a concept of different types of window All windows can contain many different types of tabbed object So this value is now ignored and the function returns the paths for all open graphs Returns Return type string array Returns an array of strings of length equal to the number of graphs currently open Each element in the array is the ID of the graph object displayed in the tabbed sheet The ID may be used in functions such as GetGraphObjPropValue page 179 to obtain information about the graph including curves axes titles etc GetGraphTitle Returns title of currently selected graph Arguments No arguments Returns Return type string Get GroupInfo Returns information about a group For more information on groups see Groups on page 18 Arguments Number Type Compulsory Default Description 1 string Yes Group name Argument 1 Group name for which information is required Enter to obtain information on the current group 181 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array String array of length 3 as described in the following table Index Description 0 Source file This is the path name for the file that contains the data for the group If
341. gth of argument 1 Contains all arg 1 items that match the filter as explained above SIMetrix SIMPLIS Script Reference Manual RadioSelect Opens a dialog box with any number of radio buttons The number of buttons visible depends on the length of argument 2 Six will be displayed if it is omitted Arguments Number Type Compulsory Default Description 1 real No 1 Number of buttons initially selected 2 string No empty Button labels string No Dialog box caption Other labels 4 string No Help context ID Argument 1 The number of buttons initially selected Argument 2 Specifies the labels for each button Argument 3 String array up to length 3 First element is dialog box caption and the second element is text label displayed above radio buttons If a third element is present a check box will also be displayed underneath the radio buttons The third element defines the label for this check box Argument 4 Specifies a help context id and if present a Help button will be displayed This is used by some internal scripts Returns Return type real The return value identifies the selected button with the top most being 1 If the user cancels the function returns 0 If the check box is displayed the return value will have length 2 with the second element holding the state of the check box See Also BoolSelect on page 65 EditSelect on page 121 ValueDialog on page 392 New ValueDialog on page
342. gument 1 File handle to close This is the value returned by the OpenFile page 283 function Returns Return type real CloseSchematic Closes a schematic handle opened using OpenSchematic page 286 Schematic handles are used to obtain information about schematics that are not currently being displayed For more information see OpenSchematic on page 286 Function returns 1 if successful otherwise returns 0 Arguments Number Type Compulsory Default Description 1 real Yes Schematic handle Returns Return type real CloseSchematicTab Closes a schematic using its ID A schematic s ID may be obtained from OpenSchematic page 286 or GetSchematicTabs page 205 Function returns 1 if successful otherwise returns 0 Arguments Number Type Compulsory Default Description 1 real Yes Schematic ID 70 SIMetrix SIMPLIS Script Reference Manual Returns Return type real CollateVectors Returns the data for the specified vectors in an interleaved manner suitable for writing out in common simulation data formats such as SPICE3 raw format Arguments Number Type Compulsory Default Description 1 string array Yes Vector names 2 string Yes Group name 3 real array No Start index length divi sion index Argument 1 List of vector names Note that they must be valid vector names in the group specified by argument 2 Expressions of vectors are not permitted Argument 2 Group name holding ve
343. gument 2 The vector to determine the period information for the vector input in the first argument It is expected that the vector input to the first argument will contain noise which precludes using the first argument for any timing measurements to fail For this reason the function finds the edges from this vector using a threshold of mazimumyminimum For this reason it is important that the vector have a uniform amplitude and is noise free around the trigger threshold It is possible that the input vector is free of noise in which case the same vector could be input to both the first and second function arguments An example of this would be the output of a gate which has well defined transitions and uniform maximum and minimum amplitudes Argument 3 A pre defined measurement function to make one of e minimum e maximum e mean e peak to peak e rms Argument 4 Determines the type of return curve one of e stepped e smooth Argument 5 Determines the edges used to process the timing vector one of e 1 Falling edges e 1 Rising edges SIMetrix SIMPLIS Script Reference Manual e 0 Both Rising and Falling Edges Returns Return type real array A real vector of the measured values from the input vector with reference values taken from the timing vector according to the fourth argument The return vector is formatted to be plotted directly on the waveform viewer Example A call to PerCycleValue Vout
344. hanges the style of the selected elements Parameters selected If set will change the selected style used style name The name of the style to apply ChangeSymbolProperty ChangeSymbolProperty value value flags flags loc x y code security code overridestyle override style name prop name Modifies a named or selected symbol editor property In the symbol editor pin names are also represented as properties so this command is also used to edit pin names Parameters code If specified the property of the specified name will be modified Oth erwise all selected properties will be modified flags New property attribute flags See Attribute Flags in the Prop com mand on page 510 446 SIMetrix SIMPLIS Script Reference Manual loc New absolute location If the location was previously relative this will be changed to absolute if this value is specified overridestyle Style name to use instead of the inferred style value New property value See Also Prop on page 510 AddProp on page 438 Clear Message Window Clear Message Window Clears the command shell message window Close Close schem graph Closes either the selected schematic or graph depending on argument given Parameters schem Use schem to close the selected schematic graph Use graph to close all graphs CloseGraphSheet CloseGraphSheet Closes the current tabbed sheet in the selected graph window If the window
345. he dialog used by the schematic s Save Special menu Splits a character delimited string into its com ponents Return name of currently executing script Search for a string in a list of strings Special purpose used by library installation Re turns pathnames of SPICE compatible model files SIMetrix SIMPLIS Script Reference Manual Function Name Description Seconds Select2Dialog Select Analysis SelectColourDialog SelectColumns SelectCount SelectDevice Select Dialog SelectedProperties SelectedStyleInfo Selected Wires SelectFont Dialog SelectRows SelectSimplisAnalysis SelectSymbolDialog SelGraph SelSchem SetComponent Value SetInstanceParamValue SetModelParamValue SetPropertyStyles SetReadOnlyStatus Shell ShellExecute sign Returns the number of seconds elapsed since Jan uary 1 1970 Displays a dialog offering two lists Opens choose analysis dialog box Returns value according to how box closed UI function opens colour selection dialog Analyses an array of character delimited strings and returns selected values Returns number of selected items on schematic Special function forms part of parts browser sys tem Takes catalog data as arguments and opens dialog box to select a device User interface function Allows selection of one or more items from list Returns information about selected properties Returns style information for the selected element
346. he graph was Yes created Type Type of object always Graph Yes CursorStatusDisplay Sets method of displaying cursor positions and dimen No sions Possible values Graph Display on graph using CrosshairDimension object StatusBar Display on status bar Both Display on graph and status bar Path Path of file to save to This is the file that will be used No by the File Save menu When saving a graph this property will be set to the full path name of the file TabTitle The text in the title of the tabbed sheet This No can be symbolic Default is SourceGroup FirstCurve Label TitleBar Text to be displayed in the graph window title bar when No the graph s sheet is in view This may be symbolic Default is SourceGroup GroupTitle LegendBox The LegendBox is used to display labels for every curve on the graph sheet It consists of a box that is loaded with LegendText objects one for each curve on the graph The LegendText objects are automatically loaded when a curve is added to the graph and automatically deleted when a curve is deleted LegendBox is very similar to the text box and shares the same properties with the following differences and additions 1 Type property has the value LegendBox 2 LegendBox has two additional properties as shown below Name Description Read Only Labels Semicolon delimited string defining text entries in the box Each entry is usually DefaultLabel which resolves t
347. he input NumberSelected Annotations Returns the number of selected annotations Arguments Number Type Compulsory Default Description 1 string No empty string Filter 281 SIMetrix SIMPLIS Script Reference Manual Argument 1 Optional filter string If set to textenabled only annotations that text can be added to are counted Returns Return type real The number of selected annotations Num Divisions Returns the number of divisions in a vector Vectors created by multi step runs such as Monte Carlo are sub divided into divisions with one division per step For a full explanation of this concept see Multi division Vectors on page 19 Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector Returns Return type real NumElems Returns the number of elements in a vector It is similar to the Length function but differs in the way it handles multi division vectors NumElems will return an array element for each division in the vector whereas Length will return the number of elements of the first division only Arguments Number Type Compulsory Default Description 1 any Yes Vector Returns Return type real array OpenEchoFile Redirects the output of the command Echo page 471 to a file Redirection is disabled when the function CloseEchoFile page 69 is called or when control returns to the command line 282 SIMetrix SIMPLIS Script Reference
348. he sum of all values in vout is sum contains the braced substitution sum sum is evaluated and the result replaces expression and the braces See Braced Substitutions on page 13 for more information Example 3 Cross Probing The standard plotting menus plot one curve at a time Here a script is described which repeatedly plots cross probed curves until the right mouse key is clicked SIMetrix SIMPLIS Script Reference Manual let start 1 do while probe if start then plot netname else curve netname endif let start 0 probe loop This script introduces if statements while statements functions and the features that allow voltage cross probing namely the functions NetName page 276 and Probe page 301 and the command Probe page 509 The script repeatedly executes the statements between do while and loop until the probe function returns 0 FALSE The Probe function changes the cursor shape to an oscilloscope probe but doesn t return until the user presses the left or right mouse key If the user presses the left key the function returns 1 TRUE and execution continues to the statements inside the loop If the user presses the right key the Probe function returns 0 FALSE and the loop is completed and the script terminates In the next 5 lines if start then plot netname else curve netname endif the first time around the loop start is equal to 1 and the Plot page 506 command is executed
349. herwise this command will only delete a single menu item Composed of strings separated by pipe symbol First name must be one of the following SHELL Command shell menu SCHEM Schematic popup menu GRAPH Graph popup menu LEGEND Popup menu in graph legend panel SCHEMMAIN Schematic main menu SYMBOL Symbol editor popup menu SYMBOLMAIN Symbol editor fixed menu The remaining strings identify the menu and item names See Def Menu page 462 for details on menu names DelProp property name Delete specified property from selected schematic instances The optional arguments can be used to filter which schematic elements are to have the requested property deleted from them Parameters handle prop propval property name If set filters elements by those that contain the specified handle value If set filters elements that contain a property with the given name If set filters elements that contain a property with the given name argl and given value arg2 Name of property to be deleted 468 SIMetrix SIMPLIS Script Reference Manual DelSym DelSym local symbol name Deletes a schematic symbol from the global library or from the current schematic Parameters local Whether to remove from the local symbol library or not See Also Schematic Symbol Script Definition on page 564 DestroyRunning Dialog DestroyRunningDialog Destroys a process running dialog See Also Cr
350. i were hp Pe oO OES ae ee oe a ee BG 525 Davesymlib ss sa tied A heh Rib hbo oe a Ge ee ee alle ad 526 Save lexthditor of bi ety A A A ae Bee ee ire EE ee id A 526 SaveTextBhditorAs swe wer e A GE a A e ls Reo 527 SchematicEnableFileWatcher e 527 SchematicFileWatcherlgnoreChanges e 527 SchematicFileWatcherWatchChanges e 527 Scr enShot Window o A EEA A A ees 527 SchipuA DOL 3 ara Sue Bean A teeny eee AA A a Ye oe ee 528 Script Pause p 4 aah ed E Ow Shed oo ae ee hd Se Es 528 ScriptResume so aaraa r sa a ghd i Awe 222 ee e eden ne Soe ge 528 SCLPtOLep 2 2 4 2 Eo Let ela gga a A as OE A AS AS ATA bl ies 528 JA E ON 529 Select G urves so Low ak fee ade te we Bee Gab EDR ok a HS 529 pel ctGraphs 2 4 Bale accuse ee a ae Gee ee bE ERA hose eee a 530 Select begendsi ac a ESPN NM Ar See deed Mae he oh dhs dad ds 530 SelectSchemati es Pao SEH AAS ee RE EA ESSE Sey 530 SelectSimuUlator es a Ar de Rae Se Sa SE A AA eB ek 531 SelectSymbolPin oai be kod ad Da ESS a a a ea 531 SelectWireConnected 2 2 1 531 DOE eI ch ah Biante A aa gna ye wo ee Re OB Et dea RN AS hairdo 531 SetAnnotationTextPosition oaoa a ee 532 SetGurveName rra pee a a one go DDE a a 532 SetDetaultEncoding o v ra erer aa ees do e e ee Gr aa Phe E E aA 532 SetGraphAnnoProperty oaaae ee 533 SetGroups w ais wae ye eR ee Ae Ap Notera Ae eai VAR a aa 533 SetHighlight 3 2 aa a E te te A A Sh SA AA E AA 534 ELOT
351. iable name is prefixed with a colon it tells SIMetrix to only search the current group for that name Local or global variables of the same name will be ignored The colon prefix also has a side effect which makes it possible to access vectors created from numbered nodes SPICE2 compatible netlists can only use numbers for their node net names SIMetrix always creates simulation vectors with the same name as the nets If the net name is a number so is the variable name It was stated earlier that variable names must begin with a non numeric character but in fact this is only partly true Variable names that start with a digit or indeed consist of only digits can be used but the means of accessing them is restricted Prefixing ba with a is one method The function Vec page 393 can also be used for this purpose SIMetrix SIMPLIS Script Reference Manual Multi division Vectors Multi step runs such as Monte Carlo produce multiple vectors representing the same physical quantity In SIMetrix version 3 1 and earlier these vectors remained independent but the groups to which they were attached were bundled together into a collection From version 4 the multiple vectors are in effect joined together into a multi division vector This is similar to a two dimensional vector or array or matrix except that the rows of the matrix are not necessarily all the same length When plotting a multi division vector each individual vector or divisi
352. ialog shows the dialog as a tree where the user can drag and drop items in the tree add groups and add tabs A preview of the dialog is shown alongside Arguments Number Type Compulsory Default Description 1 string No empty string Initial XML definition Argument 1 This optional argument can contain a basic XML definition of the dialog Note that XML nesting is not processed and all elements are added to the root of the tree Returns Return type string An XML file describing the dialog diff Returns the derivative of the argument with respect to its reference If the argument has no reference the function returns the derivative with respect to the argument s index in effect a vector containing the difference between successive values in the argument For details on references see Vector References on page 21 101 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes vector Returns Return type real array DirectoryIsWriteable Tests whether or not a directory can be written to by creating a temporary writeable file in that directory If the file is successfully created the directory is deemed to be writeable Arguments Number Type Compulsory Default Description 1 string Yes Directory to test Returns Return type real 1 if directory is writeable otherwise 0 Distribution Returns a random number with a distributio
353. idestyle styleName name value Argument is either a value or a property If a value is specified it changes assigns the flags value of the prop erty The flags value defines the properties attributes How this number is composed is detailed below If a property is specified it copies the flags value from the specified property so the new changed property defined by property name will have the same flags as the already existing property The flags define the property s attributes Make property invisible If specified the name of the property will be hidden Hide property value if a new property is being added If the property already exists its visibility will remain unchanged If specified property will not be added if the instance does not already possess it Override of order for auto positioned properties Set this value to be 0 or above to manually adjust property order Set to 1 to revert back to default ordering Style name to use overriding any styles inheritted from the parent instance If unset or the value is the style of the instance it is associated with will be used If specified the property will be positioned at a fixed location next to the pin specified by pinnumber Make property visible If specified the name of the property will be made visible along with its value in the form name value SIMetrix SIMPLIS Script Reference Manual Notes Attribute flags The attributes flag
354. ierarchical name of pin e g U1 U6 Q1 c flat Return value is local name without hierarchical prefix e g Q1 c property Return value is string array with a pair of elements for each pin at the location First value in each pair is the value of the property specified in argument 2 and the second is the pin number distance Return value has two elements The second element is the distance of the cursor to the pin in sheet units There are 120 sheet units per grid at X 1 magnification flat distance As distance but returns local net name without hierarchical prefix Argument 2 Property name whose value is returned if argument 1 is property See above Returns Return type string array PrepareSet Component Value Configures SetComponent Value page 347 function to define how parameters are stored on schematic instances The definition is in the form of two tables parameter definitions and implicit defaults The parameter definitions defines how parameters are stored The implicit defaults defines parts that have an implicit value For example a resistor value can be set by simply defining the reference of the device without a parameter name This is known as an implicit value Arguments Number Type Compulsory Default Description 1 string array Yes Table data 2 string Yes Table type 299 SIMetrix SIMPLIS Script Reference Manual Argument 1 Th
355. ies If not supplied the cells will begin empty Each element in the array is a semi colon delimited string and defines a complete row The cell entries are sequentially loaded from the delimited fields in each row Returns Return type string array Return value will be in the same format at argument 2 and provide the contents of the cells as entered by the user Example A call to TableDialog 5 3 Device Length Width Q2 1u 0 35u Q3 2 25u 0 35u Q4 2 25u 0 35u Q5 2 25u 0 35u will show this dialog LI x Add Row Length de AA Add Column lu D 35u 2 25u 0 35u Remove Row 2 25u 0 35u Remove Column 2 25u 0 35u TableEditor Displays a table of combo boxes to allow select tabular data SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes Combo box entries 2 string array Yes Initial selection and row count 3 string array Yes Column row and button labels Argument 1 Array of strings the length of which determines the number of columns Each entry is a delimited list of strings that are used to fill the combo boxes in each cell in the corresponding column Argument 2 Array of strings expected to be the same length as argument 1 Specifies the initial value for the combo boxes Can be delimited in which case number of tokens determines number of rows filled for the corresponding column Arg
356. ies pdateStyleInfo pdateSymbol pdateSystemStyleInfo U U U U U U U U U U pdateTitleBlock Wire WireMode Zoom SaveRhs SaveSnapShot ShowSimulator Window WritelmportedModels TextEditorFindNext TextEditorFileWatcherlgnoreChanges TextEditorGoToLine TextEditorFileWatcherWatchChanges Text EditorFind CreateToolBar CreateToolButton DefineToolBar DefKey DefMenu Text Editor Uncomment Lines DelMenu DestroyRunningDialog Echo EditFile Execute SIMetrix SIMPLIS Script Reference Manual ExecuteMenu FileViewCleanUpFileWatchers Focus FocusCommandShell FocusShell Highlight Widget Hint HourGlass List Options ListStdKeys MessageBox MoveMenu 5 1 10 Vectors Groups AppendGroup CollectGarbage CreateGroup DelGroup Discard Display EditGroupTitle 5 1 NewFileView NewPartSelector OptionsDialog Redirect RegisterUserFunction RenameMenu RepeatLastMenu Resize Window RestoreCommandShell SchematicEnableFile Watcher Commands by Application ScreenShot Window ScriptAbort ScriptPause ScriptResume ScriptStep Set Shell UnSet SchematicFile WatcherlgnoreChang8sateRunningDialog SchematicFile WatcherWatchChangesl_ Revert ToSaved KeepGroup Let MakeAlias OpenGroup OpenRawFile Replay Traces SaveGroup SetGroup SetReadOnly SetRef SetUnits Show UnLet SIMetrix SIMPLIS Script Reference Manual Chapter 6 Command Reference Abort Abort Aborts the current s
357. if the filename given is of the type checked against Returns TRUE if the supplied path name is a full absolute path Tests if a file type is an image format SIMetrix SIMPLIS Script Reference Manual Function Name Description IsModelFile IsNum IsOptionMigrateable IsSameFile IsScript IsStr IsText Editor IsText EditorModified JoinString Array length ListDirectory ListSchemProps ListSubset Dialog In LoadFile Locate log log10 mag magnitude MakeDir MakeLogicalPath MakeString ManageDataGroupsDialog ManageMeasureDialog max maxidx Determines if a file contains valid electrical mod els Returns TRUE if argument is numeric real or complex Determines if an option variable may be migrated in a version upgrade Compares two paths and returns true 1 if they point to the same file Determines whether the supplied script name can be located Returns TRUE if argument is a string Returns true if selected editor is a text editor Returns true if the highlighted text editor is mod ified Concatenates two string arrays to return a single array Returns number of elements in vector Returns file names found in a directory matching a supplied wildcard spec Returns the schematic properties Natural logarithm Returns the contents of a text file as a vector Locates value in a monotonic vector Returns in dex Base 10 logarithm same as log10 page 261 Base 10
358. ile This will flush the buffer so that the file contents will be up to date Register UserFunction RegisterUserFunction Function Name Script Name min number args max number args Creates a user defined function based on a script Parameters Function Name Name of function This must start with a letter and contain only letters digits and underscores The name must not be one of the built in functions Script Name Name of script that will be called to execute function min number args Minimum number of arguments required by the function Range 0 7 Default 0 mazx number args Maximum number of arguments that may be supplied to the function Range 0 7 Default 7 Notes When an expression is evaluated that calls the function defined by this command the specified script will be called The script receives the arguments to the function through its argument SIMetrix SIMPLIS Script Reference Manual numbers 2 8 There is a maximum limit of seven arguments The function s returned value is the script s first argument passed by reference Further details including an example are given in User Defined Script Based Functions on page 581 RenameLibs RenameLibs report check log logfile filename suffix catalog file user catalog file Runs the rename model utility This renames models inside installed model files if they are found to have duplicates This command is called by the rename_libs script whi
359. implisMultiStepDialog Opens a dialog box used to define SIMPLIS multi step analyses SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes Configuration 2 string array Yes Sweep values Argument 1 4 element string array used to initialise the dialog box as defined by the following table Index Description 0 Sweep mode Parameter or MonteCarlo 1 Parameter name 2 Step type Decade Linear or List 3 Group curves true false Argument 2 Sweep values If step type is decade or linear values define start stop and number of steps Otherwise defines list of values Returns Return type string array DeleteConfigCollection Deletes an entire section in the configuration file Arguments Number Type Compulsory Default Description 1 string Yes section name Argument 1 Name of section to be deleted Returns Return type real Returns the number of entries successfully deleted SIMetrix SIMPLIS Script Reference Manual DeleteTimer Deletes a timer Arguments Number Type Compulsory Default Description 1 real Yes Timer ID Argument 1 Timer ID as returned by CreateTimer page 81 Returns Return type real Returns 1 0 if the function is successful otherwise returns 0 0 The function will fail if the timer specified does not exist DeleteTree Delete an entire directory
360. imulation Abort performs the same action as Pause page 505 followed by Reset page 517 It stops the current run and then deletes all data associated with it except for any simulation vectors Note that this command can only be executed by an assigned key or menu with the direct execution option specified AbortSIMPLIS AbortSIMPLIS Aborts the current simulation Abort performs the same action as Pause page 505 followed by Reset page 517 It stops the current run and then deletes all data associated with it except for any simulation vectors Note that this command can only be executed by an assigned key or menu with the direct execution option specified About About Displays the about box which provides version and copyright information AddAnnotationText AddAnnotationText text Adds text to the centre of the selected annotation Parameters 428 SIMetrix SIMPLIS Script Reference Manual text The text to add AddArc AddArc left top right bottom start x start y end x end y AddArc is a Symbol Definition Command It is used to create whole circles and ellipses as well as arcs of circles and ellipses The command line arguments are integers describing symbol co ordinates and all are compulsory Their meaning is described by the following diagram end_x end_y left to arc start_x start_y right bottom bounding rectangle The arc drawn by this command is a segment of an ellipse
361. in Minimum value allowed for widget precision Value displayed and returned to precision specified SIMetrix SIMPLIS Script Reference Manual Property Name Description allowExpressions If true the user may enter expressions enclosed with curly braces and If false only numeric values will be allowed CheckBox A check box providing a simple on off selection argIndex inElementIndex and outElementIndex used to define initial setting and return value in normal way 1 indicates checked and 0 in dicates unchecked Label Static label Can be set with static value in which case argIndex and inElementIndex should be 1 Alternatively can be initialised via function call using argIndex an inElementIndex Does not return a value RadioGroup A container that should be filled with one or more Radio Buttons these may be found under the Buttons group Only one of the radio buttons in the group maybe checked at any time The usual properties are used to initialise and the return values 0 means check the top most button 1 the second button 2 the third etc PushButton A push button with two alternative modes of operation If the property toggleButton is false then this may be used to close the dialog box In this case the property action must be set to either reject or accept If reject is set then the dialog box function will return an empty vector Tha
362. in the SIMetrix environment Use this for files with no recog nised format Use one of the following commands to create documents with specific formats 6 NewNetlist on page 493 to create a model file or netlist file NewBasicTextEditor on page 491 to create a plain text file NewLogicDefinitionEditor on page 493 to create a logic definition file for the abritrary logic block 6 NewVerilogA on page 495 to create a Verilog A source file NewVerilogHDL on page 495 to create a Verilog HDL source file NewStyle NewStyle name style name linecolour hex bgr colour linestyle pen style linethickness thickness fontcolour hex bgr colour fontfamily family fontsize point size fontitalics fontbold Creates a new style Parameters fontbold Switches on the use of bold font fontcolour The colour of the font argument in the form Ox00bbggrr fontfamily The font family to use argument is the name of a font family 494 SIMetrix SIMPLIS Script Reference Manual fontitalics Switches on the use of italic font fontsize The size of the font argument is a integer point size linecolour The line colour to use argument in the form Ox00bbggrr linestyle The style of the line to use Options are Solid Dash Dot Dashdot Dashdotdot linethickness The thickness of the line name The name of the style argument is the name Notes Colours are defined as a hex va
363. in the netlist that specify an analysis such as tran ac etc The function will return an empty vector if no simulation has been run or if the latest run has been reset or was aborted Arguments No arguments Returns Return type string array Get AnnotationText Returns the text of the requested annotation This work for text annotations and shape annotations with text applied to them Arguments Number Type Compulsory Default Description 1 string No Ref Handle of the annotation Returns Return type string array The text of the requested annotation Get AxisCurves Returns an array listing all curve id s for specified y axis All curves are referred to by a unique value that is the id Some functions and command require a curve id as an argument Arguments Number Type Compulsory Default Description 1 string Yes Y axis id Returns Return type string array 153 SIMetrix SIMPLIS Script Reference Manual Get AxisLimits Returns min and max limits and axis type log or lin of specified axis Arguments Number Type Compulsory Default Description 1 string Yes Axis ID Returns Return type real array Returns array of length 3 providing limits info for specified axis Index Description 0 Minimum limit 1 Maximum limit 2 Axis scale type 0 linear 1 logarithmic 3 Fixed or auto 0 fixed 1 auto Get AxisType Returns string specifying t
364. in to a symbol Symbol Definition Command Adds a property to a symbol definition Adds a property to the selected schematic ele ments Symbol Definition Command Adds a line seg ment to a symbol Adds a property to the symbol currently open in the symbol editor Adds a Text Box to the currently selected graph Adds a title block to a schematic Aligns the text of a text annotation Annotate schematic with unique component ref erences Appends a data group with another group Inserts text into the schematic editor s simulator command window F11 Window Declares arguments for a script Resets preference settings to factory defaults Cancel schematic interactive command Captures an image of the current highlighted graph Change current working directory Modify symbol arc attributes Changes the styles of the selected elements Changes the style of the selected elements Modify property value attributes in symbol edi tor Clears the command shell message window Closes either the selected schematic or graph Closes the current tabbed sheet in the selected graph window Conclude print job Closes the current schematic Closes the currently selected schematic or symbol editor tabbed sheet Closes the SIMPLIS simulation status box 415 SIMetrix SIMPLIS Script Reference Manual Command Name Description CloseText Editor Collect Garbage CombineMenu CompareSymbolLibs Copy CopyClipGraph CopyClipSchem
365. include pre processing the netlist generated by the schematic editor and also resolving a trigger device for POP analysis If you wish to simulate a schematic in exactly the same manner as the Run menu you need to execute the script simplis_run This simulates the currently open schematic The full source for simplis_run can be found on the install CD Save Save all Saves the currently selected schematic Parameters 522 SIMetrix SIMPLIS Script Reference Manual all If specified all open schematics will be saved Note that schemat ics that have not previously been saved will not be saved by this command nostyle If specified the style library will not be written to the schematic SaveAs SaveAs force binary writeSymbol tab tabnum id id filename Saves the currently selected schematic Parameters binary File will be written in binary format This is only required if the file needs to be read by a version earlier than 5 0 export Saves the schematic to specified file but does not change the file if any to which the schematic is linked It also does not update the modified status of the schematic force If specified and filename already exists it will be overwritten without prompting Otherwise if the file exists an error will be reported id Use id obtained from OpenSchematic page 286 or GetSchemat icTabs page 205 nostyle If specified the style library will not be written to the schematic
366. ing the node voltages and branch currents of the circuit These are just like variables used in a script and can be accessed in the same way There are however a number of differences from a normal variable These are as follows e Simulation vectors are placed in their own group e They are usually attached to a reference vector e They usually have a physical type e g Volts Amps etc e Some are aliases See aliases on page 14 SIMetrix SIMPLIS Script Reference Manual Each of these is described in the following sections Groups All variables are organised into groups When SIMetrix first starts there is only one called the Global group and all global variables are placed in it See Scope of Variables Global Variables on page 10 When a script executes a new group is created for it and its own local variables are placed there The group is destroyed when the script exits as are its variables Each time a simulation run is started a new group is created and the data generated by the analysis is placed in the group Groups from earlier runs are not immediately destroyed so that results from earlier runs can be retrieved By default three simulation groups are kept at any time with the oldest being purged as new ones are created A particular group can be prevented from being purged by selecting the menu Simulator Manage Data Groups Further the number of groups kept can be changed with the GroupPersistence option See
367. ing No E Delimiter Returns Return type string array Example Data input arg 1 BUF600X1 Buf Buffers 2 1 4 3 BUF600X2 Buf Buffers 2 1 4 3 BUF601X1 Buf Buffers 2 1 4 3 BUF601X2 Buf Buffers 2 1 4 3 Field number arg2 0 Returns BUF600X1 BUF600X2 BUF601X1 BUF601X2 SelectCount Returns number of items selected If argument is Wires only selected wires will be counted if argument is Instances selected instances will be counted Otherwise all items are counted Arguments Number Type Compulsory Default Description 1 string No all Type of item to count Wires Instances AID 340 SIMetrix SIMPLIS Script Reference Manual Returns Return type real Select Device Opens parts browser dialog Arguments Number Type Compulsory Default Description 1 string array Yes Parts data 2 string No No device selected Selected device 3 string array No User installed models Argument 1 Argument is array of strings containing parts database This is usually read from the file OUT CAT in the script directory The format for this file is described in User s Manual Device Library and Parts Management Advanced Topics Catalog Files Chapter of the User s Manual Each line con tains up to 8 semi colon delimited fields Only the first field part number and the fourth field category are displayed to the user but the values of any other field will be returned in
368. ing for Y Axis group in Axis empty Labels sheet 22 Y expression Contents of Y expression edit box empty 23 X expression Contents of X expression edit box if enabled empty 24 Vector filter Subcircuit filter selection in Available Vec tors group Possible values all All top Top level sub circuit name Select a subcircuit name The available vectors list box is initialised with the names of vectors in the current group Arguments Number Type Compulsory Default Description 1 string array Yes initial values Returns Return type string array The function returns a string array with the same format as the argument If the user selects Cancel the function returns an empty vector SIMetrix SIMPLIS Script Reference Manual DefineDACDialog Opens a dialog box to define an analog to digital converter Argument is a real array which specifies the initial values for each control as follows Number of bits Output slew time 10n Offset voltage default 0 Range default 5 wn RA O The function returns a real array of length 4 with the same format as the argument described above If the user selects Cancel the function returns an empty vector Arguments Number Type Compulsory Default Description 1 real array Yes Initial values Returns Return type real array The function returns a real array of length 4 with the same format as the argument described above If the user selects
369. ingle and double quotes There are situations where both single and double quotes are needed together In some of the internal scripts you will find the Scan page 335 function used to split a number of text strings separated by semi colons The second argument to Scan is a string and must be enclosed in single quotation marks But this argument is also a semi colon which despite being enclosed in single quotes will still be recognised by the command line interpreter as an end of command character So this must be enclosed in double quotes The whole expression can be enclosed in double quotes in this case If you need a literal quote If you need a string that contains a double or single quote character use two of them together Expressions An expression is a sequence of variable names constants operators and functions that can be evaluated to yield a result Expressions are required by four commands Let page 482 Curve page 456 Plot page 506 and Show page 539 and they are also used in braced substitutions on page 13 and if statements while statements and for statements This section describes expression syntax and how they are evaluated SIMetrix SIMPLIS Script Reference Manual Operators operators Available operators are Arithmetic sala E performs a remainder function Relational lt gt lt gt Important a single can be used as equality operator if used in an if or while statement
370. ion 1 string Yes Variable name Returns Return type real Real value of variable If variable does not exist or if no simulation has been run an empty result will be returned GetDriveType Determines the type of drive or file system of the specified path 169 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Path Returns Return type string Determines the type of drive or file system of the specified path Returns one of the following values Return value Description local Drive or file system present on the local machine remote Network drive or file system cdrom CD Rom or DVD drive other Other file system or drive notexist The path doesn t exist or media not present unknown Drive type or file system could not be determined Get EmbeddedFileName Returns the actual file name used for an embedded file specified using FILE and ENDF Arguments Number Type Compulsory Default Description 1 string Yes File path Argument 1 Name of embedded file That is the name used after FILE Returns Return type string FILE and ENDF allow file to be embedded in netlist and this is implemented by writing the contents to a real file This function returns the full path name of the real file Notes This function can be used to access an embedded file in a script called using the P
371. ions GetSelect edCurves page 207 GetAxisCurves page 153 and GetAllCurves page 150 See Also ShowCurve on page 540 HighlightCurve HighlightCurve clear unique curveld Highlights the selected curve A curve is highlighted by displaying it in a brighter colour and bringing it to the top i e it is drawn last Also highlighted curves are displayed in increased thickness the amount determined by the HighlightIncrement option setting Parameters clear The specified curve will be unhighlighted 478 SIMetrix SIMPLIS Script Reference Manual unique The specified curve will be highlighted and all others will be unhigh lighted curveld Id of curve to be highlighted or unhighlighted if clear is specified Highlight Widget HighlightWidget widget id Highlights a particular content view Parameters widget id The ID of the content view to highlight Hint Hint help help context id id icon info warn error question message Displays a message box intended to be used to provide hints to the user The box contains a check box allowing the user to choose not to receive such hints again Parameters help If specified the box will show a help button which will display the help topic specified by help context This is used in some internal scripts but has limited user application icon Controls the icon displayed in the hint box This may be one of info An icon showing the letter i i
372. ire history of graph magnification and scroll positions UngroupSelected UngroupSelected all Ungroups selected schematic elements If the elements are grouped several times only the most recent grouping is removed unless the all flag is set Parameters all If set all groupings are removed for the selected elements in cases where the elements are grouped several times UnHighlightCurves UnHighlightCurves Unhighlights all curves UnLet UnLet vector name Destroy vector Parameters vector name Name of vector to be destroyed Unless the vector is in the user group the vector s full qualified name must be used See Also Expressions on page 11 Let on page 482 544 SIMetrix SIMPLIS Script Reference Manual Unprotect Unprotect Unprotects and selects protected schematic components See Also Protect on page 512 Unselect Unselect Unselects all components and wires on selected schematic Parameters rect rectmode wires See Also Select on page 529 UnSet UnSet name name Deletes specified option Parameters temp Deletes only temporarily Will revert to original value once control returns to the command line Notes Some Option values are internal This means that they always have a value If such an option is UnSet it will be restored to its default value and not deleted See Also Set on page 531 545 SIMetrix SIMPLIS Script Refere
373. irectory shown specified in argumentl Arguments Number Type Compulsory Default Description 1 string No Current directory Starting directory 2 string No Choose Directory Dialog box caption 3 string No Double click directory to Message select SIMetrix SIMPLIS Script Reference Manual Returns Return type string ChooseDirectory Opens a dialog box showing a directory tree Returns path selected by user or an empty string if cancelled Initial directory shown specified in argumentl This function is similar to ChooseDir page 68 but uses the standard system dialog which includes access to network shares Arguments Number Type Compulsory Default Description 1 string Yes Starting Directory Returns Return type string array Chr Returns a string consisting of a single character specified by an ASCII code This function may be used to represent special characters such as TAB Chr 9 and newline Chr 10 Arguments Number Type Compulsory Default Description 1 real Yes ASCII code Returns Return type string CloseEchoFile Closes the file associated with the Echo command For more information see OpenEchoFile on page 282 Arguments No arguments Returns Return type SIMetrix SIMPLIS Script Reference Manual CloseFile Closes a file opened using OpenFile page 283 Arguments Number Type Compulsory Default Description 1 real Yes File handle Ar
374. is function Curve label control in Define Curve sheet empty Not used with this function Not used with this function Not used with this function Not used with this function Setting of Log Lin Auto for X Axis in Axis Scales sheet Possible values auto in Lin log Log auto Auto Setting of scale options for X Axis in Axis auto Scales sheet Possible values nochange No Change auto Auto scale defined Defined SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default 12 Y axis graduation Setting of Log Lin Auto for Y Axis in Axis auto Scales sheet Possible values as for X axis 13 Y axis scale options Setting of scale options for X Axis in Axis auto Scales sheet Possible values as for X axis 14 X axis min limit Min value for X Axis in Axis Scales sheet 0 Must be specified as a string 15 X axis max limit Max value for X Axis in Axis Scales sheet 1 Must be specified as a string 16 Y axis min limit Min value for Y Axis in Axis Scales sheet 0 Must be specified as a string 17 Y axis max limit Max value for Y Axis in Axis Scales sheet 1 Must be specified as a string 18 X axis label Axis Label setting for X Axis group in Axis empty Labels sheet 19 X axis units Axis Units setting for X Axis group in Axis empty Labels sheet 20 Y axis label Axis Label setting for Y Axis group in Axis empty Labels sheet 21 Y axis units Axis Units sett
375. is invalid or if the graph id specified in arg 2 is invalid or if there are no graphs open the function will return an empty vector See Graph Objects on page 569 for information on graph objects Arguments Number Type Compulsory Default Description 1 string No Object type name 2 string No Graph ID Returns Return type string array See Also GetGraphObjPropValues page 180 GetGraphObjPropValue page 179 GetCurrentGraph page 161 GetGraphObjPropNames page 178 GetSelectedGraphAnno page 207 Get GraphObjPropNames Returns the valid property names for the graph object defined by argument 1 See Graph Objects on page 569 for more information 178 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Graph object ID Returns Return type string array See Also GetGraphObjPropValues page 180 GetGraphObjPropValue page 179 GetGraphObjects page 178 GetCurrentGraph page 161 GetSelectedGraphAnno page 207 Get GraphObjProp Value Returns property values for the specified object If argument 2 is present the value of one partic ular property will be returned Otherwise the function will return an array containing all prop erty values The order of the values corresponds to the return value of GetGraphObjPropNames page 178 See Graph Objects on page 569 for more information Note the function GetGraphObjPropValues
376. is is either the parameter definitions or the implicit defaults depending on the setting of ar gument 2 Usually PrepareSetComponent Value is called twice once for the parameter definitions and again for the implicit defaults The parameter definitions table is a List of semi colon delimited definitions to describe how to handle parameters stored in K V pairs as opposed to individual properties The system looks at the VALUESCRIPT property and its arguments It scans down the table until it finds an entry that matches the script called by VALUESCRIPT VALUESCRIPT is the property used by nearly all parts that defines the script that is used to edit the part The following table describes the parameter definitions table Field Description number 1 writeprop OR defaultnames If writeprop definition defines the name of the property that will hold the modified K V values If defaultnames definition defines how you obtain the names of the parameters and their default values 2 VALUESCRIPT script name 3 VALUESCRIPT argument to examine 0 means the VALUESCRIPT argu ments are ignored 4 Direct OR Model Only relevant of Field 1 is defaultnames Direct means the default names data is read from the property specified as the argument in Field 3 or its default in Field 6 see below Model means it is read from the params or vars list in the device s model fi
377. is must be either SIMetrix or SIMPLIS If set to SIMPLIS only subcircuits declared for use with SIMPLIS will be returned This is done using the SIMULATOR control in the library file Note that only SIMPLIS subcircuits are supported Currently SIMPLIS devices defined using MODEL are not supported by the SIMetrix model library manager Argument 4 Options Currently there is only one set this argument to header to instruct the function to output preceding comment text If this is set up to 20 comment lines starting with before the start of the model will also be output Returns Return type string array Get Devicelnfo Returns information about the specified simulator device Arguments Number Type Compulsory Default Description 1 string Yes Model name 2 string No none Options Argument 1 Internal device name as returned by the GetModelType or GetInternalDeviceName function This is not the same as the type name used in the MODEL control but a name that is used internally by the simulator For example the internal device name for a LEVEL 1 MOSFET is MOS1 Optionally the device letter may be specified if arg2 letter However the function will not return such precise information if this option is used For example the LEVEL value will not be known and so 1 will be returned Also the minimum and maximum number of terminals will reflect all devices that use that device letter and not
378. is the same but will only accept one argument Arguments Number Type Compulsory Default Description 1 string Yes Graph object ID 2 string No Return all values Property name Returns Return type string array Index Description 0 See Also GetGraphObjPropValues page 180 GetGraphObjects page 178 GetCurrentGraph page 161 179 SIMetrix SIMPLIS Script Reference Manual GetGraphObjPropNames page 178 GetSelectedGraphAnno page 207 Get GraphObjProp Values Returns property values for the specified object The function will return an array containing all property values The order of the values corresponds to the return value of GetGraphObjProp Names page 178 See Graph Objects on page 569 for more information See GetGraphObjPropValue page 179 to obtain one property at a time Arguments Number Type Compulsory Default Description 1 string Yes Graph object ID Returns Return type string array Index Description 0 See Also GetGraphObjPropValue page 179 GetGraphObjects page 178 GetCurrentGraph page 161 GetGraphObjPropNames page 178 GetSelectedGraphAnno page 207 GetGraphTabs Returns the graph IDs of all graphs currently open Arguments Number Type Compulsory Default Description 1 real No All graph windows No longer used 180 SIMetrix SIMPLIS Script Reference Manual Argument 1 Originally this was the index of a
379. is will force any update that occurs to also update the com mand even if the command is an empty string forceUpdateExpressiolf set this will force any update that occurs to also update the ex pression even if the expression is an empty string id This item is used by the edit menu GUI It is not needed for regular use immediate Immediate mode Command is executed immediately even if another operation such as a simulation run or schematic editing operation is currently in progress For other options the command is not executed until the current operation is completed Only a few commands can be assigned with this option These are Abort page 428 AbortSIMPLIS page 428 Cancel page 445 DefMenu DefKey page 460 Echo page 471 Let page 482 Move page 487 Pan page 505 Pause page 505 Quit page 512 RotInst page 519 Select page 529 ScriptAbort page 528 ScriptPause page 528 ScriptResume page 528 Shell page 538 Wire page 550 Zoom page 555 noRepeat Do not save menu action in repeat last menu buffer This must be used for any menu that recalls a previously executed menu SIMetrix SIMPLIS Script Reference Manual pos shortcut menuname Position of menu 1 means the top position If omitted the menu is placed at the bottom Position must also take into account any link breaks within a menu Specify key or key combination to activate menu Key description
380. ith a symbolic value The character is used to denote indirect symbolic values For example this method is used with curve markers The default value for a curve marker s label is curve label curve is a property of a curve marker that returns the id of the curve that it points to label is a property of a curve that returns the label assigned to it So curve label returns the label of the curve that the curve marker points to Other curve properties can be used for this label For example curve measurements as displayed below the legend in the legend panel can also be accessed via property named measurements So the curve marker label curve label curve measurements would display the curve s name followed by its measurements Finally the character sequence lt n gt can be used to denote a new line Objects and Their Properties The following lists all the properties available for all objects Note that all objects have a Type property that resolves to the object s type name Also all objects except Graph have a Graph property that returns the ID of the object s parent graph sheet Axis Axis objects represent both x and y graph axes 571 SIMetrix SIMPLIS Script Reference Manual Name Description Read Only Type Type of object always Axis Yes Graph ID of parent graph Yes AxisType K Y or Dig Yes Label Label used to annotate axis Actual displayed te
381. itle The title of the schematic version Optional string representing the version number If auto is used this will use auto version on saving AlignText AlignText Aligns the text of a text annotation Options are left right or center aligned 442 SIMetrix SIMPLIS Script Reference Manual Parameters center For center alignment left For left alignment right For right alignment Anno Anno prop property_ name nopaint bypos minSuffix min_suffix Automatically allocates unique component references to all components on currently selected schematic Typically Anno is used prior to running the Netlist command The latter requires unique references to function Note that Anno will not allocate a new reference to a component unless it is necessary to do so to avoid a duplication When there is a duplication the component which was most recently added to the schematic will be modified Parameters bypos If specified all references will be reassigned according to their position on the schematic working left to right Unlike minSuffix this switch does reassign all references It can be used with minSuffix to reassign all references in a schematic according to a desired specification minSuffiz Minimum suffix value that will be used for new references The anno command works by locating duplicate references then searching for the first suffix value that resolves the duplicate The minSuffix switch specifies
382. itted a MODEL control but they nevertheless all refer to an internal model which is always called Inductor Arguments Number Type Compulsory Default Description 1 string Yes Instance name Returns Return type string Get ModelParameterNames Returns the names or default values of all real valued parameters for a device model 194 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Internal device name 2 string No default flag unsupported Argument 1 Internal device name This is returned by the functions GetInternalDeviceName page 186 and GetModelType page 196 Argument 2 If a second argument is supplied set to default the function will instead return the default values used for the device s parameter names This doesn t work correctly for all simulator devices and so is currently unsupported Returns Return type string array Get ModelParameters Returns the names and types of all parameters for a device model Arguments Number Type Compulsory Default Description 1 string Yes Internal device name 2 string No Use internal device name options Argument 1 Internal device name This is returned by the functions GetInternalDeviceName page 186 and GetModelType page 196 If argument 2 is set to modelname argument must be the model name of a model used in the most recent simulation Argument 2 If set t
383. ix simulator options to the F11 win dow Writes a key value to an INI file Writes data to the specified file in a SPICE3 raw file compatible format Writes a string value to the windows registry Write schematic window property value Returns x location of graph cursor Returns x location of graph reference cursor Returns array of values specifying horizontal loca tions where specified vector crosses given y value Returns the number of elements of a particular type Returns the attribute value for given name at the current focus element Lists elements at the current focus level Returns the text for the current focus element Returns the XML document as a string Creates an XY Vector from two separate vectors Returns y location of graph cursor Returns x location of graph reference cursor SIMetrix SIMPLIS Script Reference Manual Functions by Application Function Name Description YFromX Returns array of values specifying the vertical value of the specified vector at the given x value 3 1 Functions by Application 3 1 1 Configuration Licensing GetColours GetColourSpec GetConfigLoc GetFileExtensions GetFonts 3 1 2 Data fitting GraphImageCapture 3 1 3 File Directory CanOpenFile ChangeDir ChooseDir ChooseDirectory CloseEchoFile CloseFile ConvertLocalToUnix Convert UnixToLocal Copy Tree CopyURL CreateLockFile CreateShortcut DeleteTree Descend Directories DirectoryIsWriteable
384. izontal and vertical Name Description Read Only Curvel ID of curve attached to crosshair 1 Yes Curve2 ID of curve attached to crosshair 2 Yes Graph ID of parent graph Yes ID ID of this object Yes Type Type of object always CrosshairDimension Yes Vertical 0 Horizontal dimension 1 Vertical dimension Yes XDiff X2 X1 Yes YDiff Y2 Y1 Yes Crosshair1 ID of crosshair 1 No Crosshair2 ID of crosshair 2 No Extent Value used to define space occupied by dimension as a pro No portion of font size For horizontal dimensions this is the vertical space as a proportion of font height and for vertical dimensions this is horizontal space as a proprtion of average font width Font Font used to display labels Can either be the name of No a font object or a font spec as returned by GetFontSpec page 177 Hidden Dimension is hidden No 573 SIMetrix SIMPLIS Script Reference Manual Name Description Read Only Labell Label positioned to depict value of first crosshair Default No x1 for horizontal types y1 for vertical Label2 Label positioned to depict value of second crosshair De No fault x2 for horizontal types y2 for vertical Label3 Label positioned to depict the separation between No crosshairs Default XDiff for horizontal types YD iff for vertical Position Value defines display order of dimension For vertical di No mensions this defines the order left to right and for hori zontal di
385. just a single line measure ne calculate_mean Mean ne is not that important it just tells the script system not to enter the command in the history list calculate_mean specifies the script to call to perform the calculation Mean specifies the y axis label The calculate_mean script is as follows Arguments data xLower xUpper result error if xUpper gt xLower then Let result Meani data xLower xUpper else Let result Meani data endif SIMetrix SIMPLIS Script Reference Manual The argument data is the data that is to be processed In this case we simply need to find its Mean xUpper and xLower specify the range over which the mean should be calculated These would be specified if the cursor span version of the mean function was selected by the user The result of the calculation is assigned to the argument result which has been passed by reference The error argument is not used here but it can be used to signal an error condition which will abort the operation This is done by setting it to 1 Automating Simulations Overview The script language allows you to automate simulations that is automatically run a number of simulation runs with different component values test conditions or analysis modes This section describes the various commands needed to do this Running the Simulator Simulations are started using the Run page 519 command The Run command runs a netlist not a schematic
386. l Copyright SIMetrix Technologies Ltd 1992 2015 Copyright SIMPLIS Technologies Inc 1992 2015 SIMetrix SIMPLIS 8 0 Script Reference Manual
387. l definition and must not contain spaces This is known as the internal name in the user interface Text string Description of symbol If specified this will appear in the choose symbol dialog box opened by the menu Place From Symbol Library This menu calls the function GetSymbols page 222 This is known as the user name in the user interface This permits the implementation of multiple catalogues for symbols This is a method of categorising symbols so that they can be easily located The menu Place From Symbol Library lists available symbols in a tree structure and the catalogue name is used to define its location in that tree Branch names are separated by semi colons E g Digital Flip flops creates a top level called Digital and a sub branch called Flip flops CreateToolBar window name toolbar name Creates a new empty toolbar To add buttons to the toolbar use command DefineToolBar on page 459 Parameters window name Name of window where toolbar is to reside Must be one of CommandShell Command shell window Schematic Schematic windows Symbol Symbol editor windows Graph Graph windows 454 SIMetrix SIMPLIS Script Reference Manual toolbar name See Also User assigned name for toolbar You can use any name that doesn t clash with a pre defined toolbar name as defined in the table below The name must not contain spaces Pre defined toolbars are CommandShell
388. l only return a meaningful result for data vectors generated by a multi step analysis For example if an analysis was performed which stepped the value of the resistor R7 this function would return R7 when applied to any of the data vectors created by the simulator If the analysis was a Monte Carlo run the function will return Run If this function is applied to single division data as returned by a normal single step run the return value will be an empty vector Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type string Get VecStep Vals This function retrieves the values assigned to the parameter that was stepped to obtain the vector data supplied It will only return a meaningful result for data vectors generated by a multi step analysis For example if an analysis was performed which stepped the value of the resistor R7 from 1000 to 5009 in 100Q steps this function would return 100 200 300 400 500 If the analysis was a Monte Carlo run the function will return the run numbers starting from 1 If there is more than one stepped parameter the second argument may be used to identify for which parameter the values are returned 229 SIMetrix SIMPLIS Script Reference Manual If this function is applied to single division data as returned by a normal single step run the return value will be an empty vector Arguments Number Type Compulsor
389. l page while 1000 0 1000 1000 would place the right half This allows the printing on multiple sheets Note that if values greater than 1000 or less than 0 are used part of the printed image will lie in the margins This provides a convenient overlap for multiple sheets Probe Probe type 1 2 P N probe message Moves mouse cursor to currently selected schematic changes cursor shape to a symbol depicting an oscilloscope probe then suspends command execution When any mouse key is clicked the cursor shape reverts to normal and command execution is resumed Probe does not suspend commands executed directly on assignment to keystrokes or menu items This allows the Cancel command when assigned to a key or menu to terminate a probe command Note that the Probe command completes on both up and down strokes of a mouse key Parameters type Alters slightly the cursor shape by adding a single character as fol lows 1 adds 1 2 adds P adds a character N adds a character SIMetrix SIMPLIS Script Reference Manual Prop Prop Prop hide show toggle flags attrib flags noAdd showName hideName Modifies a property value of a schematic component if it exists If it doesn t exist the property is added Parameters all code flags handle hide hideName hideNew noAdd order overridestyle pinloc prop propval show showName toggle code 0 1 2 3 overr
390. l run and the message The sum of all values in vout is 6 1663737561 Should appear in the message window The exact value given may be different if you have modified the circuit or set up different model libraries This script introduces four new concepts For loops Braced substitutions sum in the last line Vectors or arrays PF Ww NY pH Accessing simulation data Let s go through this script line by line The first two lines carry out the simulation and in fact something similar is done each time a simulation is run using the menu or F9 key Netlist design net generates a netlist of the circuit and saves it in a file called design net Then Run design net runs the simulation on the netlist design net The line let sum 0 creates and initialises the variable sum which will ultimately hold the final result The next three lines is a simple for statement The variable idx is incremented by one each time around the loop starting at zero and ending at length vout 1 vout is a variable actually a vector which was generated by the simulator and holds the simulated values of the voltage on the VOUT net This net is marked with a terminal symbol length vout returns the number of elements in vout 1 is subtracted because idx starts at 0 In the line let sum sum vout idx vout idx is an indexed expression which returns element number idx of the vector vout sum is of course the accumulative total The final line echo T
391. late the device equations 16 Matrix reorder time 17 Matrix decomposition time 18 Matrix solve time 19 Size of state vector 20 Parameter evaluation time 21 Matrix decomposition time transient only 22 Matrix solve time transient only 23 Circuit temperature 24 Circuit nominal temperature 25 Number of matrix fill ins 26 Simulator initialisation time 27 Number of junction GMIN iterations 28 Time to process digital events 29 Accept time This is the time used for processing transient time points after the simulator has accepted it This includes the time taken to write out the data GetSimulatorStatus Returns the current status of the simulator Arguments No arguments SIMetrix SIMPLIS Script Reference Manual Returns Return type string May be one of the following values Value Definition Paused Simulator paused InProgress Simulation in progress The only situation where this value can be returned is when calling this function remotely using the SxCommand utility with the immediate switch It isn t otherwise possible to call a function while a simulation is running ConvergenceFail Last simulation failed because of no convergence SimErrors Last simulation failed because of a run time error Netlist Errors Last simulation failed because of a netlist error Warnings Last simulation completed with warnings Complete Last simulation successful None No simulation has been run GetSoaDefinitions
392. lations For example you may have a large circuit which for which you need to run a number of tests The simulations take along time so you would like to run them overnight or over a weekend A simple script can perform this task 3 Specialised analysis The curve analysis functions supplied with SIMetrix are all implemented using scripts You can write your own to implement specialised functionality Also the goal functions used for performance and histogram analysis are user defined functions and are actually implemented as scripts More goal functions may be added for special applications The scripting language is supported by about 600 functions and 300 commands that provide the interface to the SIMetrix core as well as some general purpose functionality As well as the built in functions a tool kit is available that allows you to develop your own functions in C or C SIMetrix SIMPLIS Script Reference Manual Chapter 2 The SIMetrix Script Language A Tutorial Example 1 Hello World Any one who has learnt the C programming language will be familiar with the now celebrated Hello World program possibly the simplest program that can be written Here we will write and execute a SIMetrix Hello World script The script is simple echo Hello World To execute and run this script start by selecting the menu File New Script this will open the in built script editor Type echo Hello World
393. le 5 Boolean can be true false off on or yes no Specifies whether the F11 window can be searched for the model Only relevant if Field 4 is set to Model 6 Default value for argument If the argument to VALUESCRIPT is not present or if Field 3 is zero use this value instead T Boolean Means that a property of the same name will also be written as well as the K V parameter The following table describes the implicit defaults table Field Description number 1 Property Value pair The value can use wildcards and 2 The property or parameter that is read or set by an implicit action on this device What happens is that the address is appended with this value when a match is found So if the user entered U1 R1 where R1 is a resistor the action will be the same as entering U1 R1 contents of field2 And that is how this is implemented internally 3 Boolean If true read or write the first unlabelled value only and leave the rest alone Argument 2 Specifies what the contents of argument 1 defines Either parameter_ definitions or implicit__defaults SIMetrix SIMPLIS Script Reference Manual Returns Return type real Number of table entries entered Probe Changes schematic cursor to a shape depicting an oscilloscope probe Returns when the user presses a mouse key If the left key is pressed return value is 1 otherwise it is 0 Probe returns on both up and down strokes of mouse key See Cros
394. lect SIMPLIS mode This shows the Source idle during POP and AC analyses check box initialpulse If true means read the values for initial and pulse and use these to derive values for offset and amplitude If false read the values for offset and amplitude and use these to derive values for initial and pulse This is set unconditionally if argl is missing or has size 5 Otherwise it is set by a flag in arg2 if present otherwise it is false Returns Return type string array String array with 16 elements Elements 0 9 as for argument 1 elements 10 14 as for argument 2 Element returns the state of the Source idle during POP and AC analyses check box ElementProps Returns an array of strings holding the names of all properties of an instance The functions PropValue page 309 or PropValues2 page 310 can be used to find values of these properties This is a generalisation of InstProps page 249 in that it will return the properties for any selected schematic element Arguments Number Type Compulsory Default Description 1 string No Property name 2 string No Property value 3 real No 1 Schematic ID Argument 1 Property name to identify element Along with parameter 2 if these arguments are not provided the selected element if any will be used instead If there are no selected elements or no elements that match the arguments the function will return an empty vector If the arguments identify more than one eleme
395. lected objects high lighted otherwise all selected objects unhighlighted Notes Usage is one of the following 1 SetHighlight prop propname propvalue 2 SetHighlight wire wirehandle 3 SetHighlight all 1 0 4 SetHighlight clearAllOpen 5 SetHighlight 1 0 SetOrigin SetOrigin x y Sets the origin of the current symbol Parameters x y The co ordinates of the origin in units of 100 per grid square The origin is placed relative to a location defined by the top left of a rectangle that encloses all the pins of the symbol SIMetrix SIMPLIS Script Reference Manual Notes The symbol s origin is a reference point used to define the location of all the elements of the symbol In the majority of applications the position of the origin is immaterial as long as it does not change once an instance of the symbol has been placed on a schematic If a new symbol is created from scratch to replace an old one its origin would have to be maintained and this command would be needed for this In practice however the user would usually modify an existing symbol in which case the origin would be maintained automatically See Also GetSymbolOrigin on page 221 SetSymbolOriginVisibility on page 537 Set PinPrefix SetPinPrefix pin name prefix text Sets the prefix for the selected pin property This is a symbol editor command Parameters pin name The name of the pin to change prefix text The prefix to apply to th
396. lied The user can rearrange these using the up and down arrow buttons When the user presses OK the function return the strings in the new order If the user cancels the box the function returns an empty vector Arguments Number Type Compulsory Default Description 1 string array Yes Strings to sort 2 string No Select Item Order Box caption Returns Return type string array The strings in the new order or an empty string if cancel is pressed SIMetrix SIMPLIS Script Reference Manual Example The following statement will open the box as shown in the above picture Show UpDownDialog Vout Osc Vp Comp Sense Vfb Refv Gnd Select Pir UserParametersDialog Opens the following dialog box and enters the names and values specified in the arguments Fa Edit Parameters xj WW 5u Spacebar or double click to edit e The user may edit any of the values by double clicking an entry or pressing the space bar The function returns a string array holding the new values for each parameter Arguments Number Type Compulsory Default Description 1 string array Yes Names 2 string Yes Values 3 string No Edit Device Parame Title ters Returns Return type string array SIMetrix SIMPLIS Script Reference Manual Example The following would open a dialog box as shown in the above picture Show UserParametersDialog ACRES DTEMP L M SCALE TC1 TC2 TEMP W
397. lied to argIndex for value used to initialise wid get First element has index 0 outElementIndex Index into array returned by script function for user entered value itemsArgIndex Index of script function argument used to supply items to initialise list Items separated by pipe symbol Currently used by list boxes and combo boxes itemsElementIndex Index into array supplied to itemsArgIndex for items to initialise list Items separated by pipe symbol Currently used by list boxes and combo boxes Full details and examples for each widget type follow Edit Box The properties argIndex inElementIndex and outElementIndex initialise and return the text value stored in a single line edit box TextEdit As EditBox but multi line Spinner Used for entering numeric values argIndex inElementIndex and outElementIndex used to initialise and return Note that box stores a numeric value but the script arguments must still be strings This widget has the following properties that govern its behaviour Property Name Description engMode Boolean If true value is always displayed in engineering notaion using suffixes such as m u k etc step125 Boolean If true spinner buttons step in 1 2 5 sequence Otherwise they step in a linear sequence controlled by the increment property increment Increment for spinner buttons Only effective if step125 property is false max Maximum value allowed for widget m
398. lits up the string supplied as argument 1 into substrings or tokens Opens the choose analysis dialog Parses a Laplace expression to return array of de nominator and numerator coefficients Parses a string of name value pairs and performs some specified action on them Reads and parses the init file created by a SIM PLIS run Compares two path names with platform depen dent case sensitivity Returns a vector of Per Cycle Frequency Pe riod Duty Cycle On Time or Off Time values Returns a vector of Per Cycle Minimum Max imum Mean Peak to Peak or RMS values Returns phase of argument in degrees Returns phase of argument in degrees Returns phase of argument in radians Returns the physical type of the argument Cross probe function Returns pin name nearest to cursor Configures SetComponent Value page 347 func tion Displays probe cursor in schematic and waits for mouse click Detects if the current script was called by an ac celerator key Detects if the current script was called by a drag and drop operation SIMetrix SIMPLIS Script Reference Manual Function Name Description ProcessingGuiAction Progress PropFlags PropFlags2 PropFlagsAll PropFlagsAnnotations PropF lags Wires PropOverrideStyle PropValue PropValues PropValues2 PropValuesAll PropValuesAnnotations PropValues Wires PutEnvVar PWLDialog QueryData RadioSelect RadioSelect WidgetStackDialog
399. ll listing of these is given in the Schematic Editor chapter of the User s manual The important ones are listed below ref Component reference value Component value or model name E g BC547 model Single letter to signify type of device netname If present forces netlister to assign value of value property to all nets connected to com ponent This property is used by the Ter minal component in the Symbols menu schematic_path File system pathname for a hierarchical block valuescript Script that is called when F7 is pressed or the menu Edit Value Model is selected Some other property names are used in scripts such as biasv which is used by the bias point annotation scripts and is attached to the bias point annotation markers initvalue Text string integer or real The initial value of the property when the component is first placed It may be changed subsequently with the Prop command Examples the value of a ref property would be something like R23 or Q4 The value of a value property maybe 33k or IRF 640 SIMetrix SIMPLIS Script Reference Manual flags This is the property s attribute flags It is a single integer that de scribes a number of attributes for the property For full information see Attribute Flags in the Prop command on page 510 T pos Y pos If specified the property will be placed at an absolute location speci fied by X_pos and Y pos relative to the reference poi
400. ll only remain for the duration of the current script execution Value will return to its original setting when control returns to the command line temp2 531 SIMetrix SIMPLIS Script Reference Manual option spec Can be one of two forms Forml option name Form2 option name option value option name can be any of the names listed in the options section of the Sundry Topics Chapterum SundryTopics of the User s Manual For options of type Boolean use forml For others use form 2 Set Annotation Text Position Set AnnotationTextPosition x x y y positionJustification justification Sets the position of text within a shape based annotation Parameters positionJustification Where to make position offset relative to options are TopLeft Top Center TopRight MiddleLeft MiddleCenter MiddleRight Bottom Left BottomCenter and BottomRight t x position of the text Y y position of the text SetCurveName SetCurveName curve id curve name Changes curves label This is the text displayed in the legend panel Parameters curve id Curve Id Curve id is returned by the functions GetSelectedCurves page 207 GetAxisCurves page 153 and GetAllCurves page 150 curve label New label for curve To restore a label to its default value set this to DefaultLabel Notes Curve labels can also be edited using the command SetGraphAnnoProperty page 533 to edit the curve s Label property SetDefaultEncoding S
401. log Displays a dialog box allowing the editing of property values This is used for a number of functions See the schematic right click popup menu Edit Properties for an example Arguments Number Type Compulsory Default Description 1 string array Yes Property names 2 string array Yes Property values 3 string array No Property types 4 string array No Options 5 string No empty Override Style 6 string No empty Available override styles Argument 1 Function will list in a dialog box the property names and values given in the first two arguments The function returns the values of the properties Unless declared read only see below the value of each property may be edited by the user by double clicking on its entry in the list Argument 2 Function will list in a dialog box the property names and values given in the first two arguments The function returns the values of the properties Unless declared read only see below the value of each property may be edited by the user by double clicking on its entry in the list 113 SIMetrix SIMPLIS Script Reference Manual Argument 3 The third argument of the function declares the type for each property Possible values are String Property value is a simple text string Font Property value is a font definition When the user double clicks the item to edit a font dialog box will be opened Font definitions consist of a series of numeric a text values separated by
402. lour italics bold overline underline propertyStyle Updates an existing global style Will only update the options used Parameters bold Bold font fontColour As an AABBGGRR value fontName Font family name fontSize A number italics Italic font lineColour As an AABBGGRR value Ox0Off00f for blue 255 green 0 red 255 line Thickness A number line Type Options are Solid Dash Dot DashDot DashDotDot overline Overline the text propertyStyle Font should appear in the Property style options drop down box underline Underline the text updateall Optional flag that will notify and update all Editors and update the configuration file Use once after a batch change of style settings name Name of the style to use UpdateProperties UpdateProperties all property name property value Restores properties on specified schematic instances to symbol defaults Command has two modes of operation If all is specified then all properties will be restored to the state defined in the symbol If all is omitted properties that exist on the symbol but are missing on the instance will be added All existing instance properties will be unaffected Parameters all property name Restore all properties to symbol state If omitted only new properties added See description for details Property name used to identify instances to process Use selected instances if omitted SIMetrix SIMPLIS Script Reference Manual
403. lsory Default Description 1 string array No Configuration Argument 1 String array with up to 6 elements as described in the following table Index Description 0 Print orientation landscape or portrait 1 Number of copies 2 Printer id This is an index and can be found from the func tion GetPrinterInfo page 203 If omitted the application default printer will be used 3 Title of print job This is used to identify a print job and will be displayed in the list of current print jobs that can be viewed for each installed printer from control panel title is not printed on the final document 4 Specify printer by name If omitted printer will be defined by its index see above or the application default printer will be used 284 i a l SIMetrix SIMPLIS Script Reference Manual Returns Return type string Status of operation either Success or Failed OpenSchem Opens a schematic similar to the command OpenSchem page 502 but returns a code indicating success or otherwise Arguments Number Type Compulsory Default Description 1 string Yes File path 2 string array No Options Argument 1 Schematic file path Argument 2 Options String array may contain any of the following Option Description cd Change current working directory to the location of the specified schematic file readonly Open in read only mode selectiveReadOnly Open in read only mode if th
404. lt Description 1 string Yes Wire handle 2 real No 1 Schematic ID Argument 1 Handle of schematic wire segment Wire handles are returned by the functions Wires page 398 NetWires page 277 and SelectedWires page 343 Argument 2 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type real array Returns a numeric vector of length 4 providing the sheet locations of the each termination of the specified wire The four values in the vector are defined in the table The functions returns an empty vector if the wire handle supplied is invalid Index Description 0 X co ordinate for termination 1 1 Y co ordinate for termination 1 2 X co ordinate for termination 2 3 Y co ordinate for termination 2 See Also InstPoints on page 248 397 SIMetrix SIMPLIS Script Reference Manual Wires Returns array of strings holding handles for all wires in the specified schematic Wire handles are used by the function WirePoints page 397 and the commands Select page 529 and SetHighlight page 534 Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is no
405. lue with blue green red specified components in the form Ox00bbggrr NewSymbol NewSymbol Opens a new symbol editor view NewVerilogA NewVerilogA Creates a new Verilog A editor See Also 6 NewNetlist on page 493 to create a model file or netlist file 6 NewBasicTextEditor on page 491 to create a plain text file NewScript on page 494 to create a script 6 NewLogicDefinitionEditor on page 493 to create a logic definition file for the abritrary logic block 6 NewVerilogHDL on page 495 to create a Verilog HDL source file NewVerilogHDL NewVerilogHDL Creates a new Verilog HDL editor See Also NewNetlist on page 493 to create a model file or netlist file NewBasicTextEditor on page 491 to create a plain text file Newscript on page 494 to create a script 495 SIMetrix SIMPLIS Script Reference Manual NewVerilogA on page 495 to create a Verilog A source file NewLogicDefinitionEditor on page 493 to create a logic definition file for the abritrary logic block Product SIMetrix and SIMetrix SIMPLIS Pro and Elite NoPaint NoPaint This command has no effect unless executed from within a script It inhibits all updates to graphs until script execution is complete This is useful when a number of operations are performed on a graph By calling this command at the start of a script multiple graph operations can be performed much faster and more smoothly
406. ly integrates the Fourier integral Because this technique does 143 SIMetrix SIMPLIS Script Reference Manual not require the input data to be sampled at evenly spaced points it doesn t suffer from frequency aliasing This is the main drawback of the more commonly used FFT Fast Fourier Transform algorithm However the Continuous Fourier algorithm is much slower then the FFT sometimes dramatically so Arguments Number Type Compulsory Default Description 1 real array Yes data 2 real Yes Fundamental frequency 3 real Yes Number of frequency terms 4 real array No options Argument 1 The input data This is expected to possess a reference i e x values Argument 2 Specifies the fundamental frequency All terms calculated will be an integral multiple of this Argument 3 Specifies the number of frequency terms to be calculated Argument 4 This is optional and can be a 1 or 2 element array The first element is the first frequency to be calculated expressed as a multiple of the fundamental The default value is 0 i e the DC term is calculated first The second element is the integration order used and may be 1 or 2 Returns Return type complex array The result of the calculation and will be a complex array with length equal to argument 3 Fourier OptionsDialog Same as DefineFourierDialog page 90 except that only the Fourier sheet is displayed The re maining tabbed sheets are hidden 144 SIMetrix SIMPLIS Sc
407. ly selected schematic or graph window re ceives input focus See Also Get WindowNames on page 230 FocusCommandShell FocusCommandShell Selects the Command Shell and assigns it keyboard focus FocusShell FocusShell Selects the Command Shell and assigns it keyboard focus GraphZoomMode GraphZoomMode X Y Specifies mode of next mouse zoom operation All subsequent zoom operations will be applied to both axes Parameters X Only X axis will be zoomed Y Only Y axis will be zoomed GroupSelected GroupSelected Groups all selected schematic elements If the selected elements include a set of elements within a group a hierarchy of groups are created Help Help file filename contents context context id topic Opens the SIMetrix help system ATT SIMetrix SIMPLIS Script Reference Manual Parameters contents Opens help in main contents page contert Included only for backward compatibility Help context id does the same as Help id file If specified help will be obtained from filename Otherwise help file will be SIMetrix chm topic If specified help system will display page relating to topic If topic does not exist a list of available topics will be displayed Example To display help on the TRAN simulator directive type Help tran HideCurve HideCurve curve id Hides specified curve Parameters curve id Id of curve to hide Curve id is returned by the funct
408. m number with worst case distri bution Returns location of specified wire Return all wires in schematic Returns whether chosen editor has a revertable saved state Returns window geometry information Returns content widget names Returns widget session information SIMetrix SIMPLIS Script Reference Manual Function Name Description WM_ GetContent WidgetsLayout WM_ GetContent Widget Types WM_ GetCurrent WindowName WM_ GetNumberModifiedEditors WM__GetPrimaryWindowName WM_ GetSystemWidgetSessionInfo WM_ GetSystemWidgetsLayout WM_ Get WindowGeometry WM_ GetWindowNames WM_NumberContent Widgets WM__NumberSystemWidgets WriteConfigSetting WriteF11Lines WriteF110ptions WritelniKey WriteRawData WriteRegSetting WriteSchemProp XCursor XDatum XFromY XMLCountElements XMLGetAttribute XMLGetElements XMLGetText XMLToString XY Y Cursor YDatum Returns layout information Returns the workspace view types in a particular window Returns name of highlighted window Returns number of editors that are modified in all windows Returns the name of the primary window Returns widget session information Returns layout information Returns window geometry Returns the names of all windows Returns the number of content widgets in use Returns the number of system widgets in use Writes a configuration setting Writes lines directly to the F11 window overwrit ing any existing lines Write SIMetr
409. mageFile ParseLaplace 3 1 Functions by Application GetSelectedYAxis GetX Axis GraphLimits ResolveGraphTemplate SelGraph XCursor XDatum Y Cursor YDatum Minima Minimum norm ph phase phase_rad re real Rms RMS1 rnd RootSumOfSquares sign sin sin_ deg sqrt SumNoise tan tan_deg unitvec SupportedReadFormats Supported WriteFormats SIMetrix SIMPLIS Script Reference Manual 3 1 7 Model Library AddModelFiles AssociateModel FindModel Distribution Gauss Gauss Trunc 3 1 9 SIMPLIS SIMPLISRunStatus 3 1 10 Schematic Branch CloseSchematic CloseSchematicTab DescendHierarchy Get AnnotationText GetChildModulePorts GetComponent Value GetConnectedPins GetF11Lines GetFirstSelectedElementOfType GetInstancePinLocs GetInstsAtPoint GetListSelected GetListUnselected GetModifiedStatus GetNearestNet GetOpenSchematics GetReadOnlyStatus GetSchematicFileVersion GetSchematicTabs GetSchematicVersion GetSchemTitle 3 1 GetLibrary Models GetModelLibraryErrors IsModelFile 3 1 8 Monte Carlo Distribution InitRandom UD Unif GetSelectedAnnotation Text GetTitleBlockInfo HasProperty HighlightedNets Instances Inst Nets Inst Nets2 Inst Pins Inst Points InstProps IsComponent ListSchemProps Navigate Nearest Inst NetName NetNames Net Wires NumberSelectedAnnotations OpenSchem OpenSchematic PinName PrepareSetComponent Value Functions by Application Mod
410. mal comments pass through unmodified as long as they are not embedded between continuation lines Also leading spaces will also be stripped in this mode Argument 2 Schematic ID as returned by OpenSchematic page 286 This makes it possible to apply this function to any schematic and not just the one that is currently displayed See OpenSchematic on page 286 for more details Returns Return type string array GetFile Opens the Open File dialog box Return value is full pathname of file selected by user If user cancels operation function returns an empty string Argument to function supplies description of files and default extension These two items are separated by E g getfile Schematic Files sch This function has now been superseded by the functions GetSimetrixFile page 209 and GetUser File page 227 which are more flexible Arguments Number Type Compulsory Default Description 1 string Yes File specification 2 real No 0 file must exist 1 need not exist Returns Return type string GetFileCD This function is now obsolete Use the functions GetSimetrixFile page 209 or GetUserFile page 227 instead Arguments No arguments 172 SIMetrix SIMPLIS Script Reference Manual Returns Return type Get FileDir Get the directory where the specified file is located The function first converts the supplied path to a full path then strips off the final component o
411. matic instance is defined using a property name and value Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string Yes Property value Returns Return type real IsDocumented Returns whether the script command or function is documented Also states whether the input value is a command or function Arguments Number Type Compulsory Default Description 1 string Yes Command or function name 252 SIMetrix SIMPLIS Script Reference Manual Returns Return type integer 0 if the command or function does not exist or is not documented 1 if it is a documented command 2 if it is a documented function IsFileOf Type Returns TRUE if the filename given has a file extension contained within the set of extensions given Arguments Number Type Compulsory Default Description 1 string Yes Filename 2 string array No global Extensions Argument 1 The filename with extension to check Argument 2 A list of extensions to check against Returns Return type real If the given filename has an extension contained within the extensions array returns TRUE oth erwise returns FALSE IsFullPath Returns TRUE if the supplied path name is a full absolute path Arguments Number Type Compulsory Default Description 1 string Yes Path Argument 1 File system path name 253 SIMetrix SIMPLIS Script Reference Manual Returns Return type real TRUE if
412. matics with initial condition values Arguments Number Type Compulsory Default Description 1 string Yes Simplis init file Returns Return type string array 291 SIMetrix SIMPLIS Script Reference Manual PathEqual Compares two string arrays and returns a real array of the same length with each element holding the result of a string comparison between corresponding input elements The string comparison assumes that the input arguments are file system path names and will choose case sensitivity according to the underlying operating system The comparison will be case insensitive Arguments Number Type Compulsory Default Description 1 string array Yes Path 1 2 string array Yes Path 2 Argument 1 First pathname or pathnames to be compared Argument 2 Second pathname or pathnames to be compared Returns Return type real array Real array of the same length as the arguments If the lengths of the arguments are different an empty vector will be returned Each element in the array will be either 1 0 or 1 0 means the two strings are identical subject to case sensitivity as described above PerCycleTiming Processes the input vector measuring the Frequency Period Duty Cycle On Time or OfF Time on a per period basis The returned vector contains the measured value of the input vector such as the Duty Cycle plotted against the original x axis value for example time The return vector is either ste
413. mbol catalog Symbol catalog This determines how the symbol is categorised in Place From Symbol Library This may be a list of strings sepa rated by semi colons each identifying a node in the tree list display shown in the place symbol dialog box SaveSymlib SaveSymlib v25 append force lib libname all filename Parameters all Write out all installed symbols append Symbols are appended to filename Otherwise filename will be over written if it already exists Note that any symbols written that are already present in filename will be overwritten It is not possible to have duplicate symbols within the same library file ascii Force save to ascii file format default binary Force save to binary file format force Allows symbols to be written to an existing library file Otherwise if filename is an existing installed library the command will abort with an error message lib Name of library file to write out This must be an installed file 025 If specified the file will be written in a format compatible with all SIMetrix versions 2 5 3 0 3 1 and 4 0 Otherwise the format used will work only with versions 4 1 or later filename File to receive symbols SaveText Editor SaveText Editor 526 SIMetrix SIMPLIS Script Reference Manual Saves the current text editor Parameters type SaveTextEditorAs SaveTextEditorAs filename Saves the current text editor to a specific file Parameter
414. mensions this defines the order bottom to top Style Controls display of dimension labels Possible values No Internal Show difference only label3 internal posi tion External Show difference only label3 external po sition Auto Show difference only label3 position cho sen automatically P2P1 Show absolute labels labell and label2 P2P1Auto Show all labels Difference position chosen automatically None No controls selected VerticalText If set to 1 text is displayed vertically No X1 For horizontal types holds the value of the x data position No of the first crosshair and is readonly For vertical types holds the x view coordinate location of the object on the screen and is writeable Y1 For vertical types holds the value of the y data position No of the first crosshair and is readonly For horizontal types holds the x view coordinate location of the object on the screen and is writeable X2 For horizontal types holds the value of the x data posi No tion of the second crosshair and is readonly For vertical types holds the view coordinate location of the object on the screen and is writeable Y2 For vertical types holds the value of the y data position of No the second crosshair and is readonly For horizontal types holds the x view co ordinate location of the object on the screen and is writeable Curve Curve objects represent all graph curves Name Description Read Only Analysis Analysis type used to c
415. ment 1 This is used to identify the instance that possesses the selected property 1 Name of selected property 2 Value of selected property Notes Properties can only be selected if the selectable attribute is enabled SelectedStyleInfo Returns chosen style information for the selected element If a style name given in the argument does not exist for the selected element then the current default style information will be returned instead Arguments Number Type Compulsory Default Description 1 string array Yes Style names Argument 1 The style names to return the style information for Returns Return type string array The style information as used by that element Each element of the array corresponds to the result for the matching input array element Selected Wires Returns an array of strings holding the handles of selected wires 343 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string array Select Font Dialog Opens a dialog box allowing the user to define a font The box is initialised with the font specifi cation supplied as an argument The function returns the new font specification A second argument may be specified to identify the name of the object whose font is being edited This is so that its font may be updated if the user presses the Apply button in the dialog box If the user cancels the box the function returns an empty vecto
416. ment in the array is a different style Styles are in the form StyleName lineColour lineColour lineType lineType lineThickness lineThickness fontFamily fontFamily fontItalics fontItalics fontBold fontBold fontColour fontColour fontSize fontSize propertyStyle propertyStyle fontOverline fontOverline fontUnderline fontUnderline EditSymbolBusDialog Arguments No arguments Returns Return type EditTimer Edit a timer The function can stop a timer or change its interval To delete a timer use the DeleteTimer page 99 function Arguments Number Type Compulsory Default Description 1 real Yes Timer ID 2 string Yes action 3 real No Value Argument 1 Timer ID as returned by the CreateTimer page 81 function Argument 2 Action This can be either 1 interval in which case this function will change the interval of the timer iden tified in argument 1 to the value specified in argument 3 2 kill in which case the timer will be stopped The timer will not be deleted and can be restarted by calling this function with the interval action Argument 3 Required if interval is specified in argument 2 126 SIMetrix SIMPLIS Script Reference Manual Returns Return type real Returns 1 0 if the function is successful Otherwise returns 0 0 The function will fail if the specified timer does not exist if the action is not recognised or if the action is interval
417. ments Number Type Compulsory Default Description 1 real No Initial check box settings 2 string No Labels 3 string No Dialog Box Caption Returns Return type real array Example The following dialog box is displayed after a call to BoolSelect 0 1 0 Label1 Label2 Label3 Caption _ abdi Select All M Label2 Unselect All I Labela cancel See Also EditSelect on page 121 RadioSelect on page 319 ValueDialog on page 392 Branch Returns the branch current formula for the wire nearest the cursor on the selected schematic This function will only return a result after the circuit has been netlisted The branch current formula is an expression that when evaluated yields the current flowing in the wire The polarity of the result assumes current flows from right to left and top to bottom An empty string will be returned if there is more than one path for current to flow or if the wire is dangling SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string See Also NearestInst on page 276 NetName on page 276 PinName on page 299 CanOpenFile Returns TRUE 1 if file specified by argument 1 can be opened otherwise returns FALSE 0 Argument 2 may be set to read the default or write specifying what operation is required to be performed on the file This function takes account of lock files used
418. meters comp Opens the symbol for a component whose path is specified by name fromschematic Will load the symbol from the last selected schematic Used inter nally loc If loc switch specified the symbol is placed at the location specified by x and y In practice this location may only be used in a relative manner as the exact location on the symbol sheet of the origin will be adjusted to ensure that the symbol is in view local The symbol will be obtained from the local library of the current schematic If not specified the symbol will be obtained from the global library path If specified the symbol will be converted to a component to be saved in the file specified by pathname name Symbol name Notes If the current symbol sheet is empty the named symbol will become the current symbol in that sheet This will be reflected in the caption bar text and the default symbol to be saved when File Save is selected SIMetrix SIMPLIS Script Reference Manual Inst Inst centre select repeat norepeat repeatalways loc x y orient orient comp nolocal useph symbolname propname propvalue Places an instance of symbolname onto the current schematic User must press left mouse key to fix the symbol to the schematic Parameters centre If specified the cursor will be positioned in the centre of the selected schematic window Otherwise the cursor will remain at whatever position it happens to o
419. mit 4 1 if x axis is logarithmic 0 if linear 5 1 if y axis is logarithmic 0 if linear GroupDelay Returns the group delay of the argument Group delay is defined as d 1 dr phase y on where y is the supplied vector and z is its reference The GroupDelay function expects the result of an AC analysis where y is a voltage or current and its reference is frequency This function will yield an error if its argument is complex and has no reference SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector Returns Return type real array Groups Returns names of available groups The first element with index 0 is the current group If the argument Title is provided the full title of the group is returned More information about groups can be found in Groups on page 18 Arguments Number Type Compulsory Default Description 1 string No name Title Name Returns Return type string array GuiType Returns whether a GUI is enabled Arguments No arguments Returns Return type string Can return one of two values none is returned when no GUI is enabled This is the case when the script is run from the SIM2 utility which does not have a GUI Normally this function returns single meaning that a single window GUI style is available This is as opposed to earlier SIMetrix versions which used a multi
420. mmand or recovered from a restore session operation The script will be run as it is displayed in the editor including any unsaved edits 521 SIMetrix SIMPLIS Script Reference Manual Notes When a script is run using this command it will be referred to by the path of the file in the editor if there is one If there isn t i e the editor has never been saved the script will be referred to as lt LocalScript gt in any error messages This will also be the return value from the ScriptName on page 336 function RunSIMPLIS RunSIMPLIS fresh append label division label sweep start continue finish checkAbort filename Runs the SIMPLIS simulator Note that you must have a SIMetrix SIMPLIS license for this command to work The RunSIMPLIS command will not pre process the netlist This must be done separately using the PreProcessNetlist page 508 command Parameters append Append data to current group Otherwise creates a new data group checkAbort Instructs SIMPLIS to check abort requests fresh Instructs SIMPLIS to run simulation afresh and not to use any state information saved from previous runs label Used with sweep to name the division of a linked run sweep Used for multi step runs See Run page 519 command above for details Notes RunSIMPLIS is the primitive SIMetrix command that launches SIMPLIS However when running a simulation on a schematic a number of other activities are performed These
421. mpty value on page 10 will be returned Note that this function only returns error messages it does not return warnings GetSimulationInfo Returns information about the most recent simulation Arguments No arguments Returns Return type string array Returns a string array of length 11 providing the following information about the most recent simulation Index Description Netlist path List file path Using data file True or False o Name of user specified data file Collection name obsolete OPTIONS line specified at RUN command Analysis line specified at RUN command Reserved for future use Reserved for future use Oo AN DoF won rer Reserved for future use Reserved for future use Es o GetSimulationSeeds Returns the seeds used for the most recent run If this run was a Monte Carlo analysis the return value will be an array of length equal to the number of Monte Carlo steps Each element will hold the seed used for the corresponding step 211 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type real array GetSimulatorEvents UNSUPPORTED See page 26 for more information Returns list of events for most recent simulation This function was developed to aid simulator development and also to assist identifying causes of convergence failure It has also been used to detect the success or otherwise of a simulation run called
422. multiplier Returns Return type real 147 SIMetrix SIMPLIS Script Reference Manual Gauss Trunc Returns a random number with a Gaussian distribution but truncated so that it won t return values outside the specified tolerance range This function is intended to be used for SIMPLIS Monte Carlo analyses and would typically be used in device value expressions This function is only available in the Simulator process and cannot be called from scripts running in the context of the front end The function is only active when used by the netlist pre processor with Monte Carlo analysis enabled When used in other contexts the function returns 1 0 Arguments Number Type Compulsory Default Description 1 real Yes Tolerance 2 real No 3 sigma multiplier Returns Return type real Random number with a Gaussian distribution of mean 1 0 and standard deviation of toler ance sigma multiplier where tolerance is the value supplied to argument 1 and sigma multiplier is the argument provided to argument 2 Values outside the range 1 0 tolerance are rejected so the function will never return values outside this range Example 1k GaussTrunc 0 1 will return 1000 10 with a 3 sigma spread Will not return values outside the range 0 9 1 1 Returns 1 0 in a non Monte Carlo run See Also Gauss page 146 Unif page 388 Distribution page 102 also alias UD page 387 WC page 396 GenPrintDialog Opens a dialog box used to
423. n Conditionally updates all symbols in open schematics Updates the text within the selected annotation Updates the default global style Updates an existing global style Restores properties on specified schematic in stances to symbol defaults pdates a process running dialog by one step pdates the style information pdates the style information at the system level U U Updates specified symbol on selected schematic U U pdates the content of a title block View file in read only mode Opens a web page with the given url Start continue schematic wire Interactive un less loc specified Enter exit schematic wiring mode 423 SIMetrix SIMPLIS Script Reference Manual 5 1 Commands by Application Command Name Description WM_ CloseAllSystemWidgets WM__CloseNonPrimary Windows WM_ProgressWindowClose WM_ Progress WindowCloseAll WM_ProgressWindowCreate WM_ProgressWindowkReport WM __RevertToSaved WM__Undock WritelmportedModels XMLAddAttribute XMLAddElement XMLClose XMLGoUpLevel XMLNew XMLOpenElement XMLOpenFile Zoom Closes all System Views in current window Closes all windows except the main window Closes the specified progress window Forces all progress windows to be closed Creates a progress window Increments the progress bar and allows status message to be updated Reverts a widget back to its last saved state Undocks a content widget from its window Write referenced m
424. n 1 string Yes Function name 2 string No global Function type Argument 1 Function name Argument 2 Either global or script If global arg 1 is assumed to be the name of a built in function If script arg 1 is assumed to be a function defined as a script and installed using the command RegisterUserFunction page 515 User defined compiled functions linked in as a DLL are treated as global Returns Return type real Notes There are two situations where a documented function may not be available e The function is not implemented in the currently executing version of the application e The function is not enabled with the current license A few functions are licensed and are not available with all products ExistSymbol Returns TRUE if symbol name given in argument 1 exists Argument 2 specifies the scope of the search If set to global only the global library will be searched if set to local only the current schematic s local symbols will be searched If set to all both will be searched 137 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Symbol name 2 string No global Scope Returns Return type real Exist Vec Returns TRUE 1 if the specified vector exists otherwise returns FALSE 0 If the second argument is GlobalLocal only the global and local groups are searched
425. n be reloaded at a later time using the OpenGroup command or menu File Data Load By specifying the datafile argument you can choose the name and location of this file which can be useful for archival purposes OpenSchem OpenSchem cd readonly backup filename Reads a schematic file a draws it in a new schematic window If the schematic is already open it will be brought into view Parameters backup Restore temporary backup file Same as normal restore except The modified flag is restored to its state when the file was saved Normally the modified flag is cleared The pathname is restored to the path of the original file if any not the path of the backup file This command assumes that the original file was saved as a backup This switch is used for the save restore session feature and for recovering auto saved schematics after an unexpected program exit cd If specified the directory holding filename is made current readonly Opens schematic in read only mode When opened in this mode the file is not locked so that other users may open the file and write to it If the file is already opened in non readonly mode by another user this switch must be specified in order to be able to open the file filename The name of the file to load the schematic from OpenScript OpenScript filename Opens a script source file in the text editor This will apply syntax highlighting for the script language along with
426. n box Underline the text Name of the style to use AddGraphDimension AddGraphDimension vert label label curve id1 pos1 curve id2 pos2 Adds a dimension object to a graph The dimension object is not yet supported by the GUI Parameters label vert curve id1 posi curve id2 pos2 AddImage Text to add to the dimension object If present a vertical dimension is displayed otherwise it will be hor izontal Id of first curve Initial position on curve of dimension X value if horizontal otherwise a Y value Id of second curve Initial position on second curve of dimension X value if horizontal otherwise a Y value AddImage dimension target_size filename Adds an image to the current schematic This is an interactive action and will attach the image to the cursor until it is placed on the schematic Parameters dimension Target size in grid units squared Optional SIMetrix SIMPLIS Script Reference Manual reference If set states that filename is actually a reference filename The name of the file to import as a full path or reference if the reference flag is set AddImageScript AddImageScript left top right bottom image base64 A Symbol Definition Command that adds an image to a symbol Parameters left Integer Left position of image top Integer Top position of image right Integer Right position of image bottom Integer Bottom position of image
427. n defined by a lookup table This function is in tended to be used for SIMPLIS Monte Carlo analyses and would typically be used in device value expressions This function is only available in the Simulator process and cannot be called from scripts running in the context of the front end The function is only active when used by the netlist pre processor with Monte Carlo analysis enabled When used in other contexts the function returns 1 0 A similar function is available for SIMetrix Monte Carlo analyses but the syntax is slightly differ ent Refer to the Simulator Reference Manual for further details Arguments Number Type Compulsory Default Description 1 real Yes Tolerance 2 real array Yes Distribution definition Argument 1 Tolerance in effect scales the extent of the distribution defined in argument 2 102 SIMetrix SIMPLIS Script Reference Manual Argument 2 Lookup table organised in pairs of values The first value in the pair is the deviation This should be in the range 1 to 1 and maps to the output range So 1 corresponds to an output value of tolerance and 1 corresponds to tolerance Each deviation value must be greater than or equal to the previous value Values outside the range 1 are allowed but will result in the function being able to return values outside the tolerance range The second value in the pair is the relative probability and must 0 or greater There is no limit to the number of entries
428. n name used by the simulator for that type of device If the name is different it will not be possible to cross probe currents for that type of device See User s Manual Further Information Summary of Simulator Devices for details of pin names for devices supported by the simulator If the device is a subcircuit then any pinname may be used The second parameter is the pin s number This affects the order in which the pin s connected nets appear in the netlist This must comply with the netlist format Again refer to Summary of Simulator Devices for full details of each device The last two parameters specify the co ordinates of the pins on the schematic They must be a multiple of 100 If they are not it will not be possible to connect to them as wire ends always snap to a grid point See AddPin page 436 for more details The next three lines AddProp ref Q 26 AddProp value NPN_MODEL 26 AddProp model Q 64 566 SIMetrix SIMPLIS Script Reference Manual are the symbol s properties A symbol s component reference value or model name and the type of device are all specified by properties The first line above attaches a ref property aka component reference and gives it an initial value of Q The final parameter 26 specifies how it should be displayed on the schematic The model property in the third line specifies the type of device e g resistor capacitor BJT etc and is always a single letter It is not compuls
429. n page 499 to open a logic definition file for the abritrary logic block OpenVerilogHDL on page 504 to open a Verilog HDL source file OpenAsciiFile on page 496 to open a schematic file in the text editor 503 SIMetrix SIMPLIS Script Reference Manual Product SIMetrix and SIMetrix SIMPLIS Pro and Elite OpenVerilogHDL OpenVerilogHDL filename Opens a Verilog HDL source file in the text editor This will apply syntax highlighting for the Verilog HDL language Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto filename Path of Verilog HDL source file to open See Also OpenNetlist on page 500 to open a model file or netlist file OpenBasicTextEditor on page 497 to open a plain text file OpenScript on page 502 to open a script OpenVerilogA on page 503 to open a Verilog A source file OpenLogicDefinitionEditor on page 499 to open a logic definition file for the abritrary logic block OpenAsciiFile on page 496 to open a schematic file in the text editor Product SIMetrix and SIMetrix SIMPLIS Pro and Elite OpenWebPage OpenWebPage URL Opens a web page in the system default browser Argument must be the full path URL OptionsDialog OptionsDialog Opens the options dialog box This is the action performed by the menu File Options General All option processing is performed direc
430. n serene e aig aa a alee Ga ad 159 Getur Dirai y Spada e ee a an tee a aa Bete ee ae ana Re ek as RE aes 160 GetCurrentGraphs iss il A a ERR EE ER EASE DEY AE AE ESS 161 GetCurrentStepValue a eee HA AER eR DRE SA ROR OE eG 161 Get CursorGurve ai AR te We ee eee A A A Ae a a a 162 GetCurveARis 00d ta A Daw EE SSO we 162 GetGurveName p a sper sausra n a oe ed kw ALKA GL a a ew a eae eB oes 163 GetCurvesis 4 a o A a O he ee E tat tarde cee A Egon 163 GetCurveVecto i aa oio bo e ee a ara ee A Ra a ee a 163 GADatumQurver do dicho eral ares a bot a h ai dk bdo ataa eh 164 GetDeviceDefinition 2 0 a 164 GetDevice nfo t ts tS e e AE A Ae te Se A a 165 GetDeviceParameterNames oaoa aa a a a a a 166 Get Device Pins i a a t g euzus te te eee eS a Bet E a ee a aA 167 Get DeviceStats na tnt a doe A a A ODES A a 168 GetDotParamNames gt ih A Bh ee eR eat at an Soke a oR Pes S 169 Get DotParamValu is sos ao masa aye A ee ee EE I ere ee eS 169 GetDrive lyp aa a a e et ea ode ok es ee ORS EE OE ee eS 169 GetEmbeddedFileName oaoa a a a 170 GetEnyVar sa A a ardo at tdo a dde o a en Std Ae Se E E 171 GetEthermetAddresses y raid do Taa er err A E AAA A A 171 GEtEDTEMES aae o ta do dd A ee ee AN ee dde a a da 8 171 Gatillo aha a a amp amp amp A a a e E As 2 ee ee 172 GetPile Dy ca ad A ta de de A A A PA a E 172 Grete ile its 3 ot at ett ot ot hee A a te a rr E E EdD 8 173 Get PileEXtensions Sse a A ee o a a aE 173 Get hilel
431. n the standard script path IsStr Returns 1 TRUE if the supplied argument is a string and 0 FALSE if the argument is numeric real or complex Arguments Number Type Compulsory Default Description 1 any Yes Vector Returns Return type real IsTextEditor Returns true if selected editor is a text editor By default the selected editor will be the currently highlighted editor Alternately argument 1 can be passed a type of editor to test for Arguments Number Type Compulsory Default Description 1 string No empty Text editor type 256 SIMetrix SIMPLIS Script Reference Manual Argument 1 This can be used to search for a particular text editor type Possible values are LogicDefinitionEditor NetlistEditor ScriptEditor TextEditor VerilogA Editor VerilogHDLEditor Returns Return type boolean True or false depending on whether the selected editor is a text editor IsTextEditorModified Returns true if the highlighted text editor is modified Arguments No arguments Returns Return type boolean True if the highlighted editor is a text editor that has been modified false otherwise JoinStringArray Concatenates two string arrays to return a single array Arguments Number Type Compulsory Default Description 1 string array Yes First array 2 string array Yes Second array Returns Return type string array Array of strings of length equal to the sum of the lengths of
432. n with administrator privilege otherwise returns User Available system RAM in bytes Operating system class returns WINNT Operating System descriptive name Unused Processor architecture Operating system version major and minor Oo AN DOT q 2EonR Operating service pack number ES o Number processor cores E E Number physical processors E N Number logical cores Get TemprFile Creates a temporary file name Arguments Number Type Compulsory Default Description 1 string No Default temporary direc Directory for file tory Returns Return type string Returns the full path to a unique file to be used for temporary storage Notes The filename generated is guaranteed to be unique at the time the function executes but this function does not open the file It is theoretically possible but unlikely for the filename to be used by another process between the time the function is called and at a later time when it is opened for writing GetTextEditorText Returns the text of the selected text based editor This will work for any text based editor including the script editor and verilog editors 224 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string Text in the currently selected text editor Get Thread Times Returns the execution times for each device thread for the most recent simulation Requires OPTIONS devacct to be set
433. nabled for immediate execution For the list of commands see the command DefMenu page 462 You may not call a script if immediate execution is specified menu Flags whether this entry is a submenu of the button button name Name of button Either a pre defined button as listed in the com mand DefineToolBar page 459 or a new button created with Cre ateToolButton page 455 command Command to be executed when the button is pressed If immediate is not specified this may be any valid command including a script up command Command to be executed when a toggle button is released The button must be defined to have a toggle action using the toggle switch for the command CreateToolButton page 455 See Also GetToolButtons page 226 DefineToolBar DefineToolBar toolbar name button defs Defines the buttons for a user defined toolbar created using the command CreateToolBar page 454 To define the buttons for a pre defined toolbar the associated option setting must be set using the command Set page 531 Parameters toolbar name Name of toolbar This must be a toolbar created using Create ToolBar page 454 button defs Semi colon delimited list of button names to add to the toolbar But tons may either be one defined using CreateToolButton page 455 or one of the pre defined types shown in the table below The character may also be used to specify a spacer For a list of buttons see Pre defined Buttons
434. names of the components to be modified Temporarily edit the modifiable components values to reference a parameter Create netlist 2 3 4 5 Restore original values 6 Read the rest of the file and write the values for each run to an array 7 Run the simulations 8 Clean up before exit Here is the script It is also supplied on the install CD under the script directory Script to run multiple simulations using component values read from a file First ask the user for a file Let filename GetSIMetrixFile Text open al1 if Length filename 0 then User cancelled box exit script endif Read the file Let lines ReadFile filename Let numLines Length lines Test it has enough lines if numLines lt 2 then Echo Definition file must have at least two lines 561 SIMetrix SIMPLIS Script Reference Manual exit script endif We now parse the file and read in the component values to the array compValues We do the whole file at the beginning so that the user will know straight away if it has any errors The first line is the list of components that will be changed Let components Parse lines 0 Let numComponents Length components if numComponents 0 then Echo No component names specified Echo or first line of config file empty exit script endif Before we read the rest of the file we will attempt to replace the values of all listed components with param
435. nce Manual UpdateAllSymbols UpdateAllSymbols Checks all symbols in all open schematics and updates them if they are defined with the All references to symbol automatically updated flag is set in the library symbol definition It isn t usually necessary to call this command It is automatically called in any situation where changes might result from it UpdateAnnotationText UpdateAnnotationText handle handle text text Updates the text within the selected annotation Uses the currently highlighted schematic editor Parameters handle The handle of the annotation to update tert The new text to apply to the annotation UpdateDefaultStyle UpdateDefaultStyle lineType type lineColour colour lineThickness thickness fontName name fontSize size fontColour colour italics bold overline underline propertyStyle Updates the default global style Parameters bold Bold font fontColour As an AABBGGRR value fontName Font family name fontSize A number italics Italic font lineColour As an AABBGGRR value Ox00Off00ff for blue 255 green 0 red 255 lineThickness A number lineType Options are Solid Dash Dot DashDot DashDotDot overline Overline the text underline Underline the text SIMetrix SIMPLIS Script Reference Manual UpdateGlobalStyle UpdateGlobalStyle name lineType type lineColour colour lineThickness thickness fontName name fontSize size fontColour co
436. nction to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string Returns the symbol name used by the instance defined by property name and value supplied in arguments 1 and 2 SymbolNames Returns symbol names of schematic instances Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID 2 string No Use selected Property name 3 string No Use all with property name Property value in arg 2 370 SIMetrix SIMPLIS Script Reference Manual Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Argument 2 Along with argument 3 if present these arguments identify the instances to be examined If only argument 2 is specified then all instances on the specified schematic that possess that property will be used If argument 3 is also present then the instance name and value must match argument 2 and 3 respectively If neither are present the selected instances will be used Returns Return type string array String array containing the symbol names for the instances identified by this functions arguments Note that this function complements PropValues2 page 310 and PropFlags2 page 304 and will return the s
437. nd names listed in the Command Reference on page 428 There are six types of statement These are SIMetrix SIMPLIS Script Reference Manual command statement if statement while statement for statement jump statement script statement Commands Commands begin with one of the names of commands listed in the Command Summary on page 414 A command performs an action such as running a simulation or plotting a result E g Plot vi_p is a command that will create a graph of the vector vi_p The syntax varies for each command Full details are given in the Command Reference on page 428 All commands must start on a new line or after a semi colon They must also end with a new line or semi colon A command statement is a sequence of one or more commands Command Switches Many commands have switches These are always preceded by a and their meaning is specific to the command There are however four global switches which can be applied to any command These must always be placed immediately after the command Global switches are as follows e e Forces command text to copied to command history Use this when calling a command from a script that you wish to be placed in the command history e ne Inhibits command text copying to command history Use this for commands executed from a menu or key definition that you do not wish to be included in the command history e quiet Inhibits error messages for that c
438. ndicating that this mes sage is for information only This is the default warn An icon showing an exclamation mark in a yellow tri angle indicating that the message is a warning error An icon showing a cross in a red background indicating an error condition This is usually inappropriate for a hint but is included for completeness question An icon showing a question mark indicating a ques tion Currently the hint box is not interactive so the usefulness of this is limited id Identifier used to identify hint for the purposes of saving the redisplay status controlled by the Don t show this message again check box If not supplied a default will be used derived from the message text This is satisfactory in most cases and there is rarely ever a need to use this switch message Message to be displayed SIMetrix SIMPLIS Script Reference Manual HourGlass HourGlass Displays the hourglass cursor shape indicating that some action is in progress The normal cursor is automatically restored when control returns to the command line Parameters clear Returns cursor to normal HourGlass maintains a count of the num ber of times it is called and in order to release the cursor it must be called an equal number of times with the clear switch specified off on ImportSymbol ImportSymbol loc x y local path pathname comp name Imports an existing symbol to the currently open symbol editor sheet Para
439. ng userid switch along with the functions GetGraphTabs page 180 and GetOpenSchematics page 201 Note that the command shell always has a user index of 1 2 Window title Get X Axis Returns the id of the x axis in the currently selected graph Arguments No arguments Returns Return type string GraphImageCapture Opens the Graph Image Capture dialog for extracting data from a graph image Is used in the Digitise Data Sheet Curve feature The command handles initial image selection and opening Arguments Number Type Compulsory Default Description 1 string No Current working directory Starting directory for loca tion of graphic files 231 SIMetrix SIMPLIS Script Reference Manual Returns Return type real array Returns the data points extracted First element is the number of data points extracted n The next n elements are the x values the following n elements are the y values of those data points Product SIMetrix and SIMetrix SIMPLIS Pro and Elite GraphLimits Returns x and y limits of selected graph and axis type log linear Function will fail if there are no selected graphs Arguments No arguments Returns Return type real array The x and y axis limits of the currently selected graph and axis type Meaning of each index of the 6 element array are as follows Index Description 0 x axis lower limit x axis upper limit y axis lower limit 1 2 3 y axis upper li
440. ng ignored The final line next idx terminates the for loop Variables Constants and Types SIMetrix scripts like all computer programs process data stored in variables Variables may hold real complex or string data and may be scalar possessing only a single value or single dimension arrays called vectors SIMetrix SIMPLIS Script Reference Manual Variable names Variables names must be a sequence of characters but the first must be non numeric Any character may be used except V amp 8 7 lt gt fF COC CTI s l and spaces Although it is legal the following names should be avoided as they are statement keywords all do else elseif end endif endwhile exit or if loop next script step then to while Types Variables may have real complex or string type Real and complex are selfexplanatory Strings are a sequence of ASCII characters of any length SIMetrix does not have an integer type Although all numbers are represented internally as floating point values the format used permits integers to be represented exactly up to values of about 252 Constants These can be real complex or string Real numbers are represented in the usual way but may also contain the engineering suffixes a 10718 f 10715 p 10712 SIMetrix SIMPLIS Script Reference Manual 107 n u 1076 m 1078 k 10 Meg 10 6 G 10 9 T 10 12 Note that engineering suffixes are not case sensitive A common mistake is to
441. nio yz Bie ee tee ee ee SG oe he nen amp Sie aa 174 GetEilleSavero amp gos a5 rra ta Ae eG e e OR A wie er A 175 GetFileVersionstanip s sap e we ere oe ee ee a 175 GetFileViewerSelectedFiles aa a a a a a 175 GetFirstSelectedElementOfType e 176 Gethonts e s 3 ls e ar bb ee a ad a E le 176 GetFOntSpec a nd o era do o DAA A e E e e ea 177 GetEr eDiSkKOPAC tl de A Gere BE ee dd ok 177 GetGraphObjects s Moi omonge e e A Bees OE A e a E 178 GetGraphObjPropNames a e 2 ee ee 178 GetGraphObjProp Value evi a ee ea 179 GetGraphObjPropValues oaaae 180 GetGraph labs 24 64 becomes wh oa a ew ae eine Ee aw eee ARIAS 180 GetGraphtitle ae 2 2 a4 AA RE ee ee SE SS EE AEBS 181 GetGroupliton iaa be be ee Oe ee ow a Ee h 181 SIMetrix SIMPLIS Script Reference Manual Contents GetGroupStepParameter opio Soa a a ee a aa RE a ey as 182 GetGroupstep Vals lt 8 tcf da e ea Pe ee oe he ot he PES Ree ees 182 GetHighlightedWidgetld ee 183 GetHostldi as s swig a rad do AA eee e He ee A 183 GetInstanceParamValues 2 1 ke a 184 Getinstanc Piniots 4 00 ea ee e a ee ek he RS ha oe ee BS 184 GetlnstsAtPoinit grisi ete aha ast ae A OE eh Pa hens 185 GetInternalDeviceName aoaaa a a a a 186 CEE Dets ae x beh a al O o ad 186 GetLaplaceErrorMessage ee 187 GetlLastCommand a ftp ee eae ee eee oh a al A a E A a 187 GetLastError o a ob Bie dae deb RO
442. nitialise the dialog box s controls After the user has made a selection and closed the box the controls in the schematic text window are updated This mechanism means that analysis modes are stored with a schematic Also the user is free to select analysis modes by manually editing the controls in the text window Any such changes will be reflected in subsequent calls to SelectAnalysis Arguments No arguments Returns Return type real SelectColourDialog Opens a dialog box allowing the user to define a colour The box is initialised with the colour specification supplied as an argument The function returns the new colour specification If the user cancels the box the function returns an empty vector Arguments Number Type Compulsory Default Description 1 string No Specification for BLACK Initial colour specification Argument 1 Initial colour specification May be the name of a colour object an integer value as returned by GetColourSpec page 156 or a colour in the form rrggbb Returns Return type string Colour in form rrggbb 339 SIMetrix SIMPLIS Script Reference Manual SelectColumns Accepts an array of character delimited strings and returns an array containing only the specified field This function was developed for the parts browser mechanism but is general purpose in nature Arguments Number Type Compulsory Default Description 1 string array Yes Input data 2 real Yes Field number 3 str
443. ns ID of highlighted widget Arguments No arguments Returns Return type string ID of highlighted widget Get HostId Get MAC address or dongle serial numbers used for licensing Arguments Number Type Compulsory Default Description 1 string No 1 Host id type Argument 1 Can be the following value Value Description T Default host id this is the MAC address on Windows sys tems PA MAC address 115 Serial number of FLEXid 9 type dongle 51 Serial number of FLEXid 10 type dongle Returns Return type string String as used in a license file 183 SIMetrix SIMPLIS Script Reference Manual GetInstanceParamValues Returns simulation instance parameter values for the device specified This function returns the values used in the most recent simulation If simulation has been run or it was aborted or reset using Reset command then this function will return an empty vector If argument 3 is set to readback this function will return the values for readback parameters Arguments Number Type Compulsory Default Description 1 string Yes Instance name 2 string No Get all parameters Parameter name 3 string No Options Argument 1 Instance name e g Q23 R3 etc This is the name used in the netlist stripped of its dollar prefix if applicable Argument 2 Name of parameter whose value is required If this argument is missing or empty then all param eters will be returned The number and ord
444. nt the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness 130 SIMetrix SIMPLIS Script Reference Manual Argument 2 Property value to identify element Along with parameter 1 if these arguments are not provided the selected element if any will be used instead If there are no selected elements or no elements that match the arguments the function will return an empty vector If the arguments identify more than one element the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness Argument 3 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If equal to 1 the currently selected schematic will be used Returns Return type string array Array of strings with property values Returns empty value if no match to property name and value is found Also returns empty value if the schematic ID is invalid EnterText Dialog Opens a dialog box allowing the user to enter lines of text Arguments Number Type Compulsory Default Description 1 string array Yes initial text and box cap tion Argument 1 The argument specifies the initial text and the dialog box s caption as follows O Initi
445. nt of the sym bol The flags value specifies the justification of the text as described in Attribute Flags in the Prop command on page 510 If X_pos and Y_ pos are specified the text will be displayed vertically in 90 and 270 degree rotated orientations Example AddProp ref Q 26 A symbol containing this line in its definition will possess the property of name ref and when first placed on a schematic will have the initial value of Q The text Q will be displayed on the schematic to the right of the symbol when in normal orientation and underneath the symbol when in a 90 rotated orientation AddProp ref Q 8 100 200 The same property as the above example but instead it will be placed 100 units horizontally and 200 unit vertically from the symbol origin The text of the property will be left justified and positioned vertically referenced to its base line See Also Schematic Symbol Script Definition on page 564 AddProperty AddProperty name name value value Adds a property to the selected schematic elements Parameters name Name of the property value Value of the property AddSeg AddSeg start x start y end x end y AddSeg is a Symbol Definition Command It is used to add a line segment to a symbol Parameters 440 SIMetrix SIMPLIS Script Reference Manual start x Integer Symbol x co ordinate of start of segment start y Integer Symbol y co ordinate of start of segment end x Intege
446. nt string array The first element is the action to be performed The second element is the number of unlabelled parameters that are expected in the input string This is zero if omitted Argument 4 Values to write These have a 1 1 correspondence with the parameter names in argument 2 SIMetrix SIMPLIS Script Reference Manual Argument 5 If set to allowquoted the function will treat any items enclosed in single or double quotation marks as a single token even if there are spaces within Returns Return type string array or scalar If reading the return value is an array of strings holding the values of the specified parameters Otherwise it the input string appropriately modified according to the defined action Example This will return the string array lu 2u Let str W 1u L 2u AD 3e 12 AS 3e 12 ParseParameterString str W L read This returns 2 0 Let str 2 0 DTEMP 25 0 ParseParameterString str unlabelled 1 read 1 This will return the modified string W 90n L 120n AD 3e 12 AS 3e 12 Let str W 1u L 2u AD 3e 12 AS 3e 12 ParseParameterString str W L write 90n 120n This will return the modified string AD 3e 12 AS 3e 12 Let str W 1u L 2u AD 3e 12 AS 3e 12 ParseParameterString str W L delete ParseSimplisInit Reads and parses the init file created by a SIMPLIS run This is used by the feature that back annotates SIMPLIS sche
447. ntial current v Forces pin to be of type single ended volt age vd Forces pin and the one following to be of type differential voltage See Also Schematic Symbol Script Definition on page 564 AddProp AddProp font font sel name init value flags x pos y pos AddProp is a Symbol Definition Command A Property is a text string that can be attached to a symbol which is normally used to describe a special characteristic such as a component reference or value A comprehensive explanation on properties can be found in User s manual Schematic Editor Properties SIMetrix SIMPLIS Script Reference Manual Parameters font Integer from 1 8 that specifies one of 8 fonts as follows 1 Default Caption Free text Annotation User 1 User 2 Nn DO Oo FF WO N User 3 8 User 4 The value specified by font fontIndex overrides bits 11 13 of the flags value see above sel If specified the property is marked selectable This means that the selection boundary of the instance which owns the property will be extended to include the property text This is usually used for symbols that consist only of properties and have no body styleOverride Optional override style for the property This property will then use this style instead of the infered default style name Text string This can be anything but usually would be one of the special properties which convey a special meaning A fu
448. ntly installed library If argument 2 is set to comp then this argument instead specifies the file system path name of a component SXCMP file 197 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Returns a string array of length equal to the number of pins on the specified symbol If the symbol or component cannot be found the function returns an empty vector Get NamedSymbolPropNames Returns names of all properties defined for a library symbol Arguments Number Type Compulsory Default Description 1 string Yes Internal symbol name 2 string No symbol Options Argument 1 Internal symbol name This is the name used internally to reference the symbol and should not be confused with the user name which is usually displayed by the user interface The symbol must be present in a currently installed library If argument 2 is set to comp then this argument instead specifies the file system path name of a component SXCMP file Returns Return type string array Returns a string array holding the names of all the symbol s properties If the symbol or component cannot be found the function returns an empty vector Get NamedSymbolProp Value Returns the value of a property defined for a library symbol Arguments Number Type Compulsory Default Description 1 string Yes Internal symbol name 2 string Yes Property name 3 string No symbol Options 198 SI
449. nts page 397 Wires page 398 The schematic ID may also be used by these commands SaveAs page 523 SelectSchematic page 530 The handle returned by OpenSchematic may be closed using the function CloseSchematic page 70 After a call to CloseSchematic the handle will no longer be valid and any function it is supplied to will fail However it is not usually necessary to call CloseSchematic as handles are automatically closed when control returns to the command line SIMetrix SIMPLIS Script Reference Manual Parse Splits up the string supplied as argument 1 into substrings or tokens The characters specified in argument 2 are treated as separators of the substrings For example the following call to Parse Parse c simetrix work amp sch returns er simetrix work amp sch If the second argument is omitted spaces and tab characters will be treated as delimiters If a space is include in the string of delimiters tab characters will be automatically added If the third arguments is present and equal to quoted the function will treat strings enclosed in double quotes as single indivisible tokens Arguments Number Type Compulsory Default Description 1 string Yes Input string 2 string No Space tab comma Delimiters 3 string No empty Options Returns Return type string array ParseAnalysis Opens the choose analysis dialog initialised according to the analysis controls passed as the argu
450. nual Index Description 5 Initial condition enabled for AC check box true or false 6 Initial condition enabled for DC check box true or false Argument 3 String array defining list of parameter names See argument 4 Argument 4 String array defining list of parameter values If arguments 3 and 4 are supplied the Parameters button will be visible This button opens another dialog box that provides the facility to edit these parameters values Returns Return type string array The function returns a string array in the following form Index Description 0 Value in Result box 1 Value in Initial Voltage or Initial Current box Empty if Open circuit or Short circuit is selected 2 Number of parameter values 3 onwards The values of the parameters in the order they were passed number of parameters 3 Initial condition enabled for operating point check box true or false number of parameters 4 Initial condition enabled fro transient check box true or false number of parameters 5 Initial condition enabled for AC check box true or false number of parameters 6 Initial condition enabled for DC check box true or false EditSelect Opens a dialog box containing any number of edit controls allowing the user to enter text values The number of edit controls is the smaller of the lengths of arguments 1 and 2 If no arguments are gi
451. o modelname argument 1 must be the name of a model used in the most recent simulation Returns Return type string array String array of semi colon delimited strings Each token in the string is defined as follows 195 SIMetrix SIMPLIS Script Reference Manual Index Description 0 parameter name 1 Parameter type 2 Parameter description this is blank for most devices Get ModelParameter Values Returns the values of all parameters of the specified model Defined by model name e g Q2N2222 This function reads the values from the simulator and requires that a simulation has been run or checked The returned array with arg2 omitted is of the same size as the array re turned by GetModelParameterNames page 194 for the same device and the values and parameter names map directly Arguments Number Type Compulsory Default Description 1 string Yes Model name 2 string No All values returned if omit Parameter name ted Argument 1 Model name Model name is the user name for a model parameter set as defined in the MODEL control e g Q2N2222 Argument 2 Parameter name If specified return value will be a single value for the specified parameter If omitted the values for all parameters will be returned Returns Return type string array Get ModelType Returns internal device name given user model name The internal device name is a name used internally by the simulator and is required by
452. o the value of the DefaultLabel property of the LegendText object Other symbolic values for LegendText properties may also be used LegendLabel Text of label that is loaded into box when a curve is added to the graph This can be symbolic in which case it refer ences properties of the LegendText object that displays the text The default value is DefaultLabel No SIMetrix SIMPLIS Script Reference Manual LegendText Legend Text objects are used to load legend boxes and cannot be instantiated independently They are similar to FreeText objects and share the same properties with the following differences and additions 1 Type property has the value LegendText 2 The Label property is set to the value of the legend box s LegendLabel property when it is added to the box 3 LegendBox has two additional properties as shown below Name Description Read Only Curve ID of attached curve Yes DefaultLabel The default value for the label Actually equivalent to Yes Curve Label n Curve Measurements n denotes a new line Text Box A TextBox consists of a border with a definable background colour into which a FreeText object may be added TextBox is also the basis of the LegendBox object Name Description Read Only Graph ID of parent graph Yes ID ID of this object Yes Type Type of object always TextBox Yes AutoWidth On or Off If On the width of the box is automatically No adjusted
453. o be html formatted list page Prefixes output with a ASCII form feed character EditColour EditColour colour name colour spec Changes the spec for the named colour object Named colour objects are simply option variables used to store colour information This command will write the value to the variable in the form rrggbb where rr gg and bb are two digit hex values representing the magnitude of the red green and blue components respectively Parameters colour name Name of colour object May be the name of a pre v8 graph colour object See notes colour spec Text string that defines the colour The functions GetColourSpec page 156 and SelectColourDialog page 339 return colour spec val ues A value in the form rrggbb or the name of another colour object may also be entered Notes Note that version 7 2 and earlier stored colour information differently and used different names This command will still recognise the names of colour objects used for graphs and set the correct new colour object Schematic colour objects used in version 7 2 and earlier are not supported Refer to documentation on schematic styles in User s Manual Schematic Editor Styles EditCopy EditCopy Copies selected schematic items to clipboard for pasting to SIMetrix and other applications The EditCopy in conjunction with EditPaste page 474 make it possible to copy blocks of schematic from one schematic window to another 472 SIMetrix SIMPLI
454. o effect 0 is illegal y scale As z scale but for y axis 540 SIMetrix SIMPLIS Script Reference Manual TemplateEdit Property TemplateEditProperty hidenew ref propname propvalue Edits the property of a schematic instance This command may only be executed in a template script It records an instruction to edit an instance property but the instruction will not be actioned until the netlist operation has completed So a subsequent call to TemplateGetProp Value for example will return the unedited value of the property Please see Schematic Template Scripts on page 584 for more information In other situations use the command Prop page 510 Parameters hidenew Hide added property Does not affect any property already present on the instance ref Component reference of instance to be edited This would usually be the REF value passed to the template script propname Name of property to be changed propvalue New value for property TemplateSet Value TemplateSet Value ref template value Sets the value that will be used for the specified device s template during the current netlist operation Note that this command does not change the value of the TEMPLATE property stored on the instance itself This command may only be executed in a template script Please see Schematic Template Scripts on page 584 for more information Parameters ref Component reference of instance This would usually be the REF value pa
455. ocated using data units so that it always points to the same point on a curve regardless of how the graph is zoomed or scrolled View Units relate to the current viewable area of the graph View units use a coordinate system whereby the bottom left of the grid area is co ordinate 0 0 and the top right corner of the grid is co ordinate 1 1 View units are used to define the location of objects that need to be at a fixed location on the graph irrespective of zoom magnification Event Scripts There are three special scripts that are automatically called by the SIMetrix system in response to user events These scripts are detailed in the following table on_graph_anno_doubleclick Called when the user double clicks on certain graph objects on_accept_file_ drop Called when a file of directory is dropped on a SIMetrix window on schem double _ click Called when the left mouse button is double clicked in the schematic window All three scripts are defined internally but can be customised if desired See Modifying Internal Scripts on page 557 Details on these event scripts follow on_graph anno doubleclick The script is called when some graph objects are double clicked The script is passed two arguments when it is called The first is the object s ID and the second is specific to the object that is double clicked Currently the second argument is only used by curves and is set to its division index on_accept_ file
456. odelType Get NodeNames GetNonDefaultOptions GetPrint Values GetSimplisExitCode GetSimulationErrors GetSimulationInfo GetSimulationSeeds GetSimulatorEvents 3 1 Functions by Application WriteSchemProp StyleLineTypes StyleNames RemoveSymbolFiles SymbolInfoDialog SymbolName SymbolNames SymbolPinOrder SymbolPinPoints ReadConfigSetting ScriptName GetSimulatorMode GetSimulatorOption GetSimulatorOptionInfo GetSimulatorOptions GetSimulatorStats GetSimulatorStatus GetSoaDefinitions GetSoaOverloadResults GetSoaResults Get ThreadTimes ParseAnalysis RemapDevice SelectA nalysis SelectSimplisAnalysis SIMetrix SIMPLIS Script Reference Manual SetInstanceParamValue 3 1 15 String Ascii Char Chr EscapeString EscapeStringEncode FilterFile FormatNumber HashAdd HashCreate HashDelete HashSearch 3 1 16 System CreateTimer Date DeleteTimer Edit Timer EpochTime GetEnv Var Get HostId Get MaxCores GetPlatformFeatures 3 1 17 Text Editor GetTextEditorText 3 1 18 User Interface ACSourceDialog AddPropertyDialog AddRemoveDialog AddRemoveDialogNew BoolSelect DCSourceDialog DefineADCDialog 3 1 Set ModelParamValue MakeString Mid Parse ParseParameterString ParseSimplisInit PathEqual QueryData ResolveTemplate rt Scan Search GetPrinterInfo GetRegistryClassesRootKeys GetSystemInfo GetTimerInfo OpenPrinter PutEnvVar ReadClipboard ReadIniKey Read
457. odels of netlist to specified file Adds an attribute to the XML at the current lo cation Adds an element to the XML at the current loca tion Closes the XML reference Moves the current focus element up to its parent Creates a new XML reference object Opens the XML element and sets it as the current focus level Opens an XML document from a file creating a new XML reference object Zoom selected schematic 5 1 Commands by Application 5 1 1 File Cd CopyFile Del 5 1 2 Graph AddCurveMarker AddFreeText AddGraphDimension AddLegend AddLegendProp MakeTree RD MCD MD AddTextBox DeleteAxis CloseGraphSheet DeleteGraphAnno CopyClipGraph DelLegendProp Curve GraphZoomMode DelCrv HideCurve 424 SIMetrix SIMPLIS Script Reference Manual HighlightCurve MoveCurve NewAxis NewGraphWindow NewGrid NoPaint OpenGraph 5 1 3 Lib List Models LoadModellndex 5 1 4 Miscellaneous About Close CreateFont EditColour 5 1 5 Printing ClosePrinter NewPrinterPage 5 1 6 Schematic AddArc AddCirc AddFloodFill AddImage AddImageScript AddPin AddProp AddProperty AddSeg AddSymbolProperty AddTitleBlock AlignText Anno AppendText Window 5 1 PlaceCursor Plot SaveGraph SelectCurve SelectGraph SelectLegends SetCurveName MakeCatalog RenameLibs EditFont Help MoveFile OpenWebPage OpenPrinter PrintGraph Cancel ChangeArcAttributes ChangeSelectedStyleNames ChangeStyle ChangeSymb
458. oe AA eye ee shes 23 Executing Scripts 4 aa doce add y Oe bb al al ae e See 23 SIMetrix SIMPLIS Script Reference Manual Contents Script Are uments ula ld eee E ARI 24 Built in Scripts 2 28 o be ee bee eee eek ee ee ae 25 Debugeinge Scripts orere t pop bee See ere be Ge eee Bee OES G 25 Startup Scripta S a a wwe eek LAMA RE owe ee be ae ee ge ee ee eels 26 Unsupported Functions and Commands 00000 eee eens 26 3 Function Summary 27 3 1 Functions by Application 20000000 ee ee 50 3 1 1 Configuration Licensing 2 o 50 3 1 2 Data Hytine eee pug A Ee A EEE ak ele tes 50 3 1 3 File Directory ois serete u a db ees eee be eel eee ee das 50 Or A NARA 50 31 07 Mathematical a ela ee BR ee ee whe os Soe he ee os 51 36 Miscelaneos ea 4 x ea a A A A E AAA h 51 31 Model Library ooo a te ee A o a E E a 52 3 1 8 Monte Carlo Distribution 0 2 02 000008 52 3 129 SEMPLIS ced Bee ea a A li 52 S110 Schematic aa RS e Da ba Ae ek Be art a db food oe 52 Jil 11 Schematic Styles i a oc Gee ase Se A a a a a e 53 3 1 12 Schematic Symbols and Library aoaaa a 53 SEAS ASCO wa nne Ses ghar a ae ee Ad dah gah ROAR ADE dee ka ed 53 SLA Sumi lator os a ea o BRA Ee ears whe 3 Sue ld fea ee 53 a E a R ae ad ok ae ear acerca ae Oe ae de Se A A Oe Se 54 SS A ee ee ee eG 54 SAA Texts Edito creaky bad cda a e la 54 3 118 User lntertace us cio Ae Re Ee ea 54 31 19 Vectors Groupsys ui a ee a
459. of busname wirenum would give bus names like BUS1 2 File to which netlist is written If not specified the netlist is displayed in the message window NewAnnotation rect elipse arrow line roundedrect triangle octagon SIMetrix SIMPLIS Script Reference Manual Interactive placement of a new annotation The new annotation type is attached to the cusor such that when the cursor is next clicked on the schematic the annotation placement begins Use one of the flags to set the type of annotation to create Parameters arrow ellipse line octagon rect rhombus roundedrect triangle NewAxis Creates an arrow Creates an ellipse Creates a line Creates a octangon Creates a rectangle Creates a rhombus Creates a rounded rectangle Creates a triangle NewAxis Creates a new y axis This will be initially empty and selected See User s Manual Graphs Probes and Data Analysis Graph Layout for more information on multiple y axes NewBasicTextEditor NewBasicTextEditor Creates a new plain text document in the SIMetrix environment Use this for files with no recog nised format Use one of the following commands to create documents with specific formats H block NewFileView NewNetlist on page 493 to create a model file or netlist file NewLogicDefinitionEditor on page 493 to create a logic definition file for the abritrary logic Newscript on page 494
460. of argument Arguments Number Type Compulsory Default Description 1 real array Yes Vector Returns Return type real array Returns a vector of the accumulative rms value of the input Unlike RMS1 page 333 this function returns a vector which can be plotted RMS1 Returns the root mean square value of the supplied vector between the ranges specified by argu ments 2 and 3 If the values supplied for argument 2 and or 3 do not lie on sample points second order interpolation will be used to estimate y values at those points Arguments Number Type Compulsory Default Description 1 real array Yes Vector 2 real No Start of input vector Start x value 3 real No End of input vector End x value Returns Return type real 333 SIMetrix SIMPLIS Script Reference Manual rnd Returns a vector with each element a random value between 0 and the absolute value of the argument s corresponding element Arguments Number Type Compulsory Default Description 1 real array Yes vector Returns Return type real array Returns a random number RootSumOfSquares Similar to the function RMS1 page 333 but returns the root of the sum without performing an average Arguments Number Type Compulsory Default Description 1 real Yes Vector 2 real No Start of input vector Start x value 3 real No End of input vector End x value Returns Return type real array rt Evaluate template string This function is
461. ogs Returns the catalog names for each of the symbols The catalog defines how the symbol user name is displayed in the symbol dialog display as opened by the function SelectSymbolDialog page 346 It consists of one or more strings separated by semi colons Each string defines a node in the tree list display tree catalogs and description merged together but separated by a semi colon Internal symbol name For example the standard three terminal NPN symbol has an internal name of npn a catalog of Semiconductors BJTs and a description of NPN 3 Terminal The value returned by the tree option would be Semiconductors BJTs NPN 3 Terminal Argument 2 Specifies a filter that selects symbols according to catalog May be prefixed with in which case all symbol not belonging to the specified catalog will be returned Returns Return type string array Returns string array providing the symbol info as defined by arg 1 and 2 If there are no symbol libraries installed or there are no symbols with the specified catalog an empty vector will be returned GetSystemInfo Returns information about the user s system Arguments No arguments Returns Return type string array String array of length 7 as defined by the following table 223 SIMetrix SIMPLIS Script Reference Manual Index Description o Computer name User log in name Returns Admin if logged i
462. olProperty CloseSheet CompareSymbolLibs Copy CopyClipSchem CopyLocalSymbol CreateSym Delete DeleteSymbolProperty DelProp Commands by Application SetGraphAnnoProperty SetHighlight ShowCurve SizeGraph Trace UndoGraphZoom UnHighlight Curves Quit Title ViewFile PrintSchematic DelSym Detach DrawArc Draw Arrow DrawPin EditCopy EditCut EditPaste EditPin EndSym GroupSelected ImportSymbol Inst MakeSymbolScript SIMetrix SIMPLIS Script Reference Manual Message Move MoveProperty Netlist NewAnnotation NewLabel NewSchem NewStyle NewSymbol NoUndo OpenSchem Pan Probe Prop Protect RebuildSymbols RestoreDefaultStyles 5 1 7 Simulator CloseSimplisStatusBox Listing OpenSimplisStatusBox Pause PreProcessNetlist 5 1 8 Text Editor Close TextEditor SaveTextEditor SaveTextEditorAs SetDefaultEncoding 5 1 9 User Interface Arguments ClearMessage Window CloseSchem CombineMenu CreateRunningDialog 5 1 RotInst Save Save As SaveSymbol SaveSymlib Select SelectSchematic SelectSimulator Select WireConnected SetAnnotationTextPosition SetOrigin SetSnapGrid SetStyleColour SetSymbolFillStyle SetSymbolOriginVisibility TemplateEditProperty TemplateSet Value Reset RestartTran Resume Run RunSIMPLIS TextEditorCommentLines Commands by Application TextWin TitleSchem ngroupSelected nprotect nselect pdateAllSymbols pdateAnnotationText pdatePropert
463. ommand This only stops error message being dis played A script will still be aborted if an error occurs but no message will be output e noerr Stops scripts being aborted if there is an error The error message will still be displayed If Statement An if statement is of the form if expression then statement endif OR if expression then statement else SIMetrix SIMPLIS Script Reference Manual statement endif OR if expression then statement lelseif expression then statement else statement endif Examples if NOT SelSchem then echo There are no schematics open exit all endif if length val 1 then echo refs idx val else echo Duplicate reference refs idx Ignoring endif if opts 0 amp amp opts 1 then let sel 1 elseif opts 0 then let sel 2 else let sel 3 endif In forml if the expression resolves to a TRUE value the statement will be executed TRUE means not zero FALSE means zero In the second form the same happens but if the expression is FALSE the statement after the else is executed In the third form if the first expression is FALSE the expression after the elseif is tested If that expression is TRUE the next statement is executed if not control continues to the next elseif or else While Statement While statements are of the form do while expression statement loop OR alternative form while expression statement endwhile SIMetrix SIMPLIS S
464. ompressed bitmapped image of the graph If format is omitted wmf will be used mono Copy schematic in monochromatic form vp Viewport dimensions in pixels This is used to specify the size of the image if a bitmapped format png jpeg bmp is specified x is the width y is the height Notes This command makes it possible to export schematics into other windows applications such as word processors The clipboard is a central store within operating system which is accessible by all applications Refer to system documentation for more information CopyFile CopyFile force from file to file Copies a file Parameters SIMetrix SIMPLIS Script Reference Manual force If specified to file will be overwritten if it exists Otherwise if to file exists the command will fail from file Source file to file Destination file CopyLocalSymbol CopyLocalSymbol symbol name new symbol name Copies a symbol in the currently selected schematic to the global library Parameters symbol name Name of local symbol to copy new symbol name New name for symbol when copied to global library If omitted the original name is used If the symbol already CreateFont CreateFont font name font base Creates a new font object based on an existing font The name given to the font can be used to specify the font for some graph annotation objects Once CreateFont is called its name will be displayed in the list displayed when the File Op
465. on will be displayed as a single curve If listing or printing a multi division vector with the Show page 539 command all the divisions will be listed separately You can access a single vector or division within a multi division vector using the index operators and Suppose VOUT was a multi division vector with 5 divisions Each individual vector can be accessed using VOUT O VOUT 1 VOUT 2 VOUT 3 and VOUT 4 Each of these will behave exactly like a normal single division vector So you can use the index operator to access single elements e g VOUT 2 23 retrieves the single value at index 23 in division 2 To find the number of divisions in a multi division vector use the function NumDivisions page 282 You can collate values at a given index across all divisions using the syntax vectorname index E g in the above example VOUT 23 will return a vector of length 5 containing the values of index 23 for all 5 divisions Multi division vectors may be combined using arithmetic operators provided either both sides of the operator are compatible multi division vectors i e have identical x values or one of the values is a scalar Multi division Vectors Not all functions accept multi division vectors for their arguments The following table lists the functions that do accept multi division vectors The entry for each argument specifies whether that argument accepts multi division vectors and how the data
466. on Default 0 Bus name 2 1 Bus start index 0 2 Bus end index 0 3 Display type O 0 Decimal 1 Hexadecimal 2 Analog waveform 3 Binary 4 Hold invalid FALSE TRUE Hold invalid ON FALSE Hold invalid off Scale factor 1 0 Offset 0 0 Units Items used to load Units combo box separated by oO OND Oo Analog threshold lower 86 SIMetrix SIMPLIS Script Reference Manual Index Description Default 10 Analog threshold upper 11 Axis type Auto select 1 Use separate Y axis 2 Use separate grid 3 Digital 12 Axis name 13 Use separate graph 0 yes 1 no 14 Graph name Argument 2 Options Currently just one If set to noProbeOptions the Probe Options sheet will be hidden Returns Return type string array String array with the same length as the input Each field holds the value selected by the user Note that field index 8 does not currently output a meaningful value and should be ignored DefineCounter Dialog Opens a dialog box to define a digital counter Argument is a real array which specifies the initial values for each control as follows 0 Number of bits 1 Maximum count default 2number of bits _ 1 2 1 Has reset 0 does not have reset default 0 3 Clock to out delay default 10n Arguments Number Type Compulsory Default Description 1 real array Yes initial values Returns Return type real arra
467. on graph Full description Needs cursors on 0 or 1 aoa oF won rr Is custom measurement 0 or 1 Returns Return type string array max Returns an array equal to the length of each argument Each element in the array holds the larger of the corresponding elements of argument 1 and arguments 2 Arguments Number Type Compulsory Default Description 1 real Yes vector 1 2 real Yes vector 2 Returns Return type real array 265 SIMetrix SIMPLIS Script Reference Manual maxidx Returns index of the input array element with largest magnitude Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns index to maximum input value Maxima Returns array of values holding every maximum point in the supplied vector whose value complies with limits specified in argument 2 Arguments Number Type Compulsory Default Description 1 real array Yes Vector 2 real array No oo 00 min limit max limit 3 string No empty Options 4 real No 0 0 Tolerance Argument 1 Input vector Argument 2 Real array of max length 2 Specifies limits within which the input values must lie to be included in the result Values are O Minimum limit i e maxima must be above this to be accepted 1 Maximum limit i e maxima must be below this to be accepted Argument 3 String array of max length 2 Specifies two possible options
468. on page 596 The graphic images for all pre defined buttons are built in to the program but the image files from which they were created can be found on the install CD 459 SIMetrix SIMPLIS Script Reference Manual See Also DefButton on page 458 GetToolButtons on page 226 DefKey DefKey key label command string options DefKey is used to define custom key strokes Parameters key label command string Code to signify key to define See table below for list of possible labels All labels may be suffixed with one of the following SCHEM Key defined only when a schematic window is cur rently active GRAPH Key defined only when a graph window is cur rently active SHELL Key defined only when the command shell is cur rently active SYMBOL Key defined only when a symbol editor window is currently active If no suffix is provided the key definition will be active in all windows Valid key labels are F1 F2 F3 F4 F5 F6 F7 FS F9 F10 F11 F12 INS DEL HOME END PGUP PGDN LEFT RIGHT UP DOWN TAB BACK ESC NUM1 NUM2 NUM4 NUM5 NUM6 NUM7 NUM8 NUM9 NUMO NUM NUM NUM NUM NUM Additionally all letter and number keys referred to by letter number alone The space bar can be used _ SPACE but must always be shifted Shifted keys are keys that have shift control or alt also pressed at the same time Any of the above keys can be prefixed with any combination of S for shift C
469. onsequences The discard command deletes the data stored in memory for all vectors in the specified group or a single vector if vec is specified It does not delete the vectors altogether as they are still stored on disc in the temporary file After discarding a group it is still possible to plot all vectors that it contains Display Display file filename append filename notype notitle type type Displays list of all vectors in specified groups or current group by default Lists the name physical type e g voltage current etc data type real complex string alias and size of each vector Parameters append Append result to filename file Output result to filename Jlist no Title Do not display te header showing the group name notype Do not list the data type type Filter result according to type type is a list of typenames separated by Possible values are real complex string alias See Also Expressions on page 11 DrawArc DrawArc theta v over h Initiates arc draw mode in the currently highlighted symbol editor This is an interactive com mand 470 SIMetrix SIMPLIS Script Reference Manual Parameters theta Swept angle in degrees integer Default 90 v over h Vertical radius Horizontal radius Default 1 circle DrawArrow DrawArrow loc x1 y1 x2 y2 Draws an arrow in the schematic editor as specified by the loc parameter Parameters loc D
470. operties which determine characteristics of the object Some properties are read only and are either never altered or can only be altered indirectly Other properties can be changed directly using the command SetGraphAnnoProperty page 533 The labels for curves axes and the various annotation objects are examples of properties that may be edited A full list of all object types and their properties is given in Objects and Their Properties on page 571 Graph Object Identifiers the ID Each instance of a graph object is uniquely identified by an integer value known as its ID Valid IDs always have a value of 1 or greater IDs are returned by a number of functions see below and also a number of the objects possess properties whose value is the ID of a related object Once the ID of an object has been obtained its property names can be read and it property values may be read and or modified The following functions return graph object IDs Note that all functions return object IDs belonging to the currently selected graph only except for GetGraphObjects page 178 which can optionally return IDs for objects on a specified graph AddGraphCrossHair page 58 Add a new cursor to the currently selected graph and return its and its dimension s Ids GetAllCurves page 150 Returns the IDs for all curves GetAllYAxes page 151 Returns the IDs for all Y axes GetAxisCurves page 153 Returns IDs for all curves attached to specified
471. or Returns Return type real array Returns the real part of the complex argument Ref Returns the reference of the argument See Vector References on page 21 Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector Returns Return type real complex array RefName Returns the name of the reference of the supplied vector See Vector References on page 21 Note that the function Ref page 327 returns the actual data for the reference Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector Returns Return type string 327 a SIMetrix SIMPLIS Script Reference Manual RelativePath Returns a path relative to the reference directory argument 2 or current working directory of the full path name supplied in argument 1 Arguments Number Type Compulsory Default Description 1 string Yes Full path name 2 string No Current directory Reference directory Returns Return type string See Also FullPath on page 145 SplitPath on page 361 Remap Device Map SIMetrix simulator device to model name and level number Arguments Number Type Compulsory Default Description 1 string Yes Mapping spec Argument 1 Comma delimited list of name value pairs providing spec to map a device type to its model and level number Name value pairs are defined as follows Returns Return type Notes All devi
472. or is logarithmically spaced and 0 0 otherwise Note the function expects to be supplied with x values 236 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Vector Returns Return type real HasProperty Determines whether a particular instance possesses a specified property Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string No Property name to identify 3 string No Property value to identify 4 real No 1 Schematic ID Argument 1 Property name Argument 2 Property name to use to identify the instance to check If present this argument along with argument 3 identify the instance to be tested for property ownership If only this argument is present and not argument 3 any instance possessing the property it specifies will be tested If neither this or argument 3 are present the currently selected instance will be tested If more than instance is identified one of them will be tested but there are no rules to determine which instance will be used An example of this property would be handle Argument 3 Property value to use to identify the instance to check check If present this argument along with argument 2 identify the instance to be tested for property ownership If neither this or argument 3 are present the currently selected instance will be tested If more than instance is identified one of th
473. or the y axis with ylabel ylog Forces logarithmic y axis only effective when graph sheet is empty yunit Specify units for y axis Volts Watts etc with string yunit Tf it contains spaces the whole string must be enclosed in quotes You should not include an engineering prefix m K etc y expression Expression describing curve to be added to graph T expression Expression describing x values of curve defined by y expression If omitted reference of y_ expression will be used Notes autoxlog and autoxylog log test The x values are deemed to be logarithmically spaced if three values satisfy the following 2 1 0000001 gt zal gt 0 9999999 To Ta Where xo 110 i e the first point in the data If there are an even number of points n Ly elo 1 2 x n 2 where n is the number of points in the data If there are an odd number of points n 1 2 t 2 z2 x n 1 507 SIMetrix SIMPLIS Script Reference Manual where n is the number of points in the data If there are fewer than three points or any of the values is less than or equal to zero a linear axis will be selected PreProcessNetlist PreProcessNetlist Pre processes the specified netlist The netlist pre processor was developed for use with the SIM PLIS simulator but is general purpose in nature and may also be used with SIMetrix Currently this command is automatically called when a SIMPLIS simulation is run f
474. ormat of the schematic binary file Possible values and the SIMetrix versions for which those formats were used are 102 Version 1 0 to 2 02 250 Version 2 5 to 4 0 420 Version 4 1 421 Version 4 2 422 Version 4 5 423 Version 5 0 5 2 424 Version 5 3 425 Version 5 4 426 Version 5 5 0 ASCII schematic 1 User version Each time the schematic is saved this value is incremented 2 Exact version of SIMetrix that was used to save the file Only valid if saved with version 5 4 or later Otherwise this field will be empty Version includes the maintenance suffix letter E g 5 4e GetSchem Title Returns the title of the current schematic Arguments No arguments Returns Return type string GetSelectedAnnotation Text Returns the text in the selected annotation Only works for a single selected annotation If multiple annotations are selected only the text from one of the annotations will be returned Arguments No arguments 206 SIMetrix SIMPLIS Script Reference Manual Returns Return type string Annotation text GetSelectedCurves Returns array of curve id s for selected curves y Arguments No arguments Returns Return type string array GetSelectedGraphAnno Returns the ID for the currently selected graph annotation object If no object is selected the function returns 1 If no graphs are open the function returns an empty vector See Graph Objects on page 569 for information on graph
475. ory If it is omitted the first letter of the ref property is used instead See Summary of Simulator Devices for full list of devices supported by the simulator and their required model properties Full details on properties are given in the User s manual For more information see AddProp command on page 438 The final line EndSym terminates the model definition The symbol will not be recognised until this is executed How Symbols are Stored Symbol definitions are first stored in a sxslb file which resides in the SymbolLibs directory These files are managed by the symbol library manager When a symbol is placed on a schematic a copy of that symbol definition is stored in the schematic and from then on the schematic will use that copy of it This means that if you change a symbol definition for a schematic that is saved when you open that schematic it may still be using the old definition as it is saved with the schematic Whether or not the symbol is updated automatically depends on how it was saved If flags 1 was included with the CreateSym page 454 command then it will be automatically updated If you wish to force the schematic to use the new symbol select the symbol or symbols then select the popup menu Update Symbols Note that all instances of the symbol will be updated It is not possible to have two versions of a symbol on the same schematic Data Import and Export This section is also in the User s manual
476. ot recommended for new scripts PropValues2 has rearranged arguments allowing the schematic handle to be specified without requiring the property value to provided It also has more convenient behaviour in the situation when there is no instance match 309 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Property name whose value is required 2 string No Use selected components if Property name to identify omitted instance 3 string No All instances with property Property value to identify name in arg2 instance 4 real No 1 Schematic ID Argument 1 Property name whose value is required Argument 2 Along with argument 3 if present these arguments identify the instances to be examined If only argument 2 is specified then all instances on the specified schematic that possess that property will be used If argument 3 is also present then the instance name and value must match argument 2 and 3 respectively If neither are present the selected instances will be used Argument 3 See argument 2 Argument 4 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array The function returns a string array of length equal to the number of instances identified by argu m
477. otate component or block Runs a simulation on specified netlist Spawns a new simulator process and runs speci fied netlist Runs the script currently open in the text editor Runs the SIMPLIS simulator Save selected schematic Saves the currently selected schematic Saves the currently selected graph to a binary file Saves the current data group Create nodeset file to speed DC convergence Saves the current state of a transient analysis to a snapshot file Save a symbol to a library or as a component Writes the entire global symbol library or a speci fied installed symbol library file to filename Note that the action of this command has changed sig nificantly from that of version 4 0 and earlier Saves current text editor Saves the current text editor to a specific file Enables the file watcher on the schematic Disables the file watcher on a schematic editor Enables the file watcher on a schematic editor Captures a screen shot of the current window Abort currently executing script Pause currently executing script Resume paused script Single step script Select schematic items Interactive Select specified curve Switches the graph tabbed sheet Selects or unselects all graph window legends Focuses on the specified schematic Selects current simulator for selected schematic Selects the symbol pin with given name 421 SIMetrix SIMPLIS Script Reference Manual Command Name Description Select Wi
478. output the results to a file or the windows clipboard respectively The data can then be examined with a text editor or spreadsheet program The results will be tabulated if all vectors are compatible that is have the same xvalues If the any vectors listed are not compatible each vector s data will be listed separately The precision of numeric values can be controlled using the Precision option setting Use the command Set precision value This sets the precision in terms of the column width ShowCurve ShowCurve curve id Shows specified curve having been hidden using HideCurve page 478 See Also HideCurve on page 478 ShowSimulatorWindow ShowSimulator Window Displays simulator status window if it is currently hidden SizeGraph SizeGraph axisid id x offset y offset x scale y scale General purpose command to zoom or scroll a graph Parameters axisid Specify which y axis to resize If omitted all y axes on selected graph will be affected zfull If specified the x axis is zoomed to fit whole graph xscale and z offset will be ignored yfull If specified the y axis is zoomed to fit whole graph yscale and y offset will be ignored x offset Extent of X shift as proportion of full width of graph E g 0 25 will shift by a quarter O has no effect y offset As z offset but for y axis x scale View width required as proportion to current width E g 0 8 will zoom in by 20 1 has n
479. owing does the same Plot FIR vout 0 25 unitvec 4 See Also IIR page 241 Floor Returns the argument truncated to the next lowest integer Examples Floor 3 45 3 Floor 7 89 7 Floor 3 45 4 This function accepts only scalar input values See floorv page 143 for a version that accepts vector input Arguments Number Type Compulsory Default Description 1 real Yes scalar Returns Return type real 142 SIMetrix SIMPLIS Script Reference Manual floorv Returns the argument truncated to the next lowest integer Same as Floor page 142 except that it also accepts vector inputs for example Floorv 3 45 7 89 3 45 3 7 4 Arguments Number Type Compulsory Default Description 1 real Yes vector Returns Return type real vector Returns a vector of the arguments truncated to next lowest integers FormatNumber Formats a real value and returns a string representation of it Arguments Number Type Compulsory Default Description 1 real Yes number 2 real Yes significant digits 3 string No eng format Argument 3 Format options are eng default if omitted Formats the number using engineering units noeng Normal format Will use E if necessary Y Formats as a percentage Returns Return type real Fourier Calculates the fourier spectrum of the data in argument 1 The function uses the Continuous Fourier technique which numerical
480. page 260 Multi log10 page 261 Multi mag page 261 Multi magnitude page 261 Multi maxidx page 266 Multi Maxima page 266 Multi X X Maximum page 267 Multi X X mean page 267 Multi Mean1 page 268 Multi X X minidx page 271 Multi Minima page 271 Multi X X Minimum page 273 Multi X X norm page 281 Multi NumDivisions page 282 Scalar NumElems page 282 Vector SIMetrix SIMPLIS Script Reference Manual Function name Argl Arg2 Arg3 Arg4 ph page 296 Multi phase page 297 Multi phase_rad page 297 Multi PhysType page 298 Scalar Range page 320 Multi X X re page 320 Multi real page 327 Multi Ref page 327 Multi RefName page 327 Scalar Rms page 333 Multi RMS1 page 333 Multi X X rnd page 334 Multi RootSumOfSquares page 334 Multi X X sign page 355 Multi sin page 358 Multi sinh page 358 Multi sin_deg page 358 Multi sqrt page 362 Multi SumNoise page 367 Multi X X tan page 376 Multi tanh page 376 Multi tan_deg page 376 Multi Truncate page 383 Multi X X Units page 388 Scalar Val page 392 Multi XFromY page 409 Multi X X X XY page 412 Multi Multi YFromX page 413 Multi X X Vector References Simulation vectors are usually attached to a reference The reference is a vector s x values E g any vector created from a transient analysis simulation will have a reference of time AC analysis results have a reference of frequency
481. pan box is checked 1 if AC coupled box is checked T if Integral cycles box is checked Graph label custom definition Expression custom definition 1 if Save to pre defined box is checked Format template custom definition Label for custom definition Oo AN DT FF won er Long description for custom definition MenuModifier Arguments No arguments Returns Return type MessageBox Opens a message dialog box with a choice of styles Arguments Number Type Compulsory Default Description 1 string array Yes Message 2 string array No Options Argument 1 1 or 2 element string array First element is the text of the message to be displayed in the box The second element is the box title If the second element is not supplied the box title will be the name of the application e g SIMetrix Micron AD 269 SIMetrix SIMPLIS Script Reference Manual Argument 2 1 or 2 element string array First element is box style This may be one of the following AbortRetrylgnore Three buttons supplied for user response Abort Retry and Ignore Ok Ok button only OkCancel Ok and Cancel button YesNo Yes and No buttons YesNoCancel Yes No and Cancel buttons Default OkCancel Second element is icon style A small icon is displayed in the box to indicate the nature of the message Possible values Warn Info Question Stop Default Info
482. parameter name Unknown instance name No circuit loaded The following script code sets the area parameter of Q6 to values of 100 200 and 400 for the first second and third steps respectively Let values 1 2 4 Let step GetCurrentStepValue Let value values step 1 Let SetInstanceParamValue q6 See Also GetCurrentStepValue page 161 SetModelParamValue page 350 GetModelParameterValues page 196 GetDotParamValue page 169 SetModelParamValue area value Script based multi step analyses use a script call to define each step This function can be used in such a script to a set a model parameter SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string yes Model name 2 string Yes Parameter name 3 string Yes New parameter value 4 real No 0 Vector index for vector pa rameters Returns Return type String indicating status of function call Return string Description success Function successful badparam Unknown parameter name nomodel Unknown model name nocircuit No circuit loaded Example The following script code sets the BF parameter to values of 100 200 and 400 for the first second and third steps respectively Let values 100 200 400 Let step GetCurrentStepValue Let value values step 1 Let SetModelParamValue BC546B BF value See Also GetCurrentStepValue page 161 SetIns
483. pe real SetComponent Value In that application no SetComponent Value is a specialised function that is used by some internal scripts It provides a way of setting or getting a value or parameter on a schematic using a single string to identify it This is in contrast to the usual methods to retrieve values or set values that require a sequence of commands or functions For example to set a resistor R2 to 2200 ohms using conventional methods requires this sequence SIMetrix SIMPLIS Script Reference Manual Unselect Select Prop REF R2 Prop VALUE 2200 With SetComponent Value this can be done simply with Let SetComponentValue R2 2200 However SetComponent Value can also descend into hierarchies and set values at lower levels For example Let SetComponentValue U1 R2 2200 Will set the resistor R2 in hierarchical block U1 SetComponent Value can also set named parameters For example if X1 is a parameterised opamp Let SetComponentValue X1 GBW 16 5E6 will set the GBW parameter to 16 5E6 Because the methods use to store component values and parameters is dependent on the part being edited or viewed this function requires pre configuring This is done using PrepareSet ComponentValue page 299 A built in script is available that will configure SetComponent Value for the most commonly used cases The script is called prepare_set_component_default See PrepareSetComponentValue page 299 for further details B
484. pe Compulsory Default Description 1 string No Property name 2 string No Property value 3 real No 1 Schematic ID Argument 1 Property name to identify instance Along with argument 2 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness Argument 2 Property value to identify instance Along with argument 1 if these arguments are not provided the selected instance if any will be used instead If there are no selected instances or no instances that match the arguments the function will return an empty vector If the arguments identify more than one instance the function will return information for one of them but there are no rules to define which one Using the HANDLE property and its value will guarantee uniqueness SIMetrix SIMPLIS Script Reference Manual Argument 3 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array InstPoints Returns an
485. pe Compulsory Default Description 1 string Yes Section Argument 1 Name of section to return Returns Return type string array An array of strings holding the values for every entry in the specified section Note that the key names are not returned This function is intended to be used for managing lists of values identified by their section name Use the function AddConfigCollection page 58 to write values to the list ReadConfigSetting Reads a configuration setting Configuration settings are stored in the configuration file See User s Manual Sundry Topics Configuration Settings for more information Settings are defined by a key value pair and are arranged into sections The function takes the name of the key and section and returns the value Note that option settings as defined by the Set command are placed in the Options section Although these values can be read by this function this is not recommended and instead you should always use the function GetOption page 201 321 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Section 2 string No Key Argument 1 Section name See description above for explanation Argument 2 Key name See description above for explanation If this argument is omitted the function will return a list of all keynames found in the specified section Returns Return type string or string array Value read from
486. pin name Scaling is 100 points per grid square Justification is determined by label_ flags see below label flags Justification of pin label text Values as follows 0 left top 1 centre top 2 right top 8 left baseline 9 centre baseline 10 right baseline Baseline means the base for upper case characters The tails of some lower case characters go below the baseline SIMetrix SIMPLIS Script Reference Manual qualifier list One or more qualifiers used for XSPICE devices For more informa tion refer to Simulator Reference Manual Simulator Devices Using XSPICE Devices Qualifiers may be one of vecclose Pin closes a vector connection This causes a to be placed after the pin s connection in the netlist vecopen Pin opens a vector connection This causes a to be placed before the pin s connection in the netlist vecopenl As vecopen except that it forces the to always be placed before any other qualifiers invert Inverts a digital pin Places a before it in the netlist d Forces pin to be of digital type Ae Forces pin to be of type grounded conduc tance gd Forces pin and the one following to be of type differential conductance h Forces pin to be of type grounded resis tance hd Forces pin and the one following to be of type differential resistance i Forces pin to be of type single ended cur rent id Forces pin and the one following to be of type differe
487. plain unia width expression Notes As file except that file is appended if it already exists If specified the result is copied to the windows clipboard If specified outputs result to filename The values are output in a format compatible with OpenGroup page 498 and the text switch File specified by file will be unconditionally overwritten if it exists If specified with file a lock file will be created while the write oper ation is being performed The file will have the extension lck This can be used to synchronise data transfers with other applications The file will be locked for write operations Semicolon delimited list of column labels If specified each vector column will be labelled by the corresponding name given in names Otherwise vector name is used as label If the vector has no reference the index value for each element is output if this switch is not specified If specified no index as noindex and no header as noHeader will be output In addition string values will be output less the quotation marks Page width in columns Expression to be displayed If expression is an array all values will be displayed To enter multiple expressions separate each with a comma SIMetrix SIMPLIS Script Reference Manual The display of arrays with a very large number of elements gt 500 can take a long time For large arrays it is recommended that the file or clipboard switch is used to
488. ple window GUI type Hash Returns a hash value for the supplied string A hash value is an integer value similar to a check sum 233 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Input string Returns Return type string HashAdd HashAdd Arguments Number Type Compulsory Default Description 1 real Yes Hash table id as return by HashCreate page 234 2 string Yes List of keys 3 string Yes List of values corresponding to the keys in argument 2 Returns Return type real 1 0 if hash table exists otherwise 0 0 See Also HashCreate page 234 HashDelete page 235 HashSearch page 236 HashCreate Create a hash table Arguments Number Type Compulsory Default Description 1 string array No empty Options 234 SIMetrix SIMPLIS Script Reference Manual Argument 1 Array of strings may be any combination of temporary Hash table is temporary and will be automatically deleted when control returns to the command line multiple Allows multiple entries with the same name to be added to the table Returns Return type real Id of hash table May be used in any of the hash table function See list below in See Also section Notes Hash tables provide a fast method of searching for objects in a large list Be aware that the number of items in the table needs to be in excess of about 10000 before the hash table offers an
489. possible Argument provides initial text return value is text entered by user The function returns an empty vector if the user cancels the dialog box 244 i o SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string No Initial text 2 string No empty Message Returns Return type string Instances Returns array of property values of property name specified as argument A value will be returned for every instance on the schematic that possesses that property An instance is a schematic item represented by a symbol components ground symbols etc For example Instances ref would return every component reference in the schematic Note that every instance has a unique Handle property which is automatically assigned This makes it possible to access every instance on the schematic The second argument is a schematic handle as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used The function will return an empty vector if no schematic is open or argument 2 is invalid An empty string will be returned if no instance possess the specified property The latter behaviour is not always convenient but is retained for backward compatibility The function PropValues2 page 310 with appropriate arguments will ret
490. pped or smooth A stepped return vector will have vertical discontinuities at the beginning and end of each period found in the input vector with the value being constant during the input vector period A smooth return vector will have a single data point per input vector period located at the mid point of the input vector period Argument 3 is optional and specifies the output curve type if this argument is not passed the default value will be stepped The stepped return vector will change value only at the edges detected in the input vector The value will be constant during the entire period A smooth input vector will have a single data point at the mid point of the input vector period The points will be connected resulting in a smooth curve from one period to the next Argument 4 specifies edge direction If set to 0 either direction will be accepted If set to 1 only positive edges will be detected and if set to 1 only negative edges will be detected This argument is only used for the period and frequency measurements All other measurements will be processed with the Direction argument set to 1 indicating positive edges SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes Input vector 2 string Yes Measurement to make 3 string No stepped Type of return curve 4 real No 1 Direction Argument 1 The vector to return the Frequency Period Duty Cycle On Time
491. process This should be empty if arg 1 is a document file Argument 3 Default directory for application that processes the file SIMetrix SIMPLIS Script Reference Manual Argument 4 Verb that defines the operation to be performed This would usually be open but could be print or any other operation that is defined for that type of file Returns Return type string Returns one of the following Value Description OK Function completed successfully NotFound File not found BadFormat File format was incorrect AccessDenied File could not be accessed due to insufficient privilege NoAssoc File has no association for specified verb Share File could not be accessed because of a sharing violation Other Function failed for other reason NotImplemented Function not implemented on this platform sign Returns 1 if argument is greater than 0 otherwise returns 0 Arguments Number Type Compulsory Default Description 1 real array Yes vector Returns Return type real array Returns 1 if argument is greater than 0 otherwise returns 0 SimetrixF ileInfo Returns information about a SIMetrix file Currently this function will only return information about version 4 1 or later schematic files Arguments Number Type Compulsory Default Description 1 string Yes 355 SIMetrix SIMPLIS Script Reference Manual Argument 1 File name Retu
492. prompts for function names and commands Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto filename Path of script source file to open 502 SIMetrix SIMPLIS Script Reference Manual See Also OpenNetlist on page 500 to open a model file or netlist file OpenBasicTextEditor on page 497 to open a plain text file OpenLogicDefinitionEditor on page 499 to open a logic definition file for the abritrary logic block OpenVerilogA on page 503 to open a Verilog A source file OpenVerilogHDL on page 504 to open a Verilog HDL source file OpenAsciiFile on page 496 to open a schematic file in the text editor OpenSimplisStatusBox OpenSimplisStatusBox Opens the SIMPLIS simulation status box See Also CloseSimplisStatusBox on page 448 OpenVerilogA OpenVerilogA filename Opens a Verilog A source file in the text editor This will apply syntax highlighting for the Verilog A language Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto filename Path of Verilog A source file to open See Also OpenNetlist on page 500 to open a model file or netlist file OpenBasicTextEditor on page 497 to open a plain text file OpenScript on page 502 to open a script OpenLogicDefinitionEditor o
493. ps on page 18 for more information Parameters all If specified all groups except the user group are destroyed cleanUp Inhibits delete of associated temporary data file This file will only be deleted any way if the option variable DataGroupDelete is set to OnDelete noDelete Specify this switch if the associated data file is going to be reused as it may speed up the read operation especially if the data was created by a simulation that was paused If the file will be deleted then this switch has no benefit but will do no harm other than to slow the execution of this command a little See Also CreateGroup page 452 OpenGroup page 498 Groups page 233 DelLegendProp DelLegendProp curve id legend name Delete graph legend property Parameters curve id Id of curve which possesses property Curve id is returned by the functions GetSelectedCurves page 207 GetAxisCurves page 153 and GetAllCurves page 150 property name Name of property to be deleted The function GetLegendProperties page 188 returns legend properties owned by a specified curve 467 SIMetrix SIMPLIS Script Reference Manual DelMenu DelMenu bypos pos force keepid menuname Deletes specified menu item or submenu Parameters bypos force menuname DelProp The menu to be deleted is identified by its position The first item in the menu is at position zero If specified will allow complete submenus to be deleted Ot
494. put hysteresis 1 0 5 RISE_ DELAY The rising edge delay 15n 6 FALL_DELAY The falling edge delay 10n 7 HS_RDSON The upper switch RDS on for Level 0 and 1 1 models 8 HS RSAT The upper switch saturation resistance for 10Meg Level 0 and 1 models 9 HS_ISAT The upper switch saturation current for 2 Level 0 and 1 models 10 LS_RDSON The lower switch RDS on for Level 0 and1 1 models 11 LS_RSAT The lower switch saturation resistance for 10Meg Level 0 and 1 models 12 LS_ISAT The lower switch saturation current for Level 3 0 and 1 models 13 IC The initial condition of the upper switch empty 14 HS_ROFF The upper switch off resistance for Level 0 10Meg and 1 models 15 LS_ ROFF The lower switch off resistance for Level O 10Meg and 1 models 16 HS_VON The upper switch on state voltage 0 17 LS_VON The lower switch on state voltage 0 18 HS_RDSON_L2 The upper switch RDS on for Level 2 mod 10 els 19 HS_R2_L2 The upper switch resistance for the second 500m PWL segment 20 HS_RSAT_L2 The upper switch saturation current for 10Meg Level 2 models 21 HS_V1_L2 The voltage where the upper switch transi 500m tions from the 1st to 2nd PWL segments 22 HS_ISAT_L2 The upper switch saturation current for 1 Level 2 models 23 LS_RDSON_L2 The lower switch RDS on for Level 2 mod 10 els 24 LS_R2 L2 The lower switch resistance for the second 500m PWL segment 123 SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default
495. r Font specifcations are strings that provide information about the type face size style and other font characteristics Font specifications should only be used with functions and commands that are designed to accept them The format of the font spec may change in future versions Arguments Number Type Compulsory Default Description 1 string No Default font Initial font specification 2 string No Name of object being edited Returns Return type string SelectRows Accepts an array of character delimited strings and returns an array containing a selection contain ing the test string at specified field This function was developed for the parts browser mechanism but is general purpose in nature Arguments Number Type Compulsory Default Description 1 string Yes Input data 2 string Yes Test string 3 string No 0 Field number 4 string No a Delimiter 344 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Example Data input arg 1 HA 5002 HA buf Buffers HA 5033 HA buf Buffers HA5002 buf Buffers HA5033 buf Buffers LM6121 NS buf Buffers 1 2 4 3 MAX4178 buf _5 Buffers MAX4278 buf _5 Buffers MAX496 buf _5 Buffers Test string arg 2 buf Field number arg 3 1 Returns HA 5002 HA buf Buffers HA 5033 HA buf Buffers HA5002 buf Buffers HA5033 buf Buffers LM6121 NS buf Buffers 1 2 4
496. r Symbol x co ordinate of end of segment end y Integer Symbol y co ordinate of end of segment See Also Schematic Symbol Script Definition on page 564 AddSymbolProperty AddSymbolProperty name flags value x y styleoverride style name Adds a property to the symbol currently open in the symbol editor See the User s Manual for detailed information on properties Parameters styleoverride Style name to use instead of the inferred style name Property name flags Property attribute flags See Attribute Flags in the Prop command on page 510 value Property value Ly If both specified the property will automatically be given a fixed position attribute and will be located at the position given The position is relative to the symbol s origin AddTextBox AddTextBox font font name colour colour name text x position y position Adds a Text Box to the currently selected graph A text box is an item of text enclosed by a border Parameters colour Name of colour to be used for text Name of option setting that will store the colour of the object in the form rrggbb Default is GraphColourTextBoxText font Name of font to be used for text This must either be a built in font or one created using CreateFont Default is Graph Text Box 441 SIMetrix SIMPLIS Script Reference Manual text Text to be displayed in the box This may use symbolic value enclosed by The following are meaningf
497. r Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Return the hyperbolic tangent of the argument specified in radians 376 SIMetrix SIMPLIS Script Reference Manual TemplateGetPropValue This function may only be used in Template scripts These are used for advanced netlist customi sation See Schematic Template Scripts on page 584 for more details Function returns the value of the property defined in argument 2 for the schematic instance defined by the REF property value given in argument 1 Arguments Number Type Compulsory Default Description 1 string Yes REF propert value 2 string Yes Property name Returns Return type string TemplateResolve This function may only be used in Template scripts These are used for advanced netlist customi sation See Schematic Template Scripts on page 584 for more details Function processes argument 2 as if it were a TEMPLATE property for the instance defined by argument 1 The return value is what the template resolves to Arguments Number Type Compulsory Default Description 1 string Yes 2 string Yes Template value Argument 1 REF property value Returns Return type string TextEditorHasComments Returns whether the editor supports comments Arguments No arguments 377 SIMetrix SIMPLIS Script Reference Manual Returns Return type boolean ThdWeight Returns a real array of
498. r Type Compulsory Default Description 1 string No Options Argument 1 String array consisting of one or both of the values ignorewindow or derated If ignorewindow is specified then the function will not return data for SOA specifications that include a window If derated is included the values returned allow for any derating factor For example if the limit is 40V with 80 derating and the maximum value reached was 38V the overload factor with derated specificed will be wa 1 1875 Without derated specified the overload factor would be 3 0 95 218 SIMetrix SIMPLIS Script Reference Manual Returns Return type real array Returns an array of reals defining the overload factor for each SOA definition Each element in the array corresponds to the elements returned by the function GetSoaDefinitions page 217 GetSoaResults Returns the SOA results for the most recent simulation Arguments No arguments Returns Return type string Returns an array of strings each one describing a single SOA failure Each string is a semi colon delimited list with fields defined below Index Description 0 SOA Label 1 Start of failure 2 End of failure 3 under or over Defines whether the test fell below a minimum limit or exceeded a maximum limit 4 Value of limit that was violated GetSymbolArcInfo Returns information on symbol editor arc Arguments No arguments
499. r of rows and columns equal to the number of logic families listed in the header Both column and rows represent outputs The table defines how outputs from different families are treated when they are connected The entry may be one of four values SIMetrix SIMPLIS Script Reference Manual ROW Row take precedence COL Column takes precedence OK Doesn t matter Currently identical to ROW ERR Incompatible outputs cannot be connected Parameters filename Logic compatbility file RebuildSymbols RebuildSymbols The installed symbol library is usually stored in RAM during normal operation When a symbol is needed the modified date of original source file is checked and if it has changed that library file will be reloaded This happens anyway whenever a symbol is required for any purpose RebuildSymbols forces the checking of all stored symbol libraries and any that are out of date will be reloaded from the source file There aren t many reasons for using this command However it is sometimes useful to call it in the startup script so that the symbols are automatically loaded when the program starts Normally the symbols aren t loaded until they are first needed and this can introduce a slight delay Redirect Redirect err out filename Redirects messages i e text which is normally displayed in the message window to a file One or both of err or out must be specified Parameters Jerr Specifies that error and warning message
500. rameters comp Saves symbol as a component to path symbol name file Symbol saved to specified library file This is ignored if comp is specified If a full path is not supplied the path will be relative to the SymbolLibs directory flags If flags 1 symbol is saved with tracking enabled This forces all instances of the symbol to always be loaded from the global symbol library rather than from the local schematic This is the action of the All references to symbol automatically updated check box in the symbol editor s File Save dialog box SIMetrix SIMPLIS Script Reference Manual lib Use specified library symbol as source instead of the symbol editor lib symbol name must be the internal name for a symbol in an in stalled library symbol name Name of symbol This is known as the internal name in the user interface This is the name that the software uses to identify the symbol It is stored in schematic files and it is used for a number of script functions and commands for example the command Inst page 481 to place a symbol uses this name This name may not contain spaces or special characters and cannot be changed once the symbol is created symbol description Symbol description This is the name that is displayed in the dialog opened with Place From Symbol Library Unlike the symbol name above it has no naming restrictions and can be changed at any time without affecting any existing instances of the sy
501. raph on page 508 PrintSchematic on page 509 The functions are GenPrintDialog on page 148 for interactive printing GetPrinterInfo on page 203 Each of these commands and functions is described in detail in its relevant section Here we give a general overview for the printing procedure Procedure The sequence for a print job is 1 Open printer At this stage the printer to be used page orientation title and number of copies may be selected 2 Print pages The actual graphs schematics to be printed along with scaling and margins are specified here Any number of pages can be printed 3 Close printer This actually starts the physical printing It is also possible to abort the print job Example Suppose we wish to create a PDF file using Acrobat Distiller for the current graph Of course you can readily do this by selecting File Print and making the appropriate selections using the dialog box This is no good however if you want to create a PDF file for a graph created using an automated simulation perhaps run overnight The following script will do this without user intervention Get info on system printers Let printInfo GetPrinterInfo Search for acrobat distiller The printer list from GetPrinterInfo starts at index 2 so we subtract 2 to get the index needed by OpenPrinter Let distillerIndex Search printInfo Acrobat Distiller 2 If Acrobat distiller is not on the
502. reConnected Set SetAnnotationTextPosition SetCurveName SetDefaultEncoding SetGraphAnnoProperty SetGroup SetHighlight SetOrigin SetPinPrefix SetPinSuffix SetReadOnly SetRef SetSnapGrid SetStyleColour SetSymbolFillStyle SetSymbolOriginVisibility SetUnits Shell ShellOld Show ShowCurve ShowSimulatorWindow SizeGraph TemplateEditProperty TemplateSet Value Text EditorCommentLines Text EditorFileWatcherIgnoreChanges TextEditorFileWatcher WatchChanges Selects all wires connected to the currently se lected elements Set option Sets the position of text within a shape based annotation Change curve name Sets the default encoding for reading text files when detected as not UTF 8 Change a graph object property value Change current group Highlights or unhighlights schematic objects Set origin of symbol in symbol editor Sets the prefix for the selected pin property Sets the suffix for the selected pin property Sets a vector to be read only Change attach reference to variable Sets schematic snap grid Sets the style with the specified colour Applies a fill style to a symbol Controls the visibility of the origin marker in the symbol editor Change physical units of variable Execute external application or system command Execute external application or system command Display or write to file specified variable Show hidden curve Display simulator status box Zoom or scroll graph Template
503. reate curve s data Yes SIMetrix SIMPLIS Script Reference Manual Name Description Read Only DefaultLabel This is composed from Name Suffix and GroupName to Yes form a text string that is the default label for the curve Display Type May be Yes analog curve is regular analog trace decimal bus display showing decimal values hex bus display showing hexadecimal values binary bus display showing binary values Division Division index if plotting a multi division vector See Yes Multi division Vectors on page 19 Expression Expression that created this curve Yes Graph ID of parent graph Yes GroupName The data group that was current when the curve was cre Yes ated ID ID of this object Yes Limits The X an Y limits of the curve in the form xmin xmax Yes ymin ymax Measurements Measurements added to a curve Yes NumDivisions Number of divisions in curves data I e the number of Yes separate traces in a group of curves Groups of curves are usually produced by Monte Carlo analyses Probeld Name used to uniquely identify fixed probe i e GRAPH Yes statement that created this curve Used to maintain per sistence Empty for randomly plotted curves ShortLabel A label composed from Name and Suffix but without group Yes name Type Type of object always Curve Yes XAxis ID of x axis attached to curve Yes XExpression Expression that defines X values Yes XUnit Physical type of curve s x data Yes YAxis ID of
504. refs variable so the loop is repeated for all elements in refs The next line is let val PropValues value ref refs idx This calls the PropValues function again This time it returns the value of the value property for any instance with the property ref which has the value refs idx Assuming the schematic has been annotated unique references assigned to all components the result of this call should be a single value which is assigned to val The next 2 lines if length val 1 then echo refs idx val The if statement checks that val has length one which means that the reference is unique If it is then the Echo page 471 command is called which displays on the message window all the text following it In this instance the echo command is followed by two braced substitutions A braced substitution is an expression enclosed in curly braces and The braces and the enclosed expression are replaced by the result of evaluating the expression as if it had been typed in Braced substitutions are a very important feature of the SIMetrix scripting language Here the result is the component s reference and value are displayed in the message window The last part of the for loop is else echo Duplicate reference refs idx Ignoring endif This is executed if the if expression length val 1 is false This means that there is more than one component with that component reference A message is output saying that it is bei
505. rence Manual Minimum Returns the smallest value found in the vector specified in argument 1 in the range of x values specified by arguments 2 and 3 Arguments Number Type Compulsory Default Description 1 real complex array Yes Vector 2 real No start of vector Min range 3 real No end of vector Max range Returns Return type Real MkVec Most simulation vectors are accessed using the name of the node that generated the data For example if a node is called VOUT the vector to access the data on that node is also called VOUT However some nodes are named in a manner that cannot directly be accessed as the name contains characters that can be confused with arithmetic and other operators For example it is legal to call a node 15V but this would be confused with the constant value 15 To resolve this a vector may be accessed using the Vec page 393 function E g Vec 15V The MkVec function will return a string that can be used to access the vector data If the vector name does not contain any conflicting characters it will return the name unmodified If it does contain conflisting characters it will return a string using the Vec function Arguments Number Type Compulsory Default Description 1 string Yes Node name Returns Return type string Expression to access node data MLSplineFit Performs a spline based line fit to a set of data Given a set of training parameters and observ
506. required at all so the above line will change the default model used for all resistors to the Hspice model instead of the native SIMetrix model It is also possible to add a new mapping in which case the level and modelname parameters must be currently unused Also when creating a new mapping the Letter parameter must be specified Letter is the first letter of the component reference traditionally used to identify the type of device in SPICE netlists For example Q refers to BJTs and D refers to diodes For example the following entries define LEVEL 69 as a valid level for accessing the PSP 1 03 model RemapDevice ModelName nmos Level 69 Device psp103_n report on Note that two entries are required in order to support both n channel and p channel devices The above doesn t change the existing level it adds an additional level Both the original level number and 69 will be accepted and be equivalent When defining a new mapping the letter must be specified and usually this should be the letter conventionally used for the class of device If defining a new mapping for a MOSFET the letter M should be used for a diode the letter D should be used and so on However the letters N P W U and Y maybe used as well for any type of device RemoveConfigCollection Removes one or more entries from a configuration file collection Arguments Number Type Compulsory Defa
507. returned by the OpenSchematic page 286 function This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array String array of size 2 times the number of module ports in the underlying schematic Values arranged in pairs The first in each pair in the name of the module port and the second value is the bus size The latter will always be 1 for a non bus module port 155 SIMetrix SIMPLIS Script Reference Manual GetCodecNames Returns all encoding types available to be used with LoadFile page 259 SetDefaultEncoding page 532 and all text editor open commands using the encoding switch Arguments No arguments Returns Return type string array GetColours Returns the names of built in colour objects Arguments No arguments Returns Return type string array Get ColourSpec Returns the current colour specification for a colour object whose name is passed to argument 1 Named colour objects are simply option variables used to store colour information See Set page 531 for information about option variables Returns the value in the form rrggbb If the object name passed is not recognised the function will return the representation for the colour black Arguments Number Type Compulsory Default Description 1 string Yes Colour name Returns Return type strin
508. rgument 3 Each array element is a different line type available to all styles Options are Solid Dash Dot DashDot DashDotDot Argument 4 Default styles to use in the preview window that are not shown or editable in the dialog Only required to ensure the correct default wire symbol and annotation styles are applied Each element in the array is a full style definition in the form StyleName lineColour lineColour lineType lineType lineThickness lineThickness fontFamily fontFamily fontItalics fontItalics fontBold fontBold fontColour fontColour fontSize fontSize propertyStyle propertyStyle fontOverline fontOverline fontUnderline fontUnderline StyleName values can be either DefaultWire DefaultInstance Default Annotation Argument 5 Optional flags for hiding buttons in the dialog The flags are Flag Behaviour noadd Hides the New button noduplicate Hides the Duplicate button noedit Hides the Edit Name button Argument 6 Global style information used for reverting local styles back to their global settings Each row is a separate style defined in the same form as argument 4 Any style name is allowed Argument 7 If set to FontOnly only font settings will be displayed within the editor Returns Return type string array String vector of updated styles if successful or an empty string if cancel is selected SIMetrix SIMPLIS Script Reference Manual Each ele
509. ring Yes X Y Pairs 2 string No Options 3 real array No Initial conidtion value states Argument 1 X Y Pairs to initialise box The above example would be displayed after a call to Show pwldialog 0 0 5 1 1 5 2 2 5 Argument 2 Up to seven element string array to define box labels Index Description 0 Box caption Default Define PWL Source 1 Label for X Values column Default Time 2 Label for Y Values column Default Value SIMetrix SIMPLIS Script Reference Manual Index Description 3 Initial condition mode May be none Default setting No initial condition displayed segment Initial segment Initial condition value is an integer with a mini mum value of 1 and a maximum value equal to the number of rows Used for some SIMPLIS PWL devices Use initial condition check box will not be shown continuous Initial condition is a non integral number Use initial condition check box will be shown 4 Help context id Default 1 no help button shown 5 Minimum number of segments Default 1 6 Maximum number of segments Default 255 7 Symmetric definition flag 1 enables symmetric definition mode Default 0 Argument 3 Real array with two elements First element is the initial state of the Use initial condition check box Second element is the initial value of the initial condition edit box This argument is ignored if initial
510. ript It may take some time to read in and parse the called script This time would be wasted if the script is not actually called Avoid using Execute if a script is called within a loop The script would be read in and parsed each time around the loop which is very inefficient Parameters allowextbi echo Command is copied to the command history drop down box in the commend shell literal Indicates the text in command should be read literally This switch should be used if the complete command along with any arguments are stored in a variable to be accessed by Execute through braced substituion See the example for further explanation startup Used by initialisation scripts to indicate that a command is being executed on startup The function CommandStatus page 72 can be used to test this state This switch must not be used in user scripts command Command to be executed with arguments if required See literal above for more information Example Use of the literal flag If you have a script where a command to execute is contained within a variable for example Let command inst npn Then the literal flag should be used to enable the following braced substitution to work Execute literal command Here is another example of using the literal flag Both of the following will do the same thing Execute literal inst npn Execute inst npn 475 SIMetrix SIMPLIS Script Reference Manual But this will throw an error
511. ript Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes initial values 2 real array No sample vector Returns Return type string array Fourier Window Returns the input vector multiplied by one of a selection of 4 window functions This is intended to be used with a Fourier transform algorithm Arguments Number Type Compulsory Default Description 1 real Yes input vector 2 string No hanning window type Argument 1 Input vector Argument 2 Window type One of hanning hamming blackman rectangular Returns Return type FullPath Returns the full path name of the specified relative path and reference directory 145 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes relative path name 2 string No Current working directory reference directory Returns Return type real Example FullPath amplifier sch c simulation circuits c simulation circuits amplifier sch FullPath amplifier sch c simulation circuits c simulation amplifier sch See Also RelativePath on page 328 SplitPath on page 361 gamma Calculate gamma x Arguments Number Type Compulsory Default Description 1 real array yes x Returns Return type real array gamma x Example Gauss Returns a random number with a Gaussian distribution
512. ription 1 string array No Use all installed symbols Internal symbol names 2 string array No As defined by symbol Display name and tree paths 3 string No Option Argument 1 An array of internal symbol names For the left hand graphic display to function correctly each symbol specified must be currently installed Argument 2 An array of strings that describes how the symbol will be identified in the right hand pane Expected to be a semi colon delimited string with each token representing the node name in the tree list structure In practice however it is more usual to leave this argument empty so that the path information can be obtained from the symbol definition itself Argument 3 Set to outIndex to change return value to an index into argument 1 instead of the actual symbol name SIMetrix SIMPLIS Script Reference Manual Returns Return type string The function returns the internal name of the selected symbol If the user cancels the function returns an empty value Notes This function is used for the Place From Symbol Library menu arguments are supplied and the whole symbol library is displayed SelGraph Returns id of selected graph Returns 0 if no graph is open Arguments No arguments Returns Return type real Returns id of selected graph Returns 0 if no graph is open SelSchem Returns 1 if at least one schematic is open otherwise 0 Arguments No arguments Returns Return ty
513. rix SIMPLIS Script Reference Manual Command Name Description DelProp DelSym DestroyRunningDialog Detach Discard Display DrawArc DrawArrow DrawPin Echo EditColour EditCopy EditCut EditFile EditFont EditGroupTitle EditPaste EditPin EndAllInteractions EndSym Execute ExecuteMenu FileViewCleanUpFile Watchers FloodFillSymbol Focus FocusCommandShell FocusShell GraphZoomMode GroupSelected Help Delete schematic instance property Delete symbol definition Destroys a process running dialog Detach selected wires Disables rubberbanding Free up memory used by vectors Display variables in current group Initiate arc drawing mode in symbol editor Draws an arrow in the schematic editor Initiate pin placement mode in symbol editor Display text in message window or write text to file Edit a colour Copy selected schematic items to clipboard for pasting to other schematics or other applications Deletes selected components and places them in the clipboard Opens a text file in the text editor Edit a font Edit a group s title Paste clipboard data to schematic Interactive Edit a pin name of a symbol in the currently in stalled symbol library Symbol definition terminate definition Execute script Executes the menu with given identifier Removes unnecessary file watchers Flood fills a symbol Focus on a window Selects the Command Shell and assigns it key board focus
514. rix SIMPLIS Script Reference Manual Function Name Description ReadF110ptions ReadFile ReadIniKey ReadRegSetting ReadSchemProp ReadText Editor Prop real Ref RefName RelativePath RemapDevice RemoveConfigCollection RemoveModelFile RemoveSymbolFiles ResolveGraphTemplate ResolveTemplate Restart TranDialog Rms RMS1 rnd RootSumOfSquares rt SaveSpecialDialog Scan ScriptName Search SearchModels Read OPTIONS line in the F11 window Reads text file and returns contents as an array of strings Reads a key in an INI file Reads a string setting from the windows registry Returns value of schematic window property value Reads a text editor property Returns real part of argument Returns reference of argument Returns the name of the arguments reference vec tor Returns a relative path name given a full path and a reference path Map SIMetrix simulator device to model name and level number Removes one or more entries from a configuration file collection Uninstalls a model path Removes a symbol file or set of symbol files from the symbol library Evaluate template string used by graph object Evaluate template string UI function opens restart transient dialog Returns accumulative RMS value of argument Returns RMS of argument over specified range Returns random number Returns root sum of squares of argument over specified range Evaluate template string Opens t
515. rixFile page 209 or GetUserFile page 227 instead Arguments No arguments Returns Return type Get FileVersionStamp Returns file version stamp Arguments Number Type Compulsory Default Description 1 string Yes File path 2 string No Options Argument 1 File path Argument 2 If set to usestringinfo the FileVersion string will be read instead of the integer values Set this if you need the behaviour of this function to be the same as SIMetrix version 7 2 or earlier Returns Return type string Version stamp typically in form major minor service build Get FileViewerSelected Files Returns the full path names of files selected in all of the File Views Arguments No arguments 175 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array List of path names each array item is a separate path name GetFirstSelectedElementOfType Returns handle of first selected schematic element of the requested type or types If mulitple types are given a search will be conducted on each type in turn until a selected element of one of the requesting types is found Only one handle is returned and this is the first element that the search comes across that is selected and is of the type requested Arguments Number Type Compulsory Default Description 1 string array Yes Element type or types Argument 1 Either a single element type or an array of different types If several typ
516. rm mathematical operations like square root There are functions for string processing functions which return information about some element of the program such as a schematic or graph and there are user interface functions Complete documentation on all available functions is given in Function Reference on page 57 Braced Substitutions A braced substitution is an expression enclosed in curly braces and When the script interpreter encounters a braced substitution it evaluates the expression and substitutes the expression and the braces with the result of the evaluation as if it had been typed in by the user Braced substitutions are important because with the exception of Let page 482 Show page 539 Plot page 506 and Curve page 456 commands cannot accept expressions as arguments For example the Echo page 471 command displays in the message window the text following the Echo If the command Echo x 2 was executed the message x 2 would be displayed not the result of evaluating x 2 If instead the command was Echo x 2 the result of evaluating x 2 would be displayed If the expression inside the braces evaluates to a vector each element of the vector will be substi tuted Note that the line length for commands is limited although the limit is large in excess of 2000 characters so substituting vectors should be avoided unless it is known that the vector does not have many elements Braced substitutions may not
517. rmat name model_name saturation_flux_density Argument 2 Array of core part specifications Each element is a string which has the format name Ae Le Ue material_name Argument 3 Array of turns ratios Argument 4 Real array with up to 9 elements that defines the initial values for the controls in the dialog box as defined in the following table Index Description 0 Primary number of turns 1 Selected material index into arg 1 2 Selected part index into arg 2 1 for manual entry 3 Number of primaries 4 Number of secondaries SIMetrix SIMPLIS Script Reference Manual Index Description 5 Effective area 6 Effective length 7 Ue 8 Coupling factor Returns Return type real array The return value is a real array containing the user s selection The definition of the values is identical to that for argument 4 as described above DefineShift RegDialog Open a dialog box to define a shift register Arguments Number Type Compulsory Default Description 1 real array Yes initial settings Argument 1 The argument is a real array of length 2 and defines the initial settings of the box controls as follows Index Description 0 Number of inputs 1 Clock to out delay Returns Return type real array The function returns a real array of length 3 with the same format as the argument described above If the user selects Cancel the function returns an empty vector DefineS
518. rns Return type string array Return value will be an array of length 3 The first element will currently be one of the values Schematic Unknown or CantOpen The second element reports the file format version The third element will be one of Value Description Schematic File is SIMetrix component or schematic file and contains just a schematic 4 1 or later Symbol File is a SIMetrix component file and contains only the symbol part of the component Symbol Schematic File is a SIMetrix component file and contains both the symbol part and the schematic part of the component SIMPLISRunStatus Tests if a SIMPLIS simulation is running Arguments No arguments Returns Return type string Returns InProgress if a SIMPLIS simulation is running otherwise returns None SIMPLISSearchIdx Searches the input string array at argument 1 for the test string passed as argument 2 Returns a real array of indices into input array where the test string matches If no matches are found the function returns 1 The syntax for this function is similar to the Search page 336 function except the test string must be a single string not an array and the function returns all indices where the test string matches The Search page 336 function returns only the first index where the test string matches The case sensitivity of the search is defined by the 3rd argument By default the search i
519. rns 0 XFromY Returns an array of values specifying the horizontal location s where the specified vector argu ment 1 crosses the given y value argument 2 If the vector never crosses the given value an empty result is returned The sampled input vector is interpolated to produce the final result Interpolation order is specified by argument 3 Argument 4 specifies edge direction If set to 0 either direction will be accepted If set to 1 only positive edges will be detected and if set to 1 only negative edges will be detected Note that unlike other functions that use interpolation XFromY can only use an interpolation order of 1 or 2 If a value larger than 2 is specified 2 will be assumed SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Input vector 2 real Yes Y value 3 real No 2 Interpolation order 1 or 2 4 real No 0 Direction Returns Return type real array XML CountElements Returns the number of elements of a particular type at the current focus element Arguments Number Type Compulsory Default Description 1 string Yes Tag name 2 string Yes XML reference Returns Return type String The number of elements with the given tag name at the current focus level XMLGetAttribute Returns the attribute value for given name at the current focus element Arguments Number Type Compulsory Default Description 1 string
520. rom the GUI Some SIMetrix models do make use of the pre processor For example the multi level capacitor and inductor models employ the pre processor Placing vars followed by any parameters at the end of a SIMetrix subcircuit call will result in the subcircuit model being pre processed Documentation for the pre processor language syntax may be found in SIMPLIS Reference Man ual Running SIMPLIS Netlist Preprocessor PrintGraph PrintGraph caption caption margin 1 t r b major onJoff minor on off mono dim left dim top dim right dim bottom Prints the current graph sheet dim bottom Parameters caption Caption printed at the bottom of the page interactive major Specify whether major grid lines should be printed options are on or off Default is on margin Page margins in mm stated in the form left top right bottom minor Specify whether minor grid lines should be printed options are on or off Default is on mono If specified the graph will be printed in black and white nointeractive dim left dim Dimensions and position of printed image on page Values are relative top dim right to page size less the specified margins in units equal to 1 1000 of the page width height The default is 0 0 1000 1000 which would place the image to fill the entire area within the margins 0 500 1000 1000 would place the image at the bottom half of the page 0 0 2000 1
521. ror An error occurred while fetching a file PutError An error occurred while storing a file FileNotExist File doesn t exist PermissionDenied You do not have sufficient privilege to perform the operation Unknown Error This is an internal error that should not occur The second element of the returned string gives a descriptive message providing more information about the cause of failure COS Returns the cosine of its argument Result is in radians Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the consine of its argument Result is in radians cos_ deg Returns the cosine of the argument Result is in degrees SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the cosine of the argument Result is in degrees cosh Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Return the hyperbolic cosine of the argument specified in radians CreateDiodeDialog Opens a specialised dialog used by the diode model in circuit parameter extractor See internal script make_srdiode_model for an application example of this function Arguments Number Type Compulsory Default Description 1 string array
522. rrent script was called by a GUI action otherwise 0 See Also ProcessingAccelerator page 301 ProcessingDragAndDrop page 301 CommandStatus page 72 Progress Opens a dialog box showing a progress bar 302 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Position of progress bar in 2 string array No empty options control Argument 1 Value from 0 to 100 specifying the position of the bar Argument 2 String array of max length 2 used to specify options and control as follows open Box is displayed cannot be used with close close Box is hidden cannot be used with open showabort If specified an abort button will be displayed Returns Return type real The function returns a two element array The first element returns the value of argument 1 while the second returns 1 if the abort button has been pressed If the abort button has not been pressed the second element returns 0 PropFlags Returns the attribute flags for instances identified by arguments 2 and 3 See Attribute Flags in the command Prop page 510 for details This function has been superseded by PropFlags2 page 304 and it is not recommended for new scripts PropFlags2 has rearranged arguments allowing the schematic handle to be specified without requiring the property value to provided It also has more convenient behaviour in the situation
523. rs file Specifies the filename to output to size Sepcifies the size of the image to capture Values are width and height sleep Optional argument for controlling the sleep time in milliseconds A sleep time is required to ensure the graph has completed rendering before an image capture occurs The internal system will use intervals of 50 milliseconds to measure the Sleep If the value given is below 50 no sleep will occur Default value is 1000 Cd Cd pathname Cd is almost identical to the DOS cd or chdir commands It changes the current directory to that specified Unlike the DOS command however it will also change the current drive if it is included in the directory name If no directory name is specified the current directory will be displayed ChangeArcAttributes ChangeArcAttributes theta v over h Modifies the attributes of the selected arc or arcs in the currently open symbol editor sheet 445 SIMetrix SIMPLIS Script Reference Manual Parameters theta Arc swept angle in degrees Default 90 v over h vertical radius horizontal radius Default 1 i e a circular arc ChangeSelectedStyleNames ChangeSelectedStyleNames noupdate normal name selected name Changes the styles of the selected elements Parameters normal The name of the new normal style to use noupdate Do not make a visual update selected The name of the new selected style to use ChangeStyle ChangeStyle style name C
524. rst selected schematic element of the requested type Return names of all font objects Return specification for named font Returns space available on specified disk volume Return Ds for specified graph objects Return property names for specified graph object Return value for a graph object property Return value for a graph object property Return graph ids for graph tabbed sheets Return current graph title Returns information about a group Returns the name of the stepped parameter of a multi step run Returns the stepped values in a multistep run Returns ID of highlighted widget Get hostid that can be used for licensing Returns parameter values for a simulator device Returns pin locations of specified instance Returns instances at specified point Finds the simulator s internal device name for a model Returns details of all key definitions created using DefKey page 460 SIMetrix SIMPLIS Script Reference Manual Function Name Description Get LaplaceError Message GetLastCommand GetLastError GetLegendProperties GetLibrary Models GetLicenselnfo GetLicenseStats GetLine GetListSelected GetList Unselected GetLongPathName GetMaxCores GetMenultems GetModelFiles GetModelLibraryErrors GetModelName GetModelParameterNames GetModelParameters Get ModelParameter Values GetModel Type GetModifiedStatus GetNamedSymbolPins GetNamedSymbolPropNames Convert ParseLaplac
525. rted items in list are arranged in alphabetical order Oth erwise they are in same order as supplied 4 Index of item to select at start Only effective if single selected for index 2 This is an integer but must be entered as a string e g 2 Initial string in edit box Default return value if none selected Returns Return type real array The return value is the index or indexes of the items in the list box selected by the user or empty if the user cancels Example SelectDialog Caption Message single 1 Fred John Bill Will place strings Fred John and Bill in the list box with John selected initially The strings will be in the order given not sorted SelectedProperties Returns information about selected properties Arguments Number Type Compulsory Default Description 1 string No Handle Property name 342 SIMetrix SIMPLIS Script Reference Manual Argument 1 Property whose value will be used to identify the instance that possesses the selected property Returns Return type string array Returns an array of length equal to 3 times the number of properties selected Currently however it is only possible to select one property at a time so the return value will be either of length zero or length 3 The elements in each group of three are as defined in the table Index Description 0 Value of instance property identified in argu
526. rve_id is returned by the functions SIMetrix SIMPLIS Script Reference Manual GetSelectedCurves page 207 GetAxisCurves page 153 and GetAllCurves page 150 Optionally a curve name may be specified This must be the whole text of the curve legend It is the value returned by the function GetCurves page 163 Delete Delete Deletes the currently selected components and or wires in the selected schematic sheet DeleteAxis DeleteAxis axis id Deletes the specified axis Parameters axis id Axis id as returned by functions GetAllYAxes page 151 GetSelect edYAxis page 208 or GetCurveAxis page 162 Notes An axis may only be deleted if it is empty i e has no attached curves Also the main axis may not be deleted DeleteGraphAnno DeleteGraphAnno object id Deletes a graph annotation object such as a curve marker or legend box See Graph Objects on page 569 for details on graph annotation objects Parameters object id Id of object to be deleted DeleteSymbolProperty DeleteSymbolProperty property name Deletes the specified property from a symbol editor symbol Parameters 466 SIMetrix SIMPLIS Script Reference Manual property name Name of property to be deleted The command will yield an error if this is omitted If a property of that name is not found no action will be taken DelGroup DelGroup cleanUp noDelete all Group Name Group Name Deletes specified groups See Grou
527. s type The text editor type to save SchematicEnableFile Watcher SchematicEnableFileWatcher filename Enabled the file watcher on the current schematic Argument the name of the file that should be watched SchematicFileWatcherIgnoreChanges SchematicFileWatcherIgnoreChanges filename Disables the file watcher on a schematic editor Argument is the filename of the schematic to disable the file watcher for SchematicFileWatcherWatchChanges SchematicFileWatcherWatchChanges filename Enables the file watcher on a schematic editor Argument is the filename of the schematic to disable the file watcher for ScreenShot Window ScreenShot Window Captures a screen shot of the current window saves the image to the clipboard Resulting image will not include the window frame 527 SIMetrix SIMPLIS Script Reference Manual ScriptAbort ScriptA bort Aborts execution of script Note that this command can only be usefully executed from a key or menu item which has been defined with the direct execution option specified option flag 5 or immediate switch for DefMenu page 462 See User Defined Key and Menu Definitions on page 556 See Also ScriptStep on page 528 ScriptResume on page 528 ScriptPause on page 528 ScriptPause ScriptPause Pauses a script Execution can later be resumed with ScriptResume page 528 or single stepped with ScriptStep Note that this command is often executed from
528. s SelectDialog page 341 Select item s from a list TableDialog page 373 Present items in a table TableEditor page 374 Present lists of items in a table TreeListDialog page 381 Select item from tree structured list UpDownDialog page 390 Re order items UserParametersDialog page 391 Read Edit a list of parameter names and values ValueDialog page 392 Up to 10 edit boxes for entering values The above are the general purpose user interface functions In particular the function NewVal ueDialog page 279 is very universal in nature and has a wide range of applications There are many more specialised functions These are listed in Functions by Application on page 50 User Control of Execution Sometimes it is desirable to have a script free run with actions controlled by a key or menu item For example you may require the user to select an arbitrary number of nodes on a schematic and then press a key to continue operation of the script to perform say some calculations with those nodes You can use the DefKey page 460 and DefMenu page 462 commands to do this However for a key or menu to function while a script is executing you must specify immediate mode when defining it Only a few commands may be used in immediate mode definitions To SIMetrix SIMPLIS Script Reference Manual control script execution the Let page 482 command may be used The procedure is to have the key or menu assign a global variable
529. s aerea bop pe oe ON eee a eae ee ae DE G 352 Shell cg cee Ss aged Acie wae wee EMA RE Bo ee eaewe Gia ee wele ed 353 SbelExec te E eee AS AS A nega aes 354 SIETL X cn Heat ek eh era ae ee TA A A AS GD Golo Se ae dd ee E 355 Simetrixbilelnion scr ae com eae ee A Eee eer eek 355 SIMPLISRUNStabUs x sg tea e es as de GG py ees de de a a 356 SIMPLES Search dsc ba a See te Leah a IE ah ak kD too 356 Simulation Has Errors sco ve ve yo tenes Wade e Ae hordes eter i Ge et a Na DS a iia 357 SIN ace oe gt ohh Bog A EE ee et Sa AA ha a ee ae aa 358 SIM dE Ga ab yo a Moers ge de Sal Ge OM ads degrade bed a eee et ee gels 358 SIDA Og tesa weed A e 2 ane eee oe Bore ad 358 Bleeping ia A el agit gata AE Ree E eat AA ITA onions 359 Sori oe ae a a Bee oe ES ayy eee Meters eh deena ew 6b 4 Aida Wee aa aTa 359 SOLAR a dada dag o BADD be taa Sd 360 SourceDialog ra ui aid eee a a ae G Gey ee at on Baya Ge ee 360 DPHERACHY a a A ak Ak a 361 PIECES AR do AA Ae Gaels DeAnda Stir des Be Uo Bn eth MS LS i Th TA ee 361 SprintiNumber le ar ee Eat eee Se Se A AA ee ee 361 SUG sta a a de dud ede te hoe aie cay Be By E A ae ee AS Ew DS eked a lea 362 Dt oe EGOS Haida se pane edd bE LA hw e Ro erate 4 362 StringLengths gt 2 4 4 4 bow e E E E la tac gr ree A A ea 363 StringStartsWithis 4 2 ed elas dad gaa ow ee AAR a Doe eee G 363 SISE ad ey ae a Gage G DOS od at ph eed 4 363 Style A do te Se ete adr seta Peas at eS a 364 StyleLinelypes s Ss Sal ak EN A ARA A
530. s Argument 1 List to search Argument 2 Items to search in list Argument 3 Legacy option Set to path if the items being searched are file system paths This is to enable case sensitive searching on systems that use case sensitive file names Returns Return type real array Array of indexes into argument 1 for the items found in argument 2 If a string in argument 2 is not found the return value for that element will be 1 SearchModels This is a special purpose function designed for use with the model installation system It returns an array of strings holding pathnames with wildcards of directories containing files with SPICE compatible models The argument specifies a directory tree to search The function will recurse through all sub directories of the supplied path Note that if the root directory of a large disk is specified this function can take a considerable time to return It can however be aborted by pressing the escape key Arguments Number Type Compulsory Default Description 1 string Yes Path to search Returns Return type string array List of library specs containing model files 337 SIMetrix SIMPLIS Script Reference Manual Seconds Returns the number of seconds elapsed since January 1 1970 Returned value is an integer Arguments No arguments Returns Return type real Select2Dialog Opens a dialog box with two list boxes allowing the user to select two values
531. s Not supported in clip board mode jpeg JPEG format png PNG format bmp Windows bitmap format In clipboard mode jpeg png and bmp do the same thing that is write an uncompressed bitmapped image of the graph If format is omitted wmf will be used If specified markers are displayed on each curve as a means of iden tification This is enabled automatically if mono is specified Copy graph in monochromatic form Viewport dimensions in pixels This is used to specify the size of the image if a bitmapped format png jpeg bmp is specified x is the width y is the height SIMetrix SIMPLIS Script Reference Manual Notes This command makes it possible to export graphs into other windows applications such as word processors The clipboard is a central store within operating system which is accessible by all applications Refer to system documentation for more information CopyClipSchem CopyClipSchem Parameters file If specified the schematic is written output in the format specified by the format switch If not specified the schematic picture is written to the clipboard format Picture format used Choices are wmf Enhanced metafile format Windows only svg Scalable Vector Graphics format A scalable format compatible across platforms Not supported in clip board mode jpeg JPEG format png PNG format bmp Windows bitmap format In clipboard mode jpeg png and bmp do the same thing that is write an unc
532. s ModelExtension lb lib mod cir spi fam mdl sp sp2 model pkg prm sub sio ckt Catalog Catalog files CatalogExtension cat Graph Graph binary files GraphExtension sxgph Component Schematic hierarchical com ComponentExtension sxcmp ponent Snapshot Snapshot files SnapshotExtension sxsnp Netlist Netlist files Netlist Extension net cir deck Verilog A Verilog A files VerilogAExtension va vams Verilog HDL Verilog HDL files VerilogHDLExtension v Schematic ASCII SChematic ASCII files AsciiFileEditorExtension sxsch sxslb sxcmp You can combine multiple file types delimited by amp For example Netlist amp Model will return the extensions for both netlist and model file types Get FileInfo Returns information about a specified file Arguments Number Type Compulsory Default Description 1 string Yes Returns Return type string array Returns an array of length 5 Index Description 0 Drive type one of local cdrom remote other notexist unknown See notes for function GetDriveType page 169 File size in bytes Full path name Ae WN E True if path is a directory otherwise false Last modified time Value is the number of seconds elapsed since January 1 1970 174 SIMetrix SIMPLIS Script Reference Manual Get FileSave This function is now obsolete Use GetSimet
533. s an item to be initially selected using the same format as the entries in argument 1 Initial expand level 0 for no expansion 1 expands first level of tree etc Items will be alphabetically sorted unless this is set to nosort ah NN eH oO Items may selected and the box closed by double clicking unless this item is set to true Returns Return type real Returns index into argument 1 of selected item If no item is selected the function returns 1 If the user selects Cancel the function returns an empty vector Example The following will disply the dialog box shown in the above picture Show TreeListDialog AC Measurements 3db low pass AC Measurements band pass Transient Measurements Rise time Transient Measurements Fall time True Returns TRUE 1 if the vector specified by name in argument 1 exists AND is nonzero If argument 2 is set to SearchCurrent the current group as well as the local and global groups will be searched for the vector otherwise only the local and global groups will be searched See Groups on page 18 for an explanation of groups Arguments Number Type Compulsory Default Description 1 string Yes Vector name 2 string No empty Option Returns Return type real 382 SIMetrix SIMPLIS Script Reference Manual Truncate Returns a portion of the input vector with defined start and end points Interpolation will be used to create the first
534. s are to be redirected out Specifies that messages other than errors and warnings are to be redirected filename Name of file to which messages are sent If not specified messages are sent to the message window the specified redirect mode is cancelled and messages of that type will be sent to the command shell See Also RedirectMessages page 515 redirects everything to a file 514 SIMetrix SIMPLIS Script Reference Manual Redirect Messages RedirectMessages on filename dup filename off flush Redirects all command shell messages to a file Everything that would normally be displayed in the command shell such as error messages will be sent to the specified file An option is available to copy command shell output to a file that is the command shell messages continue to be displayed but are also written to a file Note that some messages are sent in HTML format to show bold text and other formatting These will be shown in the file in their native form including the HTML tags Parameters on Switch on redirect All messages will go to filename and no output will appear in the message window append As on but appends text to file if it already exists dup Switch on redirect All messages will go to filename and to the mes sage window off Switch off redirect Restore message output to command shell and close redirect file flush Flush file When redirect is switched on messages are buffered before being written to the target f
535. s case insensitive If the 3rd argument is casesensitive the search will only return matches using the exact case If the third argument is omitted or any string but casesensitive the matches are returned for case insensitive matches against the test string The 3rd argument itself is not case sensitive 356 SIMetrix SIMPLIS Script Reference Manual This function is useful for searching netlists or other tabular data for indexes where certain strings such as control statements are located Typically the netlist is parsed into columns using the SelectColumns page 340 function This selects the column where the test data is located After the finding the indices where the data of interest is located the original file can be be edited by looping through the indices found by this function Arguments Number Type Compulsory Default Description 1 String Array Yes List to Search 2 String Yes Test string 3 String No Empty string Option Argument 1 List to Search Argument 2 The string to search the first argument for Argument 3 If casesensitive is passed the search will be case sensitive Returns Return type real array Array of indexes into argument 1 for the test string found in argument 2 If no matches are found the return value will be 1 Example A call to SIMPLISSearchIdx INCLUDE X1 Include C1 INCLUDE will return a vector 0 2 Note the matches are by defa
536. s except for the UNIV family which cannot be redefined Please refer to the Digital Simulation chapter of the Simulator Reference Manual for full details on logic compatibility tables File format The file format consists of the following sections Header In Out resolution table In In resolution table Out Out resolution table Header The names of all the logic families listed in one line The names must not use the underscore _ character In Out resolution table A table with the number of rows and columns equal to the number of logic families listed in the header The columns represent outputs and the rows inputs The entry in the table specifies the compatibility between the output and the input when connected to each other The entry may be one of three values OK Fully compatible WARN Not compatible but would usually function Warn user but allow simulation to continue ERR Not compatible and would never function Abort simula tion In In resolution table A table with the number of rows and columns equal to the number of logic families listed in the header Both column and rows represent inputs The table defines how inputs from different families are treated when they are connected The entry may be one of four values ROW Row take precedence COL Column takes precedence OK Doesn t matter Currently identical to ROW ERR Incompatible inputs cannot be connected Out out resolution table A table with the numbe
537. s good practice to do so to aid readability of the script Empty Values Many functions return empty values also known as empty vectors when they are unable to produce a return value An empty value contains no data An empty value can be tested with the Length function which will return 0 All other functions and operators will yield an error if presented with an empty value Empty values should not be confused with empty strings The latter is explained in the next section Empty Strings An empty string is one that has no characters An empty string can be entered on a command line with the character sequence Ll Empty strings are not the same as empty values An empty value has no data at all and will result in an error if supplied to any function other than the Length function Quotes Single and Double Single quotation marks and double quotation marks both have a special but different meaning in SIMetrix and in the past this has been the source of much confusion Here we explain SIMetrix SIMPLIS Script Reference Manual what each means and when they should be used Single quotes are used to signify a text string in an expression Expressions are used as arguments to the Plot page 506 Curve page 456 Let page 482 and Show page 539 commands they are used in braced substitutions and also as the tests for if for and while statements These are the only places where you will find or need single quotes Do
538. s in lower case Transformer Dialog Special purpose function used for selection of non linear magnetic components Opens 1 of three styles of dialog box depending on the winding configuration The user can either select a standard core configuration or define custom core parameters In the latter case the Core part index will be 1 otherwise an index into the array specified in argument 2 will be returned The same rules apply to the initialisation data supplied in argument 3 379 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Array of core Materials 2 string Yes Array of core parts 3 real Yes Initialisation data Argument 3 Value from Value Description 1 Material index arg 1 element 2 1 2 Core part index arg2 3 Number of primaries 4 Number of secondaries 5 Effective area element 2 1 6 Effective length element 2 1 fs Effective relative permeability element 2 1 8 Number of turns winding 1 9 Number of turns winding 2 10 Coupling coefficient winding 1 2 11 Number of turns winding 3 12 Coupling factor winding 1 3 13 Coupling factor winding 2 3 Returns Return type real array Has a return value from Oo AN ADT FP won er e Material index arg 1 element 2 1 Core part index arg 2 Effective area element 2 1 Effective length element 2 1 Effective relative permeability element
539. s of all key definitions Note that only keys defined using DefKey page 460 are listed Keys assigned as accelerators to menu definitions are not included 186 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string array Returns an array of strings with each element in the array detailing a single key definition Each definition is a semi colon delimited string with three fields Index Description 0 Name of key as entered in DefKey page 460 1 Command executed by key press 2 Flag value This is usually 4 but will be 5 for immediate keys Get LaplaceError Message The function ParseLaplace page 289 returns a status code in the first field of its return value This function converts it to an error message Arguments Number Type Compulsory Default Description 1 real Yes code Returns Return type string Error message GetLastCommand Retrieve last command issued by a menu or toolbar with a specified command group definition This is used for operations such as repeat last place Arguments Number Type Compulsory Default Description 1 string Yes Command group Argument 1 Name of a command group These are arbitrary strings that may be supplied to a DefMenu page 462 or DefButton page 458 command using the comgroup switch 187 SIMetrix SIMPLIS Script Reference Manual Returns Return type string If a menu or button defined
540. s probing on page 3 for an example of using the Probe function Arguments No arguments Returns Return type real 1 if left button clicked 0 if cancelled right button or escape Processing Accelerator Detects if the current script was called by an accelerator key Arguments No arguments Returns Return type real 1 if the current script was called by an accelerator key otherwise 0 See Also ProcessingDragAndDrop page 301 ProcessingGuiAction page 302 CommandStatus page 72 ProcessingDragAndDrop Detects if the current script was called by a drag and drop operation 301 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type real 1 if current script was called as a result of a drag and drop operation otherwise 0 See Also ProcessingAccelerator page 301 ProcessingGuiAction page 302 CommandStatus page 72 ProcessingGuiAction Detects if the current script was called by a GUI action Most scripts are called from a GUI action such as a menu or key press Typing in the name of the scripts at the command line is also classed as a GUI action This function will return 1 for such calls Scripts can also be called remotely using the s switch on the SIMetrix exe command line and also using the SxCommand utility Such calls are classed as non GUI This function will return 0 for such calls Arguments No arguments Returns Return type real 1 if the cu
541. s stdout and stderr If stdout or and stderr are specified the output can be optionally directed to a file Use this argument to specify the file to receive the output Returns Return type real array Returns a real array of length 3 as defined below SIMetrix SIMPLIS Script Reference Manual Index Description 0 Process exit code If the process is still running when this function returns this value will be 0 1 Error code as follows O Process launched successfully Command processor not found command options specified Cannot find file File is not executable Access denied Process launch failed ao F wo N rR Unknown failure 2 PID of process This will be 1 if the process is no longer running ShellExecute Performs an operation on a windows registered file The operation to be performed is determined by how the file is associated by the system For example if the file has the extension PDF the Adobe Acrobat or Adobe Acrobat Reader would be started to open the file Assuming Acrobat is installed and correctly associated Arguments Number Type Compulsory Default Description 1 string Yes File 2 string No none Parameters 3 string No current directory Default directory 4 string No open Verb Argument 1 Name of file to process This can also be the path to a directory in which case an explorer window will be opened Argument 2 Parameters to be passed if the file is an executable
542. s whether a string starts with another string Arguments Number Type Compulsory Default Description 1 string Yes String to test 2 string Yes String to search for Returns Return type real Returns 1 if the string starts with the given string 0 otherwise StrStr Locates the sub string in argument 2 in the input string If found the function will return the character offset of the sub string If not found the function will return 1 363 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Input string 2 string Yes Sub string 3 real No 0 Offset Argument 1 String to search Argument 2 Sub string Argument 3 Offset into search string where search should begin Returns Return type real Number of characters from start of search string where sub string starts 1 if substring is not found StyleInfo Returns the style information for the requested styles If a requested style does not exist the default style information is returned unless the global flag has been set when no data would be returned Arguments Number Type Compulsory Default Description 1 string array Yes Style names 2 string No Options flag Argument 1 A list of style names to return the style information for Each array element is a different style name Argument 2 If set to global only global styles are returned 364 SIMetrix SIMPLIS Script R
543. s with for example Schematic This corresponds to the File Extensions list in the General Options dialog This is not required if the directory flag is set The following values can be used Component Schematic Script VerilogA VerilogHDL Netlist Model text The name of the menu that will be shown command The script command to call if the menu item is executed AddFloodFill AddFloodFill start x start y AddFloodFill is a Symbol Definition Command It is used to flood fill from the specified point in a symbol being created Parameters position Integer Symbol x co ordinate of position to flood fill from position y Integer Symbol y co ordinate of position to flood fille from See Also Schematic Symbol Script Definition on page 564 AddFreeText AddFreeText font font name colour colour name align align text x pos y pos Adds a free text item to the currently selected graph sheet Free Text is a graph annotation object See Graph Objects on page 569 for full details 431 SIMetrix SIMPLIS Script Reference Manual Parameters align Integer that specifies alignment of text Possible values 0 Left bottom E Centre bottom Right bottom Left base line Centre base line Right base line Left top o OD ow A N Centre top 10 Right top 12 Left middle 13 Centre middle 14 Right middle colour Name of colour to be used for text Name of option setting that will
544. s_two 1 1 The definition is now complete To test it type at the command line Show Times2 2 You should see the result Times2 2 4 User Defined Binary Functions Overview From version 5 it is possible to develop script functions written in C or C and compile them into a DLL shared library to be loaded into SIMetrix as a plugin This makes it possible to perform complex processing on data that would run too slowly using the interpreted script language Documentation Documentation and associated header and example files are provided on the install CD See the directory CD Script user function interface Non interactive and Customised Printing Overview The SIMetrix script language provides a number of functions and commands that allow non interactive printing That is printing without user intervention This is useful for say running multiple simulations in the background and automatically printing the results when the simulation is complete The same printing facilities may also be used to customise the layout of printed schematics and graphs The user interface provides a method of printing a single graph and schematic on the same sheet but other arrangements are possible using the underlying printing commands The available printing commands are ClosePrinter on page 447 NewPrinterPage on page 493 582 SIMetrix SIMPLIS Script Reference Manual OpenPrinter on page 500 PrintG
545. same name but because the vector name contains an arithmetic character it is not possible to access the vector s data by the normal method For example suppose a simulation was run on a circuit that contains a net called IN A vector will be created called IN If the command to plot this vector were executed Plot IN an error would result because IN is an incomplete arithmetic expression Instead the following can be used Plot Vec IN The schematic cross probing mechanism will automatically use this syntax when needed Arguments Number Type Compulsory Default Description 1 string Yes Vector name 2 string No Current group Group name Returns Return type depends on arg 1 vector Returns a vector with length specified by the argument The value in each element of the vector equals its index Arguments Number Type Compulsory Default Description 1 real Yes Number of elements in re sult Returns Return type real array See Also UnitVec on page 389 VectorsInGroup Returns the names or optionally the physical type of all vectors in the specified group Argument 2 is a string array that may contain values of PhysType and or RealOnly If PhysType is present the physical type e g voltage current time etc of the vectors will be returned otherwise the function will return their names If RealOnly is present only values of type
546. se digital filtering on supplied vector This function performs the operation Yn Enco Yn 1C1 Yn 2C2 where 241 SIMetrix SIMPLIS Script Reference Manual x is the input vector argument 1 c is the coefficient vector argument 2 y is the result returned value The third argument provides the history of y i e y_1 y_2 etc as required The operation of this function and also the function FIR page 141 is simple but its application can be the subject of several volumes In principle an almost unlimited range of IIR filtering operations may be performed using this function Any text on Digital Signal Processing will provide further details User s should note that using this function applied to raw transient analysis data will not produce meaningful results as the values are unevenly spaced If you apply this function to simulation data you must either specify that the simulator outputs at fixed intervals select the Output at PRINT step option in the Simulator Choose Analysis dialog box or you must interpolate the results using the function Interp page 251 Arguments Number Type Compulsory Default Description 1 real array Yes Vector to be filtered 2 real array Yes Coefficients 3 real array No Zero Initial conditions Returns Return type real array Example The following graph shows the result of applying a simple first order IIR filter to a step 900 800 700 600 500 400 3
547. seAt pause time noData noStatus sweep start continue finish cd directory extraLine extra line netlist datafile Runs a simulation on specified netlist Parameters an append cd check extraLine Tf specified any analysis controls e g TRAN AC etc in the netlist are ignored and the statement in analysis spec is executed instead Append data created to group name which would always be the data group created by the first run in the sequence sweep continue or sweep finish must also be specified for this to function The data is appended by adding new divisions to existing vectors so creating or extending a multi division vector Simulator process current working directory is set to directory If not specified the current working directory is set to the location of netlist Performs a check on the netlist for syntax errrors but does not run the simulation Adds extra line to the end of the netlist Use include to append multiple lines SIMetrix SIMPLIS Script Reference Manual force datafile will be overwritten if it already exists Otherwise an error message will be displayed label Used with sweep to name the division of a linked run list Override default name for list file with list file local Save data using simulator local process Normally data is sent through the front end noData Only data explicitly specified by PRINT or KEEP controls will be output Usuall
548. second argument may be specified to provide time domain information Usually this would be the time vector created by the simulation The vector is analysed to find the start time stop time and number of interpolation points The number of interpolation points is calculated from the number of points in the time vector and is the next highest integral power of 2 Arguments Number Type Compulsory Default Description 1 string array Yes initial values 2 real array No sample vector Returns Return type string array The function returns a string array with the same format as the argument If the user selects Cancel the function returns an empty vector DefineldealTxDialog Opens a dialog box to define an ideal transformer SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real array Yes initial inductance cou pling factors number of windings 2 real array Yes initial primary turns ra tios 3 real array Yes initial secondary turns ra tios 4 string No options Argument 1 Real array of size 6 Function of each element is described below Primary 1 inductance Coupling factor primary to primary Coupling factor secondary to secondary Coupling factor primary to secondary Number of primaries o FW N e O Number of secondaries Argument 2 Real array of primary turns ratios relative to primary 1 The first value is the ratio of primary 1 to itself This is
549. select elements that have the property stated by argument 2 with the value stated by this argument Argument 4 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns the property flags for all applicable properties Each row of the resulting array will be a different element s property flag See Also PropFlagsAll on page 305 PropFlagsWires on page 307 PropFlags Wires Returns the flags for the requested property This will search selected wires only within a schematic There are optional filters for choosing elements with a particular property or property and value combination along with options to select a specific schematic 307 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Property name to retrieve flags for 2 string No Filter property name string No Filter property value 4 real No 1 Schematic ID Argument 1 The name of the property that we are returning the flags for Argument 2 If set will only select elements that have this property in them Argument 3 If set will only select elements that have the property stated by argument 2 with the value stated by this argument Argument 4 Schematic ID as returned
550. semi colons E g 11 0 0 0 0 0 Arial Colour Property value is a colour definition When the user double clicks the item to edit a choose colour dialog box will be opened Colours are defined by a single integer that specifies the colour s RGB value item1llitem2litem3 Up to six items separated by the symbol When the user double clicks a property so defined a dialog showing a number of radio buttons is displayed labelled item1 item2 etc The value of the property will be the item selected Declares the property read only If the user attempts to edit its value a warning message box will be displayed Argument 4 Array of up to 4 values as described in the following table Index Description Default 0 Box caption Edit Properties 1 Properties tabbed sheet tab title Properties 2 Name column title Name 3 Value column title Value Note that fields 2 and 3 should be provided as a pair If 2 is supplied but not 3 2 will be ignored and the default value will be used Argument 5 If set this specifies the style the property should use when being displayed on the schematic Argument 6 A set of styles that can be chosen between if setting an override style for a property These styles are chosen from those styles in the Style Library that have the override style flag checked Returns Return type string array String array containing values for all properties An empt
551. sible values are success nodata and fileopenfail WriteRegSetting Writes a string value to the windows registry Arguments Number Type Compulsory Default Description 1 string Yes Key path 2 string Yes Value name 3 string Yes Value to be written 4 string No HKCU Top level tree Argument 1 Name of key This must be a full path from the top level E g Software SIMetrix Version42 Options Argument 2 Name of value to be read Argument 3 Value to be written to key 407 i a SIMetrix SIMPLIS Script Reference Manual Argument 4 Top level tree This may be either HKEY CURRENT_USER or HKEY LOCAL MACHINE or their respective abbreviations HKCU and HKLM Note that you must have administrator rights to write to the HKEY LOCAL MACHINE tree Returns Return type string Returns one of three string values as defined below Ok Function executed successfully WriteFailed Could not write that value InvalidTreeName Arg 4 invalid WriteSchemProp Writes a schematic window property If argument 3 is set to Create the function will create the property if it doesn t already exist otherwise the function can only change the value of an existing property There are three writeable properties that are built in namely RootPath Reference and UserStatus See the function ReadSchemProp page 325 for details Schematic window properties may be writ
552. sic HTML text formatting including hyper links to external sites Arguments Number Type Compulsory Default Description 1 string array Yes HTML formatted test Argument 1 1 or 2 element string array Element 1 is an HTML formatted text string that will be displayed in a stand alone viewer Element 2 if supplied defines the title in the caption bar of the viewer Returns Return type string Always returns ok WC Returns a random number with a worst case distribution This function is intended to be used for SIMPLIS Monte Carlo analyses and would typically be used in device value expressions This function is only available in the Simulator process and cannot be called from scripts running in the context of the front end The function is only active when used by the netlist pre processor with Monte Carlo analysis enabled When used in other contexts the function returns 1 0 Arguments Number Type Compulsory Default Description 1 real Yes Tolerance Returns Return type real Random number which is either 1 0 tolerance or 1 0 tolerance Example 1k WC 0 1 will return 900 or 1100 chosen at random Returns 1 0 in a non Monte Carlo run 396 SIMetrix SIMPLIS Script Reference Manual See Also Gauss page 146 GaussTrunc page 148 Distribution page 102 also alias UD page 387 Unif page 388 WirePoints Returns location of specified wire Arguments Number Type Compulsory Defau
553. single curves set this to zero X axis location of marker Y axis location of marker This is only used if the curve is non monotonic and has more than one point at z position The marker will be placed at the point on the curve with the y azis value that is nearest to y position Label for marker This may use symbolic values enclosed by See SymbolicValues on page 571 for details Length of marker line in view units See GraphCoordinateSystems on page 580 for an explanation of view units and the view co ordinate space If omitted length defaults to 0 1 Angle of the marker line in the view co ordinate space See Graph CoordinateSystems on page 580 Default is 45 AddDoubleClickAction AddDoubleClickAction Adds a double click action to the selected elements Must provide both a type and a command for the action Parameters command type The argument used when performing the type of action selected The type of double click action Options are OpenSchematic Opens the schematic defined by the command OpenWebPage Opens the webpage defined by the command RunScript Runs the script defined by the command 430 SIMetrix SIMPLIS Script Reference Manual AddFileViewMenultem AddFileViewMenultem file type text command Adds a menu item to a for a FileView context menu Parameters directory Flag to say associate this with directories file type The file format to associate thi
554. single step through it using F2 Resume a Paused Script Press ctrl F2 Startup Script The startup script is executed automatically each time SIMetrix is launched By default it is called startup sxscr but this name can be changed with in the options dialog box File Options General The startup file may reside in the script directory defined by ScriptDir option variable or in a user script directory defined by UserScriptDir option variable The most common use for the startup script is to define custom menus and keys but any commands can be placed there To edit the startup script select the File Options Edit Startup Script menu item Unsupported Functions and Commands A very small number of functions and commands are designated as unsupported These are usually functions or commands we developed for internal use and are not used by the user interface They are unsupported in so much as we will be unable to fix problems that you may encounter with them If you do use an unsupported function or command and it is useful to you please tell technical support by Email preferably If a number of users find the function or command useful we will raise its status to supported SIMetrix SIMPLIS Script Reference Manual Chapter 3 Function Summary The following table lists all functions available Function Name Description abs ACSourceDialog AddConfigCollection AddGraphCrossHair AddModelFiles A
555. single value Note that ComposeDigital can only process purely digital signals These are expected to have one of three values namely 0 1 and 0 5 to represent an invalid or unknown state Arguments Number Type Compulsory Default Description 1 string Yes Bus name 2 real array No See notes Index range 3 string array No Options 4 string No Wire template 5 real No 0 8 0 9 Analog thresholds SIMetrix SIMPLIS Script Reference Manual Argument 1 Signal root name The function expects a range of vectors to be available in a form defined by the wire template argument By default this is in the form busname n where busname is specified in argument 1 while the range of values for n is specified in argument 2 Argument 2 Index range The function processes vectors from busname idz_start to busname idz_end idz_start and idz_end are specified by this argument as a two dimensional array For example if arg 1 is BUS and arg 2 is 0 3 the function will process vectors BUS1 0 BUS1 1 BUS1 2 BUS1 3 as long all 4 vectors exist If one or more vectors do not exist the first contiguous set of vectors will be used within the indexes specified So if BUS1 0 didn t exist the function would use BUS1 1 to BUS1 3 If BUS1 2 didn t exist it would use just BUS1 0 and BUS1 1 Note that the index may not be larger than 31 Argument 3 1 or 2 element string array Values may be any combination of holdInvalid and scale
556. so you must first create the netlist using the Netlist page 489 command Some notes about the Run command 1 The an switch is very useful and allows you to run different analyses on the same circuit without having to modify it an specifies the analysis mode instead and overrides any analysis controls e g TRAN DC etc in the circuit itself 2 If the run fails e g due to non convergence the script will abort without performing any remaining runs This behaviour can however be inhibited with the noerr switch which must be placed immediately after the Run word Run noerr file design net noerr is a general switch that can be applied to any command See Command Switches on page 15 for details If you want to test whether or a run was successful use the GetLastError page 188 function Changing Component Values or Test Conditions It is likely that in an automated run you will want to change component values or stimulus sources between runs There are a number of ways of doing this each with its own advantages and disadvantages Edit Schematic With this method the changes are made to the schematic which is then re netlisted To do this you need to become familiar with the commands Prop page 510 Select page 529 and Unselect page 545 The procedure is first unselect everything then select the component you wish to change and then use the Prop command to change the value The following will change the value of
557. sory Default Description 1 real complex array Yes vector SIMetrix SIMPLIS Script Reference Manual Returns Return type real complex array Returns the arc tangent of its argument Result is in radians atan_ deg Returns the arc tangent of the argument Result is in degrees Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the arc tangent of the argument Result is in degrees avg Calculates the average of the argument with respect to its reference as defined by t 0 t where x is the argument and t is the reference of x See Vector References on page 21 for details The function uses simple trapezoidal integration An error will occur if the argument supplied has no reference Arguments Number Type Compulsory Default Description 1 real array Yes vector Returns Return type real array BoolSelect Opens a dialog box with any number of check boxes The return value is a real vector containing the user s check box settings 1 means checked 0 means not checked The number of check boxes displayed is the smaller of the length of arguments 1 and 2 If neither argument is supplied 6 check boxes will be displayed without labels SIMetrix SIMPLIS Script Reference Manual If the user cancels the operation an empty value is returned This can be checked with the function length page 258 Argu
558. ssed to the template script template value Template value Text EditorCommentLines Text EditorCommentLines Comments highlighted lines in the selected text editor Works for all text based editors and will apply the correct commenting formats for the editor type 541 SIMetrix SIMPLIS Script Reference Manual Text Editor FileWatcherIgnoreChanges Text EditorFileWatcherIlgnoreChanges Disables the file watcher for current text editor The file watcher detects when the file changes and prompts the user to reload it Text EditorFileWatcher WatchChanges TextEditorFileWatcher WatchChanges Enables the file watcher for current text editor The file watcher detects when the file changes and prompts the user to reload it Text EditorFind TextEditorFind Displays the find pop up window for the selected text editor Text EditorFindNext Text EditorFindNext Triggers a find next event on the current text editor If the find dialog is not currently open it will display the find dialog If the dialog is open it will trigger the find next event on that dialog Text EditorGoToLine TextEditorGoToLine line number Moves the cursor to the given line in the selected text editor Parameters line number The line number to move the cursor to TextEditor UncommentLines TextEditorUncommentLines Uncomments highlighted lines in the selected text editor Works for all text based editors Text Win Text Win show hide toggle 542
559. ssumes box 1 is for On resistance and box 2 for Off resistance Action is modified to ensure On resis tance Off resistance Transformer For use to specify ideal transformers Assumes box 1 is Turns ratio box 2 Primary Inductance and box 3 is Coupling Factor Hides up down control for box 3 Min values for boxes 1 and 2 set to le 18 Box 3 range 0 to 0 999999 TransmissionLine For use to specify lossless transmission lines Assumes box 1 is Char acteristic Impedance and box 2 is Delay Sets box 1 minimum value to le 18 and box 2 minimum value to le 21 Any other value supplied for argument 4 will be treated as the default In this case all boxes are allowed to vary over a range of 1e18 to 1e18 The function returns an array representing the user selected value in each box If cancelled it returns an empty vector Returns Return type real array See Also NewValueDialog on page 279 BoolSelect on page 65 EditSelect on page 121 RadioSelect on page 319 Vec Returns the data for the vector specified by the arguments The purpose of this function is to provide a means of obtaining the data for vectors whose names violate vector name rules Such vectors can be generated by the simulator if there are for example 393 SIMetrix SIMPLIS Script Reference Manual net names containing arithmetic characters The simulator will create a vector of the
560. store a toolbar to its default setting E g Unset SchematicFileButtons will restore the schematic file toolbar to just three buttons without the new schematic button To determine the current definition use the GetOption page 201 function with the Set variable name as described in the table above For example Show GetOption SchematicFileButtons will display in the message window the current definition for the SchematicFile tool bar Redefining Button Commands You can change the command executed when a button is pressed using the command DefButton page 458 This is useful if you want to change the symbol placed for one of the component buttons For example if you wanted to change one of the NMOS buttons you could do something like 586 SIMetrix SIMPLIS Script Reference Manual DefButton NMOS4 inst ne my_nmos redefines the four terminal NMOS button to place a symbol with name my_nmos You can redefine any of the pre defined buttons See Pre defined Buttons on page 588 for a complete list Defining New Buttons and Editing Buttons You can define completely new buttons with your own graphic design and add them to an existing toolbar The same method can also be used to redefine the graphics for existing buttons This is done using the command CreateToolButton page 455 These are the steps to take 1 Create a graphical image for the button This should be in a windows bitmap bmp portable network gr
561. string Yes Property name to retrieve values for 2 string No Filter property name 3 string No Filter property value 4 real No Schematic handle Argument 1 The name of the property to return the values for Argument 2 If set will only choose elements that have this property in them Argument 3 If set will only choose elements that have the property stated by argument 2 with the value stated by this argument Argument 4 Handle to a particular schematic If not set uses the currently highlighted schematic Returns Return type string array Returns the property values for all applicable properties Each row of the resulting array will be a different element s property flag 313 SIMetrix SIMPLIS Script Reference Manual See Also Prop ValuesAll on page 312 Prop ValuesWires on page 314 Prop Values Wires Returns the values for the requested property This will search selected wires only within a schematic There are optional filters for choosing elements with a particular property or property and value combination along with options to select a specific schematic Arguments Number Type Compulsory Default Description 1 string Yes Property name to retrieve values for 2 string No Filter property name 3 string No Filter property value 4 real No Schematic handle Argument 1 The name of the property to return the values for Argument 2 If set will only choose elements that have this propert
562. system Search will return 1 if distillerIndex lt 0 then Echo Acrobat Distiller is not installed exit script endif Open Printer using distiller Orientation will be landscape which is the default Number of copies 1 The title will be used by distiller to compose the file name for the PDF file i e Graph1 PDF OpenPrinter title Graphi index distillerIndex 583 SIMetrix SIMPLIS Script Reference Manual Now print the graph Major axis on minor axis off All margins 20mm PrintGraph major on minor off margin 20 20 20 20 caption Test Print Close Printer This will actually start the print ClosePrinter You can of course replace Acrobat Distiller with any printer that is on your system You must use the printer s name as listed in the Printers section of the system control panel You can also find a list of system printers from within SIMetrix by typing at the command line Show GetPrinterInfo The first two values are numbers but the remaining are the currently installed printers on your system If you omit index switch for the OpenPrinter page 500 command the application default printer not the system default printer will be used The application default printer is the same as the system default printer when SIMetrix starts but will change whenever the user selects a different printer using the SIMetrix File Print dialog box Schematic Template Scripts Overview Schema
563. t identifier progress message Increments the progress bar and allows status message to be updated Parameters identifier The identifier of the progress window to update progress message The new progress message to show in the window See Also WM_ProgressWindowClose page 551 WM_ProgressWindowCloseAll page 551 WM_ Progress WindowCreate page 551 WM__RevertToSaved WM_RevertToSaved id widget id Reverts a widget back to its last saved state By default this will be the currently active widget active window highlighted widget Optional id lt widget id gt flag to select a particular widget Parameters id WM_ Undock WM_Undock dock window name window name widget name 552 SIMetrix SIMPLIS Script Reference Manual Undocks the specified content widget from the window it is in Optionally the widget can be docked to another specified window Parameters dock Optional flag provide the name of the window to dock the widget to If not given the widget is docked within a new window window name The name of the window the widget is currently in widget name The name of the widget to undock WriteImportedModels WritelmportedModels include netlist filename Writes all library models required by netlist to filename Parameters include XMLAddAttribute XMLAddAttribute attribute name attribute value reference Adds an attribute to the XML at the current location Parameters attribut
564. t is the array returned will have a length of zero You must test this with the script langauge s length function If set to accept the normal data will be returned The outElementIndex property may be set in this case in which case the value returned will be clicked if the button was clicked to close the box or notclicked If toggleButton is set to true then action must be set to none to be meaningful In this case the button will toggle on or off The return value controlled by outElementIndex will be either on or off Currently there is no method to initialise the toggle state This will be corrected in a later release CancelButton and OkButton These are identical to PushButton except for changes to default values of some properties 4AIJ Cancel Button Al behaves as a button to cancel a dialog and will cause the calling function to return an empty vector 4AIJOk Button Al closes a dialog and accepts the user AZs input List Box A list box containing a list of values The values themselves are defined using itemsArgIndex and itemsElementIndex properties and must be in the form of a single string containing a list of values separated by a pipe symbol The initial value selected is defined by argIndex and inElementIndex This is the actual value not the index into the list The item selected in the list is returned in outElementIndex SIMetrix SIMPLIS Script Reference Manual Com
565. t next idx x If we had an error we must now abort if error then exit script endif Now read the rest of the file Create an array large enough to hold all the values The values are actually stored as strings That way we can vary model names as well as values Let compValues MakeString numComponents numLines 1 Let error 0 Let resIdx 0 for lineIdx 1 to numLines 1 Parse the line into individual values Let vals Parse lines lineidx if Length vals lt gt numComponents then A line found with the wrong number of values This is assumed to be a mistake unless the line is completely empty if Length vals lt gt 0 then Echo Wrong number of values at line lineIdx Let error 1 endif else line is OK so write the values to compValues for idx 0 to numComponents 1 Let compValues resIdx numComponentstidx vals idx next idx Because some lines may be empty we have to use a different index counter for the compValues entries 563 SIMetrix SIMPLIS Script Reference Manual Let resldx resldx 1 endif next idx if error then exit script endif resIdx finishes with the number of non blank data lines Let numRuns resldx xx Now at last we can run the circuit for idx 0 to numRuns 1 for compldx 0 to numComponents 1 Let paramName global amp components compIdx Let paramName compValues idx numComponents compldx next compldx Run file design net next idx
566. t CP4020 Series PCL6 is currently set as the default printer This is the current default for the application and is what will be set when you open a Print dialog box When SIMetrix starts it will be initialised to the system default printer but changes whenever you select a different printer in any of the printer dialogs Get Print Values Returns the names of all quantities specified in PRINT controls in the most recent simulation run Arguments No arguments Returns Return type string array 203 SIMetrix SIMPLIS Script Reference Manual GetReadOnlyStatus Returns the read only status of the specified schematic Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID Argument 1 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type real Returns 1 0 if the schematic is read only Otherwise returns 0 0 GetRegistryClassesRootKeys List sub keys under key in registry HKEY_CLASSES_ ROOT root Arguments Number Type Compulsory Default Description 1 string Yes Argument 1 Parent key path Returns Return type string array Sub keys under specified key Example GetSchematicFileVersion Returns the file version for the requested schematic 204 i a l SIMetrix SIMPLIS Script
567. t all of these values have to be defined If no values are defined then the company author and logo image will attempt to be chosen from option settings Returns Return type string array Title block definition Values are specified one per vector element and have one of the following prefixes including the colon Prefix Description CompanyName Company name to appear Title Title of the schematic Author Author of the schematic Notes Notes about the schematic LayoutStyle Either Horizontal or Vertical Vertical mode will not display an image Logo Full path to an image to use Version Schematic version number Use auto for an automatically assigned version number Date Schematic version date Use auto for an automatically assigned ver sion number CreateShortcut Create a shortcut to a file or directory SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Path of object 2 string Yes Path of link file 3 string Yes Description Argument 1 Path of file or directory which shortcut will point to Argument 2 Path of shortcut itself Argument 3 Description of shortcut Returns Return type string Success or Fail CreateTimer Creates a timer to run a script at regular intervals or at some specified time in the future Arguments Number Type Compulsory D
568. t graph free text object UI function opens dialog to edit graph text box object I function opens dialog to edit graph legend ox object I function opens dialog to edit property values I function to edit potentiometer properties U b U UI function to edit symbol editor pins U UI function opens edit fixed probe dialog U I function to edit symbol editor properties Opens a dialog box designed to edit inductors and capacitors User interface function Returns entries in up to 6 edit controls Opens a specialized dialog used to edit the pa rameters for a SIMPLIS Multi Level MOSFET Driver Opens the Edit Styles dialog Edit a timer Opens the dialog box editing a time domain wave form SIMetrix SIMPLIS Script Reference Manual Function Name Description Edit WaveformStrDialog ElementProps EnterText Dialog EpochTime erf erfc EscapeString EscapeStringEncode ev Execute ExistCommand ExistDir ExistFile ExistFunction ExistSymbol Exist Vec exp fft Field FilterEditMenu FilterFile FindModel FIR Floor floorv FormatNumber Fourier Opens the dialog box editing a time domain wave form Returns selected element s properties UI function to define multi line text Returns absolute time in seconds Calculate erf x Calculate erfc x Process string and replace escaped characters with literals Process string and replace literals with escaped characters
569. t open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array See Also NetWires on page 277 SelectedWires on page 343 WM_ _CankRevertToSaved Returns whether the chosen editor can be reverted to a previous saved state Arguments Number Type Compulsory Default Description 1 string Yes Editor ID Argument 1 The ID of the editor to check Returns Return type boolean Returns true 1 if the editor can be reverted to a saved state false 0 otherwise 398 SIMetrix SIMPLIS Script Reference Manual WM_ GetCentralWidgetGeometry Returns window geometry information for the editor region of the window Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1 Window name as returned from the function WM_GetWindowNames page 403 Returns Return type string Geometry information for the editor region WM__GetContentWidgetNames Returns names of all content widgets editors etc in the given window Arguments Number Type Compulsory Default Description 1 string Yes Window name Argument 1 The window name as given by the function WM_ Get WindowNames page 403 Returns Return type string list Names of the content widgets within the chosen window WM_ GetContent WidgetSessionInfo Returns a single line string for each content widget that can be used to r
570. t recent simulation Sine radians Sine degrees Hyperbolic sine radians Executes a timed delay Performs alphanumeric sort on argument Sorts any vector and returns index order User Interface function Opens source dialog box for specifying of voltage and current source Re turns string with user selected values Splits file system path into its components Splits string into parts according to single token Returns a formatted string Square root Converts argument to string Returns the number of characters in the supplied string Checks whether a string starts with another string Locates a sub string within a string Returns style information Returns list of possible style line types Returns a list of style names Substitutes characters in string Replaces a substring in a string case sensitive Sums the arguments Returns root sum of squares of argument over specified range Returns names of image formats types supported for display in SIMetrix windows such as schemat ics SIMetrix SIMPLIS Script Reference Manual Function Name Description Supported WriteFormats SymbolInfoDialog SymbolLibraryManagerDialog SymbolName SymbolNames SymbolPinOrder SymbolPinPoints SymbolProperty AutoOrder SystemValue SystemValuePath SystemWidgetExistsInSelected Window TableDialog TableEditor TabValueDialog tan tan_deg tanh TemplateGetPropValue TemplateResolve TextEditorHasComments ThdWei
571. t stopldx Search GetAnalysisInfo name tstop Let stopTime Val info stopldx Arguments Number Type Compulsory Default Description 1 string No Options Argument 1 The following table shows the parameter names currently available for each analysis type Analysis Type Parameter Names Transient ANALYSISNAME GROUPNAME TSTART TSTOP TSTEP TMAX UIC DELTA RINSTART RTNSTOP RINSTEP RTNENABLED FAST AC ANALYSISNAME GROUPNAME PARAM MODEL TEMP FREQ MONTE REPEAT DEVICE MODE START STOP STEP NUM STEPS GRAD SINGLE F DC ANALYSISNAME GROUPNAME PARAM MODEL TEMP FREQ MONTE REPEAT DEVICE MODE START STOP STEP NUM STEPS GRAD SINGLE Noise ANALYSISNAME GROUPNAME PARAM MODEL TEMP FREQ MONTE REPEAT DEVICE MODE START STOP STEP NUM STEPS GRAD SINGLE V VN INSRC PTSPERSUM F Transfer Function ANALYSISNAME GROUPNAME PARAM MODEL TEMP FREQ MONTE REPEAT DEVICE MODE START STOP STEP NUMSTEPS GRAD SINGLE V VN I INSRC F IMODE Sensitivity ANALYSISNAME GROUPNAME POSNAME NEGNAME I GRAD START STOP NUMSTEPS Pole zero ANALYSISNAME GROUPNAME NODEINAME NODEGNAME NODEJNAME NODEKNAME VOLCUR POLZER Operating point ANALYSISNAME GROUPNAME Returns Return type string array 152 SIMetrix SIMPLIS Script Reference Manual Get AnalysisLines Returns the analysis lines used in the most recent simulation analysis The analysis lines are the lines
572. tInst Returns value of property given as argument 1 for nearest instance to cursor If the nearest instance to the cursor does not possess the specified property an empty string will be returned Arguments Number Type Compulsory Default Description 1 string Yes Property name Returns Return type string See Also Branch on page 66 NetName on page 276 PinName on page 299 NetName Returns the net name of the nearest wire or instance pin This function is used for voltage cross probing The node vectors produced by the simulator always have the same name as the net so the string returned by this function is the name of the variable holding the voltage at that node Arguments Number Type Compulsory Default Description 1 string No empty Option 276 SIMetrix SIMPLIS Script Reference Manual Argument 1 The argument determines the behaviour of the function for child schematics in a hierarchy If the argument is omitted or empty the full net name is returned including the parents name s E g U2 U6 R3_P If the argument is the string flat the value returned is just the local netname E g R3_P Returns Return type string Returns the net name of the nearest wire or instance pin NetNames Returns array of all net names in selected schematic Arguments Number Type Compulsory Default Description 1 real No 1 Schematic ID Argument 1 Schematic ID as returned b
573. tOptione ste e dd dd 201 GaPat ita A A A IA A A E A a ee 202 Get Platiormeaturess e auaa aune A A he tt amp ee 202 GetPrinteri nfor 2 24 a ta e SOR wie et ee 203 Get ring Values S asias St a le eas da ds tudo de da Ds nda ded teneis E 203 GetReadOnlyStatus rs wi A A AAA AS AAA a 204 GetRegistryClassesRootKeys ee 204 GetSchematicFileVersion 0 a a a 204 GetSchematic Tabs ns rora dose SARE o AAA he be A e e e ro ate 205 GetSchematicVersion soraa ordra AA A a da aar uar draa ia Ta Ue Ue Te Gaat at a aede E marah p e a 205 GetSchem Title js Ses o a aed E A A E O oe aa E 206 GetSelectedAnnotationText 2 0 a 206 GetSelectedCurves a aoao oe a 207 GetSelectedGraphAnno aaa aa ee 207 GetSelectedStyleNames ee 207 GetS lected YARIS 33s rr a BA ERE BO RA a A a a ee 208 GetshortPathName gt s c ce da a ee eA RAE A A oe OE GS 208 SIMetrix SIMPLIS Script Reference Manual Contents GetSimGonfighoc 4 4 6 naue wine a wars Face a AAA le E 209 Cetoimetiz Files a de clo aes enh ee ALG eS Oe SG 209 GetSimplisExitCOdE icon hb OE Oe eee de eee edd ee Re ea 210 GetSimulationErrors ia d i oeer d a A ee 210 Getsimulationinto tias aCe Gala A ce ES hah a Ee ee Bole A 211 GetSimulationSe ds 2a se RRR RA a ee ee bb es 211 GetsimulatorE vents momoo ae a a A BE aM etek BG a 212 GetsimulatorMode ita ee a BG GG ee a ee A a A 213 GetSimulatorOption 2 2 0 0 0 0 ee 214 GetSimulatorOptionInfo 0
574. tain many different types of tabbed object So this value is now ignored and the function returns the paths for all open schematics Returns Return type string array A string array containing the full path names all schematics currently open See Also GetSchematicTabs page 205 SaveAs page 523 SelectSchematic page 530 GetOption Returns the value of the option variable of name given as argument Option variables are created using the command Set page 531 see User s Manual Sundry Topics Using the Set and Unset commands List of Options for details on option variables The GetOption function returns FALSE if the option does not exist and TRUE if it exists but has no value Arguments Number Type Compulsory Default Description 1 string Yes Option name Returns Return type string Index Description 0 201 SIMetrix SIMPLIS Script Reference Manual GetPath Returns full path name of one of the following Argument value Function ScriptDir Script directory StartUpDir Start up directory StartUpFile Start up script BiScriptDir Built in script directory ExeDir Directory containing executable file TempDataDir Temporary simulation data directory DocsDir File system directory for the My Documents folder ShareDir The directory where the directories for symbol and model sub directories are expected to reside Typically Program Files SIMetrix80 support Arguments Number T
575. tanceParamValue page 349 GetModelParameter Values page 196 GetDotParamValue page 169 SetPropertyStyles Sets whether styles are listed as property styles or not Property styles are styles that can be applied to individual properties This is generally meant as an internally used function only 351 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array Yes Styles to set as property styles 2 string array Yes Styles to set as not prop erty styles Argument 1 An array of style names that should from now on be considered as property styles Argument 2 An array of style names that should from now on not be considered as property styles Returns Return type Returns nothing SetReadOnlyStatus Sets the read only status of the specified schematic Arguments Number Type Compulsory Default Description 1 real Yes Read only status 2 real No 1 Schematic ID Argument 1 Read only status If 1 0 will set schematic to read only if 0 0 will set to writeable Argument 2 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string Single string defining the success of the operation is defined below 352 SIMetrix SIMPLIS Script Reference Manual
576. te De eg ee E E E aE 55 4 Function Reference 57 Abe odia Doe bahbdmem bbb bad dw eee NANA 57 ACsourceDialog sima A Ee Oe Ree ee eee eS 57 AddContig Collection Year tits AA A gaa ah ee a 58 AddGraphCrossHair 2 2 ee 58 AddModelPil s oe atea ae edd ooh Gob bho a 2 eee ee h G 59 AddProperty Dialog v 14 sc0ue a ae ea a oe E a Na 59 AddRemoveDialog ee 60 AddRemoveDialogNew 0 E E a a a e ee 61 AddsymbolPiles 2 444 t E a eh Gee oe AAA 61 BTCA gre fei ait materia gene Gy Ga Se le Bek Tae al Bee Ren Bay Ae een We EE Go oe She we nda A 62 OPE ie AI Maa e a Bk A a Bk A A aa oe E or oe bd 63 ALGO TAC Ss at aa RS NN 63 SCL io sae SrtA be Pe Ae e Se Sia ue de AA A es ete ava 63 AssociateModel ata a a e ote BW a dee eA Ged 64 QUAN se een a ow ee ee ee ee a ae eda ey ab es He dost heme wha es oe 64 tan deg ow x rd a A ee ee ay ee ee A 65 AV EMS A SA DE Ae RA ike A Ss hte me A BBs agi as he oe 65 Boolselect wv 2 2 404 4 4 mnie A De ARA e 65 Branch hos Donte de dedy dh ted te sheet Add Boy ee el oD ee ee 66 CanOpenbile lO a et te BO Ee Soe apes Bette bib Pot d oe 67 Change i SS AA A Ey ais Me Ta Ta Th EA ee ceed ad et ed ed 67 Chak oro e AAA a oes Da Ae ae see eevee 68 Choose Dir aia Mee celles ohare ds oe ORES Oe ee ad 68 ChooseDitectory ogi tvs yee ee ltd o oy Re es we A chee a ee ee a 69 CH ana A ks ADS A oh oR coe are ay a ee age Ede EE A A ee A 69 CloseEchoF ile 4 m reee eG We nee sae Ge ea AAA ee Be
577. ten to the schematic file so that they become persistent Specify Save for argument 3 to enable saving to the schematic file Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string Yes Propert value 3 string array No Options Argument 3 Legal values Create Save Note that Save does not imply Create Both need to be specified to create a saveable property i e create save Returns Return type real The function returns an integer that indicates the success of the operation as follows 1 No schematic windows open Success Property does not exist and Create not specified Property is read only e g the Path property won HH O Property successfully created 408 SIMetrix SIMPLIS Script Reference Manual Example To create a new persistent property Let WriteSchemProp myproperty somevalue Create Save X Cursor Returns x location of graph cursor Arguments No arguments Returns Return type real Returns the horizontal position of the graph measurement cursor If there is no graph open or cursors are not enabled the function returns 0 X Datum Returns x location of graph reference cursor Arguments No arguments Returns Return type real Returns the horizontal position of the graph reference cursor If there is no graph open or cursors are not enabled the function retu
578. ters numbers and the underscore character You can use other characters but we don t recommend it You must use curly braces when defining parameters in this manner Expressions enclosed in quotation marks will not evaluate if they access global parameters You can however define another parameter using PARAM which will be accessible in quoted expressions E g PARAM local_R5 R5 local_R5 as defined above will be accessible in any type of expression in the netlist Expressions in curly braces that consist entirely of global parameters or and constants and which have no local PARAM defined parameters may also be used to define simulator control values as well as component values E g TRAN stop_time is permissible as long as stop_time is defined using the Let page 482 command in a script An alternative and somewhat more sophisticated approach is to change the component value to parameter version e g R5 in the script itself You could then call Netlist page 489 to create the netlist with parameterised values after which the components can be restored to their original values That way the schematic is preserved with its original values To do this correctly you would need to save the original values so that they can be restored This can be done using the PropValue page 309 function which returns the value of a property The example shown below uses this technique Mulitple Netlists Conceptually this is prob
579. the filter supplied in arg 2 is EXA A 5 SIMetrix This will match successfully The third and last fields are the same in both the data and the filter and the remaining filter fields are the wild card which means that anything will be accepted in the corresponding data field With the following filter however the data will not be accepted eS X xxx 3 SIMPLIS Here the last field doesn t match In the above simple examples only one filter list has been supplied However it is possible to use more sophisticated filters consisting of multiple lists combined using Boolean operators Boolean Operators are specified with the key words OR AND XOR NOT These can be used to make a Boolean expression using reverse polish notation Here is an example gt nmos SIMetrix nmos_sub SIMetrix OR This will accept any data where the last field is SIMetrix and the second field is either nmos or nmos_sub Note that the keyword OR is applied after the filter lists As well as the wild card the may also be used matches only a single character whereas matches any number of characters For example mos Would match pmos as well as nmos It would also match any other four letter word that ended with the three letters mos Returns Return type string array String array of length up to but not exceeding the len
580. the following form Index Description 0 Value in Result box 1 Number of parameter values 2 The values of the parameters in the order they were passed onwards values New ValueDialog General purpose user input function A call to NewValueDialog opens a dialog box with an arbitrary number of controls of 5 different types Any mix of the different types may be used The following is an example with 8 controls of two different types 279 SIMetrix SIMPLIS Script Reference Manual E Device Parameters xi RIN Y rour fico aj TH 2 mwsrwo 100m al voL fo Avon 5 Y TRIG_COND oTo had IC lo z Cancel Arguments Number Type Compulsory Default Description 1 string Yes Control definitions 2 string Yes Initial values 3 string Yes Options Argument 1 This is a string array of length equal to the total number of controls required Each element of the array defines the control s label type and valid range of values The array elements are of the form label type range Where label is a text string defining the control s label which may not contain the characters or type is one of the following REAL INT or INTEGER STRING BOOL LIST Default if type omitted Displays an edit control with an up down spinner Spinner increments in 1 2 5 steps Displays an edit control with an up down spinner Spinner increments linearly with step size of 1
581. the keywords specified by arg 2 If arg 3 strip the lines will be returned with the keyword removed If arg3 spice the input file will be filtered to remove inline comments and join lines connected using the continuation character Note that with arg3 spice normal comments pass through unmodified as long as they are not embedded between continuation lines This function was developed for internal testing and was used to extract control lines from netlists It may have other uses Arguments Number Type Compulsory Default Description 1 string Yes file name 2 string array Yes keywords 3 string No option Returns Return type string array 140 SIMetrix SIMPLIS Script Reference Manual FindModel Returns the file path and line number of a simulator model given its name and type Arguments Number Type Compulsory Default Description 1 string Yes Model name 2 string Yes Model letter 3 string No SIMetrix Simulator type Argument 1 Model name this is either the name in a MODEL statement or the name in a SUBCKT statement Argument 2 Model letter e g Q for BJTs D for diodes and X for subcircuits Argument 3 Simulator type i e SIMetrix or SIMPLIS Returns Return type String array String array of length 2 holding the file name and line number of the definition of the specified model FIR Performs Finite Impulse Response
582. the lowest value that will be used So if set to 100 for example the lowest resistor reference would be R100 Note that this will not force existing references to be updated to values greater than min suffiz Only values that need changing will be affected nopaint The anno command always forces the schematic window to refresh if any changes to properties were made This action is inhibited if this switch is specified This is usually used if the property being annotated is hidden and therefore will cause no visual change prop If specified annotates properties of name property name Otherwise properties of name ref are annotated AppendGroup AppendGroup group appending group Appends a data group with another group Appending a group joins vectors with the same name and type in both groups to add a new division Refer to Multi division Vectors on page 19 This is used for Multi core multi step SIMPLIS simulations Each SIMPLIS process runs indepen dently creating its own data file When the processes have completed their simulations the data 443 SIMetrix SIMPLIS Script Reference Manual files are loaded to create groups which are then appended using this command The end result is a multi division vector which looks the same as if it were created by a conventional single core run See Also CreateGroup page 452 DelGroup page 467 OpenGroup page 498 Groups page 233 Product SIMetrix and SIMetrix SIMPL
583. the parts browser This is normally called OUT CAT and resides in the SCRIPT directory The MakeCatalog command is one of the components of the Parts Browser system The parts browser requires a catalog file which lists all the models available to the simulator and for each provides the name of a suitable schematic symbol a category pin mapping if relevant a symbol model property e g X for subcircuits Q for BJTs and a preferred pathname if there is more than one model of that name The MakeCatalog command builds this catalog using the data files all catalog and user catalog to obtain information about known parts Parameters force listDups out catalog File name for catalog This must be OUT CAT for use with browser al l catalog Main database of parts This would usually be ALL CAT which resides in the SIMetrix root directory user catalog User database of parts This would usually be called USER CAT which resides in the script directory MakeSymbolScript MakeSymbolScript all append sortprops catalog catalog name filename symbol name 485 SIMetrix SIMPLIS Script Reference Manual Creates a script definition of a symbol or group of symbols For details of script definitions see Schematic Symbol Script Definition on page 564 Parameters all If specified scripts for all symbols in the global library will be created append Result will be appended to specified file catalog If specified scripts for all
584. this value using the function Field page 139 to test bit 0 The value reports the state of the All references to symbol automatically updated check box when the symbol was saved If checked this value will be 1 otherwise 0 GetSymbolOrigin Returns the location of the origin point of the symbol currently open in the symbol editor The origin is the location of the point 0 0 on the symbol It is in turn located at a position relative to the reference point The reference point is an absolute location defined by the symbol s geometry If the symbol has pins it is the top left of a rectangle that encloses all the pins Otherwise it is the top left of a rectangle that encloses all the segments Arguments No arguments Returns Return type real array Two element real array Index 0 is the x coordinate while index 1 is the y coordinate The units are 100 per grid square See Also SetOrigin on page 534 GetSymbolPropertyInfo Returns information about symbol editor symbol properties Arguments Number Type Compulsory Default Description 1 string No Property name 221 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Returns a string array of length 5 providing information on either a single property as defined in the argument or the currently selected properties If more than one property or pin is selected the information provided in elements 0 2 will be either the prop
585. tic template scripts are a method of performing advanced netlist processing The TEM PLATE property can be used to customise the netlist entry for a device and it has a number of features that allow quite complex devices to be created However the template syntax is not as powerful as a full featured programming language and this makes more complex devices very difficult to implement To overcome this the template script feature was developed With this method a script is called during the netlist generation phase for every instance that possesses a TEMPLATESCRIPT prop erty A script can then generate the netlist entry for that instance With this method there is no limit to the complexity of generated devices Defining a Symbol for a Template Script To use the template script feature the schematic symbol must specify the script to be called This is done quite simply by adding a property with the name TEMPLATESCRIPT and giving it a value that defines the path of the script If a full path isn t given and we recommend that you don t use a full path SIMetrix will search the directory where the netlist resides followed by the SCRIPT directory for the specified file If the file is not found no error message will be output and the device netlist line will be created as if no template script was defined To use the template script feature the schematic symbol must specify the script to be called This is done quite simply by adding a property
586. tify which graph is saved If omitted the currently selected graph is used All currently open graphs can be obtained from the function GetGraphObjects page 178 using GetGraphObjects graph while GetGraphTabs page 180 can be used to obtain the graph objects within a single window version Ignored Retained for backward compatibility filename Path of file SaveGroup SaveGroup force version version filename Saves the current group in binary format Data groups can be opened with OpenGroup page 498 Parameters force If is specified any existing file will be overwritten Otherwise the command will fail and display an error message version Ignored Retained for backward compatibility filename Save to the filename Data can later be restored with the command OpenGroup page 498 If filename is not specified a dialog box will be opened allowing the user to choose from available files See Also CreateGroup page 452 DelGroup page 467 SaveGroup page 524 Groups page 233 SaveRhs SaveRhs nodeset filename Creates a file containing every node voltage inductor current and voltage source current calculated at the most recent analysis point The values generated can be read back in as nodesets to initialise the de operating point solution There are a number of applications for this command see notes below 524 SIMetrix SIMPLIS Script Reference Manual Parameters nodeset If specified the values are
587. time step is cut back and further iterations are made Failures on steps that have been cut back are referred to in the above table as cut back steps Quite often the nodes or devices that fail on a cut back step are quite different from the nodes or devices that fail on a first step The root cause of a convergence failure will usually be at the nodes or devices that fail on a first step It is quite difficult to interpret the information provided by this function The where script performs a simple analysis and sometimes displays the nodes or devices most likely to be the cause GetCurDir Returns current working directory Arguments No arguments Returns Return type string SIMetrix SIMPLIS Script Reference Manual Returns current working directory GetCurrentGraph Returns id of the currently selected graph Arguments No arguments Returns Return type string Returns id of the currently selected graph Returns 1 if no graphs are open The id can be used in a number of functions that return information about graphs or graph objects generally See Also GetGraphObjPropValues page 180 GetGraphObjPropValue page 179 GetGraphObjects page 178 GetGraphObjPropNames page 178 GetSelectedGraphAnno page 207 GetCurrentStep Value Returns the current step value in a script based multi step analysis Script based multi step anal yses use a script call to define each step For this analysis type a co
588. tion otherwise 0 1 GUI Action 1 if the current script was called by a GUI action such as a menu operation 0 if called by a remote command Refer to ProcessingGuiAction page 302 for a more detailed explanation 2 Processing accelerator 1 if the current script was called by an accelerator key otherwise 0 3 Running startup command 1 if current script was called by a startup command provide on the SIMetrix exe command line See Also SIMetrix SIMPLIS Script Reference Manual ProcessingAccelerator page 301 ProcessingDragAndDrop page 301 ProcessingGuiAction page 302 CompareSymbols Returns 1 if the definitions of the schematic symbols specified are identical Otherwise returns 0 Two symbol definitions are identical if 1 Their graphics are identical Le all segments arcs and pin locations are the same 2 All pin names are the same 3 All protected properties are identical Unprotected properties are not compared Arguments Number Type Compulsory Default Description 1 string Yes symbol name 1 2 string Yes symbol name 2 Returns Return type real ComposeDigital ComposeDigital builds a new vector from a binary weighted combination of digital vectors It is intended to be used to plot or analyse digital bus signals The simulator outputs bus signals as individual vectors To plot a bus signal as a single value either in numeric or analog form these individual vectors must be combined as one to create a
589. tion about the current schematic Returns the title of the current schematic Returns the text in the selected annotation Returns array of curve id s for selected curves Return ID of selected graph annotation object Returns the names of the styles used by the se lected elements Returns id of selected Y Axis Returns short path name for path specified either as a long or short path Returns the location of the simulator s configura tion information Returns path name of user selected file SIMetrix SIMPLIS Script Reference Manual Function Name Description GetSimplisExitCode GetSimulationErrors GetSimulationInfo GetSimulationSeeds GetSimulatorEvents GetSimulatorMode GetSimulatorOption GetSimulatorOptionInfo GetSimulatorOptions GetSimulatorStats GetSimulatorStatus GetSoaDefinitions GetSoaMaxMinResults GetSoaOverloadResults GetSoaResults GetSymbolArcInfo GetSymbolFiles GetSymbolInfo GetSymbolOrigin GetSymbolPropertyInfo GetSymbolProperty Names GetSymbols GetSystemInfo GetTempFile GetTextEditorText Returns the application exit code for the most recent SIMPLIS run Retrieves the error messages raised by the most recent simulation run Returns information about the most recent sim ulation Returns the seeds used for the most recent run Returns list of events for most recent simulation Returns the simulator mode of the current schematic Returns the value o
590. tion which returns 1 if there are schematics open and 0 if there are not if NOT SelSchem then means if there are no schematics open This is an initial check that the user has actually opened a schematic If there are no schematic open the lines echo There are no schematics open exit all will be executed The first line calls the echo command This echoes to the message window all subsequent text on the same line The second line is an exit statement In this case it causes execution to abort and the rest of the script will be ignored The next line endif terminates the if statement For every if there must be a matching endif or end if Normally of course we hope the user has opened a schematic and the remainder of the script will be executed The next line SIMetrix SIMPLIS Script Reference Manual let refs PropValues ref ref calls the let command This expects an assignment expression which it evaluates In this case it assigns refs with the result of the a call to the function PropValues page 309 In this example it returns the component reference for all instances i e symbols on the schematic that have one The next line for idx 0 to length refs 1 starts a for loop The block of statements between this line and the matching next will be repeated with values of idx incrementing by 1 each time around the loop until idx reaches length refs 1 The length function returns the number of elements in the
591. tions Font menu is selected Parameters font name Name of new font font base Name of font to be used to set initial properties May be any font listed in the menu File Options Font or one of the following Stan dard StandardMedium or StandardLarge CreateGroup CreateGroup title title label Creates a data group All vectors or variables are organised into groups Each simulation run creates a new group and all data for that simulation is placed there For more information see Groups on page 18 Parameters 452 SIMetrix SIMPLIS Script Reference Manual title Optional title This will be displayed in the box displayed when selecting a Change Data Group menu It is also returned by a call to Groups title label Base name of group The actual group name will be appended by a number to make it unique The new group will become the current group To find the name actually used you can call the function Groups on page 233 immediately after calling this command The first element of Groups i e Groups 0 is always the current group See Also DelGroup page 467 OpenGroup page 498 Groups page 233 CreateRunningDialog CreateRunningDialog Creates a dialog for displaying progress whilst a script is running Parameters abortcommand Command to be executed when Abort accepted Typically this would be a command to assign a global variable which the running script would test For exampl
592. tive Parameters stop time The restarted run will continue until it reaches this time RestoreCommandShell RestoreCommandShell Re opens the command shell if closed or brings the command shell to the front if it is not visible Parameters force If set this will force the command shell to appear in the currently selected window RestoreDefaultStyles RestoreDefaultStyles all selected Restores default styles One of the switches must be applied otherwise no changes will be made Parameters all All elements are changed back to their default style settings and any overrides to the default styles are removed selected Causes the selected elements to be changed back to their default styles Any overrides of these styles are not checked for or removed Resume Resume Resumes a previously paused simulation SIMetrix SIMPLIS Script Reference Manual RotInst RotInst orientation Changes orientation of selected items Parameters orientation Run Integer from 0 to 7 to specify how symbol should be oriented O No change 1 Rotate clockwise 90 Rotate clockwise 180 Rotate clockwise 270 Mirror through vertical axis Mirrored 90 Rotation Mirrored 180 Rotation XA DO om A Ww N Mirrored 270 Rotation Run check an analysis spec options options string optforce options string list list file local nolist force label division label append group name pau
593. tly by this command 504 SIMetrix SIMPLIS Script Reference Manual Pan Pan x y Pan scroll schematic specified number of grid squares Parameters x Movement in x direction A positive value moves the schematic to the left y Movement in y direction A positive value moves the schematic up PasteGraphImageToSchematic PasteGraphImageToSchematic Copies a picture of the last selected graph to the last selected schematic When placed on the schematic the image can be stretched to the required size Parameters size Sepcifies the resolution of the image to capture Values are width and height Values too small may cause parts of the graph to disappear Default values are 400 300 Pause Pause Pauses current simulation if any Note that this command can only be executed by assigning it to a key or menu item with the direct execution option specified option flag 5 For more information see User Defined Key and Menu Definitions on page 556 A paused simulation can be restarted with the command Resume page 518 PlaceCursor PlaceCursor main x main y main datum x datum y datum Positions graph cursors if they are enabled Parameters datum Location of reference cursor Position is determined by z datum y datum is only used for non monotonic curves e g nyquist plots where there is more than one y value for a given x value 505 SIMetrix SIMPLIS Script Reference Manual main Location of main measur
594. to 6 check boxes Returns branch current formula of schematic net nearest cursor Returns TRUE if specified file exists and can be opened for read Change current working directory Returns character from string User interface function Returns user selected pathname User interface function Returns user selected pathname Returns a string consisting of a single character specified by an ASCII code Closes the file associated with the Echo com mand See also OpenEchoFile page 282 Closes a file opened using OpenFile Close a schematic handle opened using Open Schematic page 286 Close a schematic using ID Returns vector data in an interleaved manner Obtain information about the current script exe cution context Compare two schematic symbols Builds a new vector from a binary weighted com bination of digital vectors Convert file name to UNIX format using Convert file name to the local format Copy a directory tree Copy a file to or from a location defined by a URL Supports http ftp and local files Cosine radians Cosine degrees Hyperbolic cosine radians Opens a specialised dialog used by the diode model in circuit parameter extractor Create or remove a lock file for specified file SIMetrix SIMPLIS Script Reference Manual Function Name Description CreateNewTitleBlockDialog CreateShortcut CreateTimer cv CyclePeriod Date db DCSourceDialog DefineADCDi
595. to prevent other instances of SIMetrix from opening a file For example when a schematic is opened in non read only mode a lock file is created which will prevent another instance of SIMetrix from opening that file but will not prevent another application from opening the file CanOpenFile will return false for such files when write mode is specified Arguments Number Type Compulsory Default Description 1 string Yes file name 2 string No read options Returns Return type real ChangeDir Change current working directory to that specified by argument Arguments Number Type Compulsory Default Description 1 string Yes New directory SIMetrix SIMPLIS Script Reference Manual Returns Return type real Return value is a code indicating the success of the function Char Code Meaning 0 Success 1 Cannot create directory 2 Invalid disk windows Returns a string consisting of the single character in argl located at index given in arg2 The first character has index 0 An empty string is returned if the index is out of range Arguments Number Type Compulsory Default Description 1 string Yes Input string 2 real Yes Character position Returns Return type string Example Show Char Hello World 4 displays result Char Hello World ChooseDir 4 o Opens a dialog box showing a directory tree Returns path selected by user or an empty string if cancelled Initial d
596. tor 0 000000 0000002 2 499 Op enNetlist is ew eee ae HA EEE eke Oe o A A aS 500 OpenPrinter 4 oc ei eke A eh eee eee A A ee ee 500 OpenRawkiles etarra a OOM See dae eh eed Qe DD da 501 Openschem s s std punta LAL EMMA LEE Oe eae ee ae eee ee ae 502 Openscript 2 4 2 408 F RD eB A AAA AA lb tea 502 OpenSimplisStatusBox aaa 503 OpenVerilo A loo 4k 4 A as e a Gop pe aa Soh gd 503 OpenVerilog HDi 2 23 is at alas a ks ap Gey eS at a Baya Ge as 504 OpenWebPage a aa EP A Bk te Soe te Balt Mss oh oh oh dad hed 504 Options Dialogs om 2929 0 te ned Geel ee Dod ti Ge NN GD A 504 RADO RENE ah fitch ties eet E Ge ee A A a A ds ete eee ee a 505 PasteGraphImageToSchematic 00 0 0000002 eee 505 Pauses Kh SAG a e MAYA ee E ee ee ee ole A 505 Place ursor 2 22 BA hele eg hk O AS E a Fane Bete TA Meas E 505 Plot AAA eee e rca a GBS AB ee oe ee eer ere eg 506 DreProcessNetbliStia a tee Godt Sue oe DD A A a 508 PrintGraphs g ar na Ble see BOSS o eet ft BAS EE 508 PrintSchematic oi Ns ae AP A A Be ABE SESS ES IAS a 509 Probe i i murea A A ee Add See ds eh BE AO AS N G 509 PODS e to ah at a Bs Ao AUG te ee ee A A IDA AR a E REA 510 Protect Vaca ada did d a bod A dp We ee FES ee ey 512 UT dl dle Le oe dd Ads te oh hoe ee ka ot ke Pe Bo 512 FUDD Ge yt eh she E wa a aa eq etsy SPE Bo YA NES ch onan aa ee E 512 ReadLogic omipatibility co ere rede o rc a e BRS Re Cok eae Gg 513 Rebuild Symbols yes a d erde gs aig ges ee Be id goed bal
597. tput file names in the boxes below or use the Select buttons to bring up a File Selection Dialog After clicking Ok the input file will be encrypted and the output file will be created or overwritten if it already exists Input file The input file is plain text with encryption tags Output file The output file is encrypted text Open encrypted model file when complete File description optional The description is added to each encryption start end tag This field is limited to 32 characters Characters left 32 o TwoFileSelectionDialog Configured as the Encryption Dialog The first argument defines the two file names and the description combo box text The second argument configures the displayed text on the dialog including the caption title group box titles and so on The third argument configures how the program remembers the input and output file names description text and checkbox state Each of these strings is a key in the user s configuration file allowing the dialog to be used for many different applications with different memories These remembered values will be displayed in the file and descriptive text combo boxes the next time the dialog is opened The program remembers the last 10 file and description entries SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string array No empty Initial files and descrip tion combo box t
598. tran sep arated by the pipe symbol An empty string will cause all boxes to be checked and none will clear all boxes 7 Plot on completion State of Plot on completion only check false box true Checked false Not checked reserved for future use Not used with this function reserved for future use Not used with this function 10 X axis graduation Setting of Log Lin Auto for X Axis in Axis auto Scales sheet Possible values lin Lin log Log auto Auto 11 X axis scale options Setting of scale options for X Axis in Axis auto Scales sheet Possible values nochange No Change defined Defined 12 Y axis graduation Setting of Log Lin Auto for Y Axis in Axis auto Scales sheet Possible values as for X axis 13 Y axis scale options Setting of scale options for X Axis in Axis auto Scales sheet Possible values as for X axis 14 X axis min limit Min value for X Axis in Axis Scales sheet 0 Must be specified as a string 15 X axis max limit Max value for X Axis in Axis Scales sheet 1 Must be specified as a string 16 Y axis min limit Min value for Y Axis in Axis Scales sheet 0 Must be specified as a string 17 Y axis max limit Max value for Y Axis in Axis Scales sheet 1 Must be specified as a string 18 X axis label Axis Label setting for X Axis group in empty Axis Labels sheet 19 X axis units Axis Units setting for X Axis group in Axis empty Labels sheet 2
599. tring Yes Options Argument 2 May be set to either one of 262 SIMetrix SIMPLIS Script Reference Manual Name Description systemonly Will only match system symbols to the path These are START PATH DOCSPATH X EXEPATH APP DATAPATH TEMP PATH SXAPPDATAP ATH SHAREPATH LIBPATH SX DOCSPATH COM MON_APPDATAPATH projectonly Will only match symbols listed in the Locations sec tion of the configuration file Refer to User s Manual Sundry Topics Symbolic Path Names Definition for details of system path Returns Return type string MakeString Creates an array of strings Length of array is given as argument to function The strings may be initialised by supplying argument 2 Arguments Number Type Compulsory Default Description 1 real Yes Number of elements in result 2 string array No Initial values Argument 1 Number of elements to create in string array Argument 2 Initialises values of string Can be used to extend an existing string e g Let str john fred bill Let str MakeString 6 str In the above the string str will be extended from length 3 to length 6 by the call to MakeString 263 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array Returns new string ManageDataGroupsDialog Specialised function that opens the Manage Data Group dialog box The box displays data group information in tabular form with e
600. ts Circles are classed as arc segments 2 All pins have the same name location and order 3 All protected properties are identical Unprotected properties are not compared If no differences are found the command will output the message The symbol files are identical Parameters SIMetrix SIMPLIS Script Reference Manual detail difflib lib1 lib2 Copy If specified a detailed report is given when two symbols do not match Detail about what doesn t match will be provided This could be mismatched segments properties or pins If specified the second library is expected to be a difference library Symbols not found will not be reported Path of first symbol library file Path of second symbol library file Copy Initiates the schematic copy editing operation This performs exactly the same function as the Duplicate button on the schematic sheet and the equivalent menu Note that the clipboard is bypassed for this operation CopyClipGraph CopyClipGraph Copies a graphical picture of the graph to the clipboard or to a specified file Parameters file format mark mono vp If specified the graph is written output in the format specified by the format switch If not specified the graph picture is written to the clipboard Picture format used Choices are wmf Enhanced metafile format svg Scalable Vector Graphics format A scalable format compatible across platform
601. ts 3 and 4 Each element will hold a flag value for the property specified in argument 1 Note that this function compliments the functions PropValues2 page 310 and SymbolNames page 370 and will return the same number of values and in the same order provided the same instance identifying arguments are given The function will return an empty vector if no instances match arguments 3 and 4 This differs from PropFlags which returns an empty string in this situation The behaviour of PropValues2 is much more convenient and it is recommended that this is used in all new scripts PropFlags2 will also return an empty vector if the specified schematic could not be found PropFlagsAll Returns the flags for the requested property This will search all selected elements within a schematic There are optional filters for choosing elements with a particular property or property and value combination along with options to select a specific schematic Arguments Number Type Compulsory Default Description 1 string Yes Property name to retrieve flags for string No Filter property name string No Filter property value 4 real No 1 Schematic ID 305 SIMetrix SIMPLIS Script Reference Manual Argument 1 The name of the property to return the flags for Argument 2 If set will only select elements that have this property in them Argument 3 If set will only select elements that have the property stated by argument 2 with the value
602. tting that allows them to be located elsewhere See below for details The dialog is now designed If SIMetrix is currently running shut it down and restart it to register the new dialog function Note that you do not need to restart after editing the dialog only when creating it for the first time or when changing the function name SIMetrix registers the filename and function name on startup but will reread it when the function is called This means that you can make changes to your dialog without having to shut down and restart SIMetrix each time You can select a different location for user dialogs with the option setting UserDialogsDir Type this at the command line Set UserDialogsDir path where path is the full path of the new dialogs location You may use logical path symbols in the definition For example ASXAPPDATAPATH userdialogs resolves to a directory under the application data path Note that you must restart SIMetrix after changing the path The Widgets Widgets are the dialog elements such as edit boxes and push buttons that you use to enter data and choices In Windows Widgets are sometimes called Controls A range of special widgets is supplied that have some extra properties to define how they will be initialised when the dialog is opened and what they will return through the SIMetrix script function call mechanism These widgets can be found under the SIMetrix group Always use these for
603. turns the attribute flags for instances identified by arguments 3 and 4 See Attribute flags in the command Prop page 510 for details This function replaces PropFlags Its behaviour is similar but the arguments have been rearranged and its behaviour in the event of no instance match is different Arguments Number Type Compulsory Default Description 1 string Yes Property name for flags 2 real No 1 Schematic ID 3 string No Selected components Property name for id 4 string No Instances with property Property value for id name in arg 2 Argument 1 Property whose flags are to be returned 304 SIMetrix SIMPLIS Script Reference Manual Argument 2 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Argument 3 ALong with agument 4 if present these arguments identify the instances to be examined If only argument 3 is specified then all instances on the current schematic that possess that property will be used If argument 4 is also present then the instance name and value must match argument 3 and 4 respectively If neither are present the selected instances will be used Argument 4 See argument 3 Returns Return type string array The function returns a string array of length equal to the number of instances identified by ar gumen
604. uble quotes are used in commands to bind together words separated by spaces or semi colons so that they are treated as one Normally spaces and semi colons have a special meaning in a command Spaces are used to separate arguments of the command while semi colons terminate the command and start a new one If enclosed within double quotes these special meanings are disabled and the text within the quotes is treated as a single argument to the command Double quotes are often used to enclose strings that contain spaces see example but this doesn t necessarily have to be the case Examples Let PULSE_SPEC Pulse O 5 O 10n 10n 1u 2 5u In the above line we are assigning the variable PULSE_SPEC with a string This is an expression so the string is in single quotes Let is a command but it is one of the four commands that take an expression as its argument Prop value Pulse 0 5 O 10n 10n 1u 2 5u Prop is a command that takes a number of arguments The second argument is the value of a property that is to be modified In the above line the new property value Pulse 0 5 O 10n 10n lu 2 5u has spaces in it so we must enclose it double quotation marks so that the command treats it as a single string If there were no quotes the second argument would be just Pulse and the remainder of the line would be ignored If an argument contains no spaces or semi colons then no quotes are necessary although they will do no harm if present Where you need both s
605. ue contains a list of schematic instance references that identify where the schematic component is used The references are in the form of a series of property values separated by a period The property used defaults to Ref but this argument may be used to identify another property e g Handle Argument 2 Schematic ID as returned by the OpenSchematic page 286 function This allows this function to be used with a schematic that is not open or not currently selected If equal to 1 the currently selected schematic will be used 100 SIMetrix SIMPLIS Script Reference Manual Argument 3 If set to pathtypes will return information on the type of path Possible values are absolute relative and symbolic Returns Return type string array Returns a string array with one element for each schematic file used in the hierarchy Each element is a semi colon delimited list of values The first value is the full path to the schematic in UNC form if applicable UNC paths begin with followed by a server name and path Paths referenced by a local drive letter are not returned in UNC form even if sharing is enabled for that drive The remaining values are a list of hierarchical references identifying where that schematic is used within the hierarchy The references use the value of the property defined in argument 1 DialogDesigner Simple dialog designer that generates an XML dialog definition The d
606. ue for evaluation error Argument 1 6 Template string This can consist of literal text expressions enclosed in and and special property names enclosed in The property names and their respective values may be defined in arguments 2 and 3 Properties names are substituted with their values by this function The template string may also contain the special keywords if ifd lt t and repeat These behave the same and have identical syntax as the keywords of the same name used for schematic TEMPLATE properties described in the User s Manual Argument 2 Property names Argument 3 Property values corresponding to property names given in argument 2 Argument 4 If the template contains an expression encloded in braces and the evaluation of the expression fails the value defined in this argument is returned by the function Returns Return type string Returns the result of evaluating the template Restart TranDialog Opens a dialog box allowing the user to specify a new stop time for a transient analysis The value is initialised with the argument The return value is the stop time entered by the user The user will not be able to enter a value less than that supplied in the argument 332 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 real Yes Initial stop time Returns Return type real Rms Returns accumulative RMS value
607. uiType InputGraph InputSchem IsTextEditor ManageDataGroupsDialog ManageMeasureDialog MessageBox NewPassiveDialog NewValueDialog ProcessingAccelerator ProcessingDragAndDrop ProcessingGuiAction Progress PWLDialog RadioSelect Read TextEditorProp RestartTranDialog SelectColourDialog Select Device SelectDialog SelectFont Dialog GetGroupStepParameter GetGroupStep Vals Get VecStepParameter Get VecStep Vals Groups IsComplex IsNum 3 1 Functions by Application SelectSymbolDialog SourceDialog SymbolLibraryManagerDialog SystemWidgetExistsInSelectedWindow TableDialog TableEditor TransformerDialog TreeListDialog TwoFileSelectionDialog UpDownDialog UserParametersDialog ValueDialog ViewFormattedText WM_ CanRevertToSaved WM_GetCentralWidgetGeometry WM_GetContentWidgetNames WM_GetContentWidgetSessionInfo WM_GetContentWidgetsLayout WM_GetContentWidget Types WM_ GetCurrent WindowName WM__GetPrimaryWindowName WM_GetSystemWidgetSessionInfo WM_GetSystemWidgetsLayout WM__GetWindowGeometry WM_ GetWindowNames WM_NumberContent Widgets WM__NumberSystemWidgets IsStr length Locate MkVec NumDivisions NumElems PhysType SIMetrix SIMPLIS Script Reference Manual Range Ref RefName Str True Truncate Units Val Vec vector 3 1 Functions by Application VectorsInGroup WriteRawData XFromY XY YFromX SIMetrix SIMPLIS Script Reference Manual Chapter 4 Function Reference
608. ul for Text Box objects Date The date when the object was created Time The time when the object was created Version The name and current version of the program See Symbolic Values on page 571 for more information on symbolic values x position The x position of the box in view units See Graph Coordinate Systems on page 580 y position The y position of the box in view units See Graph Coordinate Systems on page 580 AddTitleBlock AddTitleBlock company company name title title name author author name loc x y notes notes layout layout logo imagedata date date version version Adds a title block to the currently selected schematic Parameters author The name of the author company The authoring company name date Optional string representing the date If auto is used this will use auto date on saving layout Either horizontal or vertical loc The location on the schematic to place the title block Two integer arguments first is x position second is y position logo Full path to an image file to use as the logo image Only available in the horizontal layout notes Notes about the schematic Only available in the horizontal layout The notes section can be long however you must include a backslash n within the string to indicate where line breaks should happen in the text otherwise the entire notes section will appear on a single line t
609. ult Description 1 string Yes Section name 2 string array Yes Items to remove Argument 1 Section where entries to be removed are located SIMetrix SIMPLIS Script Reference Manual Argument 2 List of strings to remove from the collection Returns Return type real RemoveModelFile Uninstalls the model library paths specified in the argument Arguments Number Type Compulsory Default Description 1 string array Yes Model path names Returns Return type string RemoveSymbolFiles Removes a symbol file or set of symbol files from the symbol library Arguments Number Type Compulsory Default Description 1 string array Yes String array of symbol file paths Returns Return type real Number of library paths removed ResolveGraphTemplate Evaluate template string used by graph object 330 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Graph object ID 2 string Yes Template 3 string No Options Argument 1 ID of graph object whose properties are to be used in the template See Graph Object Identifiers the ID on page 570 Argument 2 Template string This can consist of literal text properties enclosed with and expressions enclosed with and P The property values are those belong to the object supplied in argument 1 Properties available for the various types of graph object are described in
610. ult case insensitive Passing the third argument as caseSensitive results in a case sensitive search SIMPLISSearchIdx INCLUDE X1 Include Ci INCLUDE caseSensitive and will return a vector 0 indicating only the first index matches the test string SimulationHasErrors Determines success of most recent simulation 357 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type real Return 1 if the most recent simulation failed with an error Otherwise returns 0 sin Returns the sine of the argument specified in radians Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the sine of the argument specified in radians sin_ deg Returns the sine of the argument Result is in degrees Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the sine of the argument Result is in degrees sinh Arguments Number Type Compulsory Default Description 1 real complex array Yes vector 358 SIMetrix SIMPLIS Script Reference Manual Returns Return type real complex array Return the hyperbolic sine of the argument specified in radians Sleep Executes a timed delay Arguments Number Type Compulsory Default Description 1 real Yes Time in seconds Argument 1
611. ument 3 Length 3 array of strings providing column row and button labels The first element is a delim ited string containing the column labels The second element is a delimeted string containing the row labels The third element is 1 or 2 delimited strings containing the labels for the Add Row and Remove Row buttons respectively Any or all of the elements may be empty strings in which case the default row and column labels are 1 2 3 etc and the button labels are Add Row and Remove Row Returns Return type string array Array of strings of length equal to the number of columns Each element is a delimited string with each token holding the selected value for the corresponding row TabValueDialog Arguments No arguments Returns Return type SIMetrix SIMPLIS Script Reference Manual tan Returns the tangent of its argument Result is in radians Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the tangent of its argument Result is in radians tan_ deg Returns the tangent of the argument Result is in degrees Arguments Number Type Compulsory Default Description 1 real complex array Yes vector Returns Return type real complex array Returns the tangent of the argument Result is in degrees tanh Arguments Numbe
612. uments Number Type Compulsory Default Description 1 real array Yes Vector 2 real array No oo 00 min limit max limit 3 string No empty Options 4 real No 0 0 Tolerance Argument 1 Input vector Argument 2 Real array of max length 2 Specifies limits within which the input values must lie to be included in the result Values are 0 Maximum limit i e minima must be above this to be accepted 1 Minimum limit i e minima must be below this to be accepted Argument 3 String array of max length 2 Specifies two possible options xsort If specified the output is sorted in order of their x values reference Otherwise the values are sorted in descending order of y magnitude nointerp If not specified the values returned are obtained by fitting a parabola to the minimum and each point either side then calculating the x y location of the point with zero slope Otherwise no interpolation is carried out and the literal minimum values are returned noendpts If specified the first and last points in the data will not be returned as minimum points Argument 4 Minimum spacing between x values Any pair of points that are closer than this value will be treated as a single point Returns Return type real array The function returns the XY values for each minimum point The X values are returned as the vector s reference see Vector References on page 21 272 SIMetrix SIMPLIS Script Refe
613. uname for context menus must be followed by at least one name Sub menus may also be defined for these To define a menu separator use the item text Note that if any of the menu name contains spaces it must be enclosed in quotation marks Names defined using the CombineMenu command may also be used The names Schem Main and Schem are defined in the standard startup script using CombineMenu page 449 and provide compatibility with version 7 2 and earlier See examples below 463 SIMetrix SIMPLIS Script Reference Manual when enabled A Boolean expression specifying under what circumstances the menu should be enabled The menu text turns grey when disabled If omitted the menu will always be enabled The expression may contain the following values SchemOpen TRUE when there is at least one schematic open InstSelected TRUE when at least one component is se lected on the selected schematic Selected TRUE when at least one component or at least one wire is selected on the current schematic PropertiesSelected TRUE if schematic properties are selected ClipboardEmpty TRUE if there is no schematic clipboard data available SimPaused TRUE when the simulator has been paused SimRunning TRUE when the simulator is running CircuitLoaded TRUE when a circuit has been loaded to the simulator This happens when ever a simulation is run A circuit can be unloaded with the Reset command GraphOpen TRUE when there is at least
614. unter is maintained which increments on each step This function returns the value of that counter Note that the counter is initialised to 1 Arguments No arguments Returns Return type 161 SIMetrix SIMPLIS Script Reference Manual Example The following script code sets the BF parameter to values of 100 200 and 400 for the first second and third steps respectively Let values 100 200 400 Let step GetCurrentStepValue Let value values step 1 Let SetModelParamValue BC546B BF value See Also SetModelParamValue page 350 SetInstanceParamValue page 349 GetModelParameter Values page 196 GetDotParamValue page 169 GetCursorCurve Returns curve id and source group name of curve attached to measurement cursor Arguments No arguments Returns Return type string array Returns a string array of length 3 providing information on the curve attached to the measurement cursor Returns an empty vector if cursors not enabled Index Description 0 Curve id 1 Source group name This is the group that was current when the curve was created 2 Division index if curve is grouped E g for Monte Carlo Get CurveAxis Returns axis id of specified curve Arguments Number Type Compulsory Default Description 1 string Yes Curve ID 162 SIMetrix SIMPLIS Script Reference Manual Returns Return type string Returns the id of the y axis to which the specified curve is attached
615. unused items Menus are defined using the command DefMenu page 462 and keys can be defined with the DefKey page 460 To define toolbars and buttons see Creating and Modifying Toolbars on page 586 Commands to define new user interface elements such as menus are usually placed in the Startup Script on page 26 Key definitions may be context sensitive That is the definition is dependent on which type of window is currently active Rearranging or Renaming the Standard Menus The standard menu definitions are loaded from the built in script menu when the program first starts The source for all built in or internal scripts can be found on the install CD the latest version of which may be downloaded from our web site http www simetrix co uk To modify any of the standard menus you need to modify the menu script For details on how to modify internal scripts see Modifying Internal Scripts on page 557 When editing menu sxscr please note the following e Each menu definition must occupy a single line e Menus are created in the order they appear in the script To change the order simply rearrange the lines 556 SIMetrix SIMPLIS Script Reference Manual e You can disable a menu definition by putting a as the first character of the line This makes it easy to later undelete it Menu Shortcuts These are keys which activate defined menus The key name is displayed to the right of the menu text
616. ur symbol on a schematic 564 SIMetrix SIMPLIS Script Reference Manual Note that as the schematic stores its own copy of each symbol if you modify the symbol after first defining it the changes will not be reflected in any existing schematics unless the track flag is set This is done by providing the switch flags 1 on the CreateSym page 454 command line This performs the same function as the All references to symbol automatically updated check box in the symbol editor save symbol dialog box To update the symbol on a schematic from the global library use the popup menu Update Symbols Symbol Definition Format The following commands are used to define schematic symbols AddArc page 429 AddCirc page 429 AddPin page 436 AddProp page 438 AddSeg page 440 CreateSym page 454 DelSym page 469 EndSym page 474 To describe the symbol definition format consider the definition for the npn transistor supplied in the standard symbol library In text form this is NPN BJT CreateSym npn NPN bipolar analog AddSeg 0 0 O 200 AddSeg 0 100 100 0 AddSeg 0 100 100 200 AddSeg 100 200 80 160 AddSeg 100 200 60 180 AddSeg 0 100 100 100 AddPin C 1 100 O AddPin B 2 100 100 AddPin E 3 100 200 AddProp ref Q 26 AddProp value NPN_MODEL 26 AddProp model Q 64 EndSym Let s go through it line by line The first line NPN BJT is a comment Any text may placed after a as the first character will
617. urn an empty vector when there is no match and thus easier to use in many cases Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 real No 1 Schematic ID Argument 2 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array 245 SIMetrix SIMPLIS Script Reference Manual InstNets Arguments Number Type Compulsory Default Description 1 string No Options Argument 1 Returns an array of strings holding netnames for each pin of the selected schematic instance Circuit must have been netlisted for the result of the function to be meaningful This function is used by the power script to find the power dissipated in a device If argument 1 is set to flat the resulting netnames will be stripped of hierarchical references The function will return with an error if no instances are selected or more than one instance is selected Returns Return type string array InstNets2 Returns an array of strings holding the netnames of a schematic instance defined by arguments 1 to 3 Arguments Number Type Compulsory Default Description 1 real Yes Schematic ID 2 string Yes Property name 3 string Yes Property value 4 string No Options Argument 1 Schematic ID as return
618. us box at the bottom of the schematic This is currently the 6th box from the left UserVersion Read only Current version number of schematic This is updated each time the schematic is saved TD Read only Returns ID of schematic same value returned by OpenSchematic page 286 325 SIMetrix SIMPLIS Script Reference Manual Magnification Read only Current view magnification Modified Modified status TRUE or FALSE Argument 2 Path of schematic to process This must be a schematic that is currently displayed the function can not operate on a closed schematic If not specified the currently selected schematic will be processed Returns Return type string Returns the value of the property Read TextEditorProp Reads a text editor property This will work for all text based editors Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string No Editor type Argument 1 Name of the property to read the value for Argument 2 Optional flag to specify the type of editor Possible values are LogicDefinitionEditor Netlist Editor ScriptEditor Text Editor VerilogA Editor VerilogHDLEditor Returns Return type string The property value for the requested property SIMetrix SIMPLIS Script Reference Manual real Returns the real part of the complex argument Arguments Number Type Compulsory Default Description 1 real complex array Yes vect
619. use M when what was meant was Meg M is the same as m Complex numbers are represented in the form real imaginary Strings are a sequence of text characters enclosed in single quotation marks Single quotation marks themselves are represented by two in succession Example 1 Real 2 3 4 6899 45 1e 3 1 2u Example 2 Complex 1 1 means 1 i 2 34 10 means 2 34 10i Example 3 String this is a string This is a string Creating and Assigning Variables Variables are created and assigned using the Let command For example Let x 3 assigns the value 3 to the variable x Note that Let is not optional as it is in most forms of Basic You can also assign complex numbers and strings e g Let x 5 1 Let s This is a string All of the above are scalar that is they contain only one value Variables may also be single dimension arrays called vectors Vectors are described below SIMetrix SIMPLIS Script Reference Manual Special Characters Some characters have a special meaning and if entered into a string literal will not work correctly Characters affected are newline tab semi colon single and double quotation and open and close brace characters 4 Open and close brace characters and and semi colon may be included in a string literal by enclosing the whole string with double quotation marks There is more information here Quotes Single or Double
620. user may freely move these items between the boxes The function returns the contents of the top list box as an array of strings Arguments Number Type Compulsory Default Description 1 string array Yes 2 string array Yes All items available 3 string array No empty Options 4 string No horizontal Box style Argument 1 Initial contents of selected list box 60 SIMetrix SIMPLIS Script Reference Manual Argument 3 A string array of size up to four which may be used to specify a number of options The first three are used for text messages and the fourth specifies a help topic to be called when the user presses the Help button The help button will not be shown if the fourth element is empty or omitted Argument 4 Determines the style of the box The default is horizontal and with this style the two list boxes are on top of each other If arg4 is set to vertical the two list boxes will be arranged side by side Returns Return type string array The function returns the contents of the selected list or an empty vector if Cancel is selected The function will also return an empty vector if there are no selected items and thus it is not possible to use this function to select no items at all Instead use AddRemoveDialogNew page 61 if it is necessary to be able to select no items AddRemoveDialogNew Opens a dialog box to allow user to select from a number of items This function is identical to AddR
621. ust use to define the netlist entry The value supplied to this command defines the template that will be used to create the netlist entry It can of course provide a completely literal netlist line but more usually some template keywords would be used Template Commands and Functions This a brief summary See the entries in the reference pages for more details TemplateResolve ref template Performs the same process that is usually done on a template property except that is uses the template that you supply as an argument not the device s template ref is the REF property of device being processed TemplateGetPropValue ref prop Returns the value of the property prop You should use this function not PropValues page 309 to get at property values It is faster than PropValues but won t work in regular scripts TemplateEditProperty ref propname propvalue Edits a property s value Like TemplateGetPropValue it is much faster than the regular commands but only works in a template script Note that this command records an instruction to edit a property s value but the instruction will not be actioned until the netlist operation has completed TemplateSet Value ref templatevalue Changes the value of the template used to create the netlist line currently being compiled Does not change the template property itself 585 SIMetrix SIMPLIS Script Reference Manual Creating and Modifying Toolbars From version 5 SIMetrix allo
622. value is a 16 bit number with each bit having a defined function These bits are defined in the following table Bit 0 1 Bit 3 4 Bit 5 Bit 6 Bit 7 Bit 8 Bit 9 Bit 10 Auto text location for normal orientation 00 Left 01 Top 10 Right 11 Bottom If fixed position value controls left right justification 00 left 01 centre 10 right Unused set to 0 Auto text location for 90 degree rotated orientation 00 Left 01 Top 10 Right 11 Bottom If fixed position value controls top bottom justification where baseline means the base for upper case characters the tails of some lower case characters go below the baseline 00 top 01 baseline Unused set to 0 Visibility O Visible 1 Hidden Protected status O Not protected 1 Protected Location method 0 Auto use bits 0 1 3 4 to define 1 Fixed pos actual location can only be defined in symbol Text scale method 0 Optimum readability 1 Linear Does property text define select border O No 1 Yes SIMetrix SIMPLIS Script Reference Manual Bits 11 13 Font index 0 Default 1 Caption 2 Free text 3 Annotation 4 User 1 5 User 2 6 User 3 7 User 4 Bit 14 Rotated Property at 90 degrees to symbol orientation Ignored if location method auto Bit 15 Display property name with value Bit 16 Resolve symbolic value if specified Currently only three are permitted namely lt version gt lt date gt and lt time gt If this flag is set any of
623. vector 267 SIMetrix SIMPLIS Script Reference Manual Returns Return type real complex array Returns the average of the supplied arguments Meanl Returns the integral of the supplied vector between the ranges specified by arguments 2 and 3 divided by the span arg 3 arg 2 If the values supplied for argument 2 and or 3 do not lie on sample points second order interpolation will be used to estimate y values at those points Arguments Number Type Compulsory Default Description 1 real Yes Input vector 2 real No Start of input vector start x value 3 real No End of input vector end x value Returns Return type real MeasureDialog Opens dialog for specifying graph measurements Arguments Number Type Compulsory Default Description 1 string array No Dialog data 2 string array No Initial settings 3 string array No Condition Argument 1 Dialog data Format the same as for argument 1 in the function ManageMeasureDialog page 265 except the final token is not required Argument 2 String array containing initial values List in same format as return value Argument 3 If set haveCursors indicates to dialog box that graph cursors are enabled 268 SIMetrix SIMPLIS Script Reference Manual Returns Return type string array String array of length 10 providing user selections Fields defined as follows Index Description o Measurement selection from list box I if Cursor s
624. ven 6 controls will be displayed with blank labels Function returns string vectors containing user entries for each control If cancel is selected a single empty string is returned 121 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string No empty initial edit control entries 2 string No empty labels 3 string No empty dialog box caption Returns Return type string array Example The following dialog box will be displayed on a call to EditSelect Init 1 Init 2 Label 1 Label 2 Enter Text J ESS Text xi Label 1 rit 1 Label 2 fint2 tS 2 o Cancel See Also BoolSelect on page 65 RadioSelect on page 319 ValueDialog on page 392 EditSimplisMosfetDriverDialog Opens a specialized dialog used to edit the parameters for a SIMPLIS multi Level MOSFET Driver See internal script simplis_ edit_mosfet_ driver for an application example of this function Arguments Number Type Compulsory Default Description 1 string array No Initial values 2 string array No Caption combo options Help context id SIMetrix SIMPLIS Script Reference Manual Argument 1 String array providing initial values for the various controls The order is Index Purpose Notes Default 0 LEVEL The model level 1 1 INVERTING Inverting flag 0 2 USE_DELAY Delay flag 1 3 THRESHOLD The input threshold 2 5 4 HYSTWD The in
625. ves page 153 and GetAllCurves page 150 SelectGraph SelectGraph graph id Switches the graph tabbed sheet to the graph specified by graph id Parameters focuswin If specified the window containing the specified graph will be brought into focus SelectLegends SelectLegends unselect Selects or unselects all graph window legends Parameters unselect If specified all legends are unselected Otherwise they are selected SelectSchematic SelectSchematic id schematic id schematic path Focuses on the specified schematic Use either id or path Parameters Jid Specifies that the input argument is a schematic ID This can be obtained from OpenSchematic page 286 or GetSchematicTabs page 205 530 SIMetrix SIMPLIS Script Reference Manual See Also GetSchematicTabs page 205 GetOpenSchematics page 201 SelectSimulator SelectSimulator simulator name Selects current simulator for selected schematic Parameters simulator name Name of simulator to be selected Current valid values are SIMetrix and SIMPLIS SelectSymbolPin SelectSymbolPin base name Parameters base name The name of the pin to select Select WireConnected Select WireConnected Selects all wires connected to the currently selected elements This will trace all wires and select all connected wires Set Set temp option spec option spec Defines an option Parameters temp If specified the setting wi
626. when there is no instance match Arguments Number Type Compulsory Default Description 1 string Yes Property name for flags 2 string No Selected components Property name for id 3 string No Instances with property Property value for id name in arg 2 4 real No 1 Schematic ID Argument 1 Property whose flags are to be returned 303 SIMetrix SIMPLIS Script Reference Manual Argument 2 Along with argument 3 if present these arguments identify the instances to be examined If only argument 2 is specified then all instances on the current schematic that possess that property will be used If argument 3 is also present then the instance name and value must match argument 2 and 3 respectively If neither are present the selected instances will be used Argument 3 See argument 2 Argument 4 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array The function returns a string array of length equal to the number of instances identified by ar guments 2 and 3 Each element will hold a flag value for the property specified in argument 1 The function will return an empty vector if the specified schematic could not be found If no instance matches arguments 2 and 3 an empty string will be returned PropFlags2 Re
627. window function for fourier analysis Returns full path name of given relative path Calculate gamma x Returns random number with Gaussian distribu tion Returns random number with Gaussian distribu tion truncated at the tolerance limits Alias of function GaussTrunc page 148 Returns random number with Gaussian distribu tion truncated at the tolerance limits UI function opens print dialog box Returns a file system path resolving any links Returns array of curve indexes for all curves in current graph Returns details of all simulator built in devices Finds names of all the properties on currently open symbol Returns array of axis id s for all y axes in current graph Return information about most recent analysis Returns the analysis lines used in the most recent simulation analysis Returns the text of the requested annotation Returns array of curve id s for all curves attached to specified axis Returns min and max limits and axis type log or lin of specified axis Returns type X Y Digital etc of specified axis Returns units of specified axis Finds information about module ports in the un derlying schematic of a hierarchical block Returns encoding types available Return names of all colour objects Return specification for a colour object Returns a path name with no white space Special function to get a component value or pa rameter SIMetrix SIMPLIS Script Reference Manual Function N
628. within a group Curves are grouped for example for Monte Carlo runs stepRefShift Steps reference cursor to next curve within a group Curves are grouped for example for Monte Carlo runs Curve Curve xl xlimit_low xlimit_high yl ylimit_low ylimit_high xdelta xdelta ydelta ydelta ylabel ylabel xlabel xlabel yunit yunit xunit xunit title xauto yauto xlog ylog loglog dig select newaxis newgrid axisid id autoaxis coll name bus bus spec icb objid new newsheet autoxlog autoylog y expression x expression Curve can be used to add a new curve to an existing graph created with Plot or to change the way it is displayed SIMetrix SIMPLIS Script Reference Manual Parameters autoaxis autoXlog auto Ylog axisid bus coll dig icb loglog name new newArxis newGrid newSheet select title zauto zdelta Jal tlabel xlog If specified the new curve will be plotted on a digital axis and will be plotted as a bus curve type may be hex dec or bin specifying hexadecimal decimal or binary display respectively If specified the new curve will be added to a y axis with the id spec ified by axis_id Axis id is returned by the functions GetAllYAxes on page 151 GetCurveAxis on page 162 and GetSelectedYAxis on page 208 If specified the new curve will
629. ws the complete customisation of toolbars You can modify the definitions of existing toolbars and buttons as well as create new toolbars and new tool buttons This section explains how Modifying Existing Toolbars and Buttons You can rearrange the button layout of existing toolbars by modifying the Set option variables that define them In the case of the schematic component buttons this can be done via a simple GUI See menu View Configure Toolbar For other toolbars use the command Set page 531 to reassign the buttons The following table shows the name of the Set variable to use for each one Set Variable Name Toolbar ComponentButtons SchematicComponents non Micron versions MicronComponentButtons SchematicComponents Micron versions CommandShellMainButtons CommandShellMain CommandShellMainNoSchemButtons CommandShellMain if schematic disabled OEM ver sions only SIMPLISComponentButtons SIMPLISComponents SchematicMainButtons SchematicMain SchematicFileButtons SchematicFile GraphMainButtons GraphMain The Set variable should be set to a value consisting of a semi colon delimited list of valid button names For a list of pre defined buttons see Pre defined Buttons on page 588 For example the following will add a New Schematic button to the schematic file tool bar Set SchematicFileButtons SchemNew SchemOpen SchemClose SchemSave You can also use Unset to re
630. x then this will report an error WM_ ProgressWindowClose WM_ProgressWindowClose identifier Closes the specified progress window See Also WM_ProgressWindowCreate page 551 WM_ProgressWindowCloseAll page 551 WM_ProgressWindowReport page 552 WM__ProgressWindowCloseAll WM_ProgressWindowCloseAll Forces all progress windows to be closed WM__ProgressWindowCreate WM_ Progress WindowCreate number steps identifier title window title caption caption message message progress message Creates a progress window with given number of steps and identifier The window contains a progress bar that increments each time WM_ ProgressWindowkReport page 552 is called Parameters caption The caption of the window This appears above the progress bar and cannot be changed after the window is created message The status message of the progress window This appears below the window and can be changed after the window is created title The title of the window number steps The number of times WM_ Progress WindowReport page 552 has to be called to make the progress bar be completely full 551 SIMetrix SIMPLIS Script Reference Manual identifier The identifier that will be used to reference the progress window on update and close calls See Also WM_ProgressWindowClose page 551 WM_ProgressWindowCloseAll page 551 WM_ProgressWindowReport page 552 WM__ProgressWindowReport WM_ Progress WindowRepor
631. xis Does nothing For compatibility with the command Curve page 456 newGrid Does nothing For compatibility with the command Curve page 456 newSheet Creates a new empty sheet Does not plot any curves select If specified the new curve will be selected title Specify title of graph with graph title tauto Does nothing For compatibility with the command Curve page 456 xdelta Specify spacing between major grid lines on x axis with real value xdelta For default spacing use 0 506 SIMetrix SIMPLIS Script Reference Manual Jal Specify fixed limit for x axis xlimit low is a real value stating the lower limit of the x axis whilst xlimit high is a real value stating the higher limit of the x axis xlabel Specify label for the x axis with zlabel slog Forces logarithmic x axis only effective when graph sheet is empty cunit Specify units for x axis Volts Watts etc with string zunit If it g contains spaces the whole string must be enclosed in quotes You should not include an engineering prefix m K etc yauto Does nothing For compatibility with the command Curve page 456 ydelta Specify spacing between major grid lines on y axis with real value ydelta For default spacing use 0 yl Specify fixed limit for y axis ylimit low is a real value stating the lower limit of the y axis whilst ylimit high is a real value stating the higher limit of the y axis ylabel Specify label f
632. xt is la No bel unit Default DefaultLabel Name Axis name Y1 Y etc Empty for X and Dig axes Yes Unit Physical units of axis E g V A etc Default No DefaultUnit Min Minimum limit of axis No Max Maximum limit of axis No AutoLimit On or Off determines whether axis limits are adjusted No automatically according to attached curves Grad Grading of axis Log or Lin No Delta Value that determines the minor grid line spacing No VertOrder Vertical order Arbitrary string used to specify vertical No display order DefaultLabel Label property is given default value of DefaultLabel Yes which resolves to the value of this property DefaultUnit Unit property is given default value of DefaultUnit Yes which resolves to the value of this property Crosshair Object used to display cursor Each graph cursor consists of a Crosshair and two CrosshairDimen sions Name Description Read Only COM1 Common reference value Only meaningful with X Y plots Yes such as Nyquist plots Shows the value of the common reference to X and Y This is frequency in a Nyquist plot Dimensions Comma delimited string providing the dimension objects Yes attached to this cursor Graph ID of parent graph Yes ID ID of this object Yes Point 1 Main cursor 2 Reference cursor Yes Type Type of object always Crosshair Yes XDimension The ID for the CrosshairDimension object that displays the
633. xtEditor OpenBasicTextEditor filename Open a plain text file for manual text editing This command opens the text file with no syntax highlighting Use one of the following commands to open files with specific formats OpenNetlist on page 500 to open a model file or netlist file OpenLogicDefinitionEditor on page 499 to open a logic definition file for the abritrary logic block OpenScript on page 502 to open a script OpenVerilogA on page 503 to open a Verilog A source file OpenVerilogHDL on page 504 to open a Verilog HDL source file OpenAsciiFile on page 496 to open a schematic file in the text editor Parameters encoding encoding For details see documentation of second argument to Load File page 259 fws File watcher status enable disable auto filename Path of text file to open OpenDirectory OpenDirectory path Opens the directory as given by the argument Parameters path The path of the directory to be opened 497 SIMetrix SIMPLIS Script Reference Manual OpenExternalFile OpenExternalFile filename Opens the given file path in the operating systems default program associated with that file Parameters filename The path of the file to be opened OpenGraph OpenGraph file name Opens the graph file filename and displays it Parameters newwindow If specified a new window will be opened for the graph Otherwise the graph will be displayed in a new tabbed sheet in a
634. y Notes This is identical to the function RootSumOfSquares page 334 SupportedReadFormats SIMetrix schematics and symbols can display graphical bitmap images This function returns the formats supported 367 SIMetrix SIMPLIS Script Reference Manual Arguments No arguments Returns Return type string Supported WriteFormats SIMetrix schematics and graphs Save Picture features can write the displayed image to a graphical file This function returns the formats supported See CopyClipSchem page 451 and CopyClip Graph page 450 for commands that can generate image files Arguments No arguments Returns Return type string array SymbolInfoDialog Opens a dialog box allowing the specification of symbol details Arguments Number Type Compulsory Default Description 1 string No Initial settings 2 string No Available catalogs Argument 1 String array length 5 specifying initial settings If component save as component initially selected O Symbol name 1 Display name 2 Catalog 3 Path 4 5 If 1 All references to symbol automatically updated box will be checked 368 SIMetrix SIMPLIS Script Reference Manual Argument 2 List of available catalogs entered into catalog list box Returns Return type string array String array of length 6 as follows Index Description 0 Symbol name entry Display name entry Catalog selected File path 1 2 3 Sav
635. y SIMetrix SIMPLIS Script Reference Manual The function returns a real array of length 4 with the same format as the argument described above If the user selects Cancel the function returns an empty vector DefineCurveDialog Opens the dialog box used to define a curve for plotting See menu Probe Add Curve or Plot Add Curve in the graph window The argument is a string array of length 25 which defines how the various controls are initialised This array has the same format for EditAxisDialog page 105 and EditProbeDialog page 117 Not all the elements are relevant to this function The following table describes the elements that are used Index Purpose Notes Default 0 Oo AN DOT FF Ww N o 11 Axis Type Graph Type Axis name Persistence Graph name Curve label Analysis Plot on completion reserved for future use reserved for future use X axis graduation X axis scale options Setting of Axis Type group in Axis Graph No default Options sheet Possible values Value must be specified auto Auto Select selected Use Selected axis Use New Y Axis grid Use New Grid digital Digital Setting of Graph Options group in Axis No default Graph Options sheet Possible values Value must add Add To Selected be specified New Graph Sheet New Graph Window newsheet newwindow Not used with this function Not used with this function Not used with th
636. y won RR Returns Return type real array The function returns a real array of length 4 with the same format as the argument described above If the user selects Cancel the function returns an empty vector DefineRipperDialog Opens a dialog box to define a schematic bus ripper Arguments Number Type Compulsory Default Description 1 string array Yes initial settings 2 string array Yes list of style box items Argument 1 This argument is a string array of length 4 and defines the initial settings for the box controls as follows Index Description 0 Bus name 1 Start index entered as a string 2 End index entered as a string 3 Style index This is an index into the values in the style box which are defined in argument 2 Argument 2 String array containing list of items entered in style box SIMetrix SIMPLIS Script Reference Manual Returns Return type string array The function returns a string array of length 4 with the same format as argument 1 described above If the user selects Cancel the function returns an empty vector DefineSaturableTxDialog Opens a dialog box to define a saturable transformer Arguments Number Type Compulsory Default Description 1 string array Yes Core material info 2 string array Yes Part number info 3 real array Yes Winding ratios 4 real array Yes Initial values Argument 1 Array of core material specifications Each element is a string has the fo
637. y Default Description 1 real complex array Yes Vector 2 real No 0 index Argument 2 Identifies parameter when there is more than one Returns Return type real array Get Widget Info Returns information about open views This is primarily an internally used function and the output may change in future releases Arguments No arguments Returns Return type string Information about all the open views In the form window_id tab_id widget_id widget_type widget_name highlighted y n window_has_focus y n Get WindowNames Returns names of current windows Result can be supplied as an argument to the command Focus page 476 using named switch or userid switch This function is superceded by WM_GetWindowNames page 403 Arguments Number Type Compulsory Default Description 1 string No Options 230 SIMetrix SIMPLIS Script Reference Manual Argument 1 If set to full this function will return more detailed window information See the return descrip tion for details Returns Return type string array If no argument 1 is given returns an array of window names If argument 1 has been set to full each element of the output array contains a semi colon delimited string with the following three fields Index Description 0 Window type One of Shell Schematic Graph or Symbol 1 User index Integer that can supply to the command Focus page 476 us i
638. y all top level data is saved Equivalent to placing KEEP nov noi nodig in netlist nolist Inhibits creation of list file noStatus Inhibits update of the GUI status box Use in conjunction with no focus to run a hidden simulation optforce Same as options but overrides any OPTIONS setting in the netlist pauseAt Pauses simulation at first time point after pause time sweep May be set to start continue or finish This is used to create linked runs that save their data to the same group using multi division vectors The first run in such a sequence should specify sweep start while the final run should specify sweep finish All intermediate runs should specify 1 sweep continuei j All runs except the first must also specify append netlist Input netlist filename datafile Specifies path name of file to receive simulation data If omitted the data is placed in a temporary data file Notes The Run command does not run a simulation on the currently open schematic but on the specified netlist Normally a run is initiated using the Simulator Run menu item This annotates the schematic then generates the netlist using the Netlist page 489 command Run is then executed specifying the new netlist The Run command may also be used to run a simulation on a netlist generated by hand or by another schematic editor Linking Runs The data from multiple runs may be linked together in the s
639. y axis GetCurrentGraph page 161 Returns the ID for the currently selected graph sheet GetCursorCurve page 162 Returns information about curve attached to the main cursor including its ID GetCurveAxis page 162 Returns ID of y axis associated with a curve 570 SIMetrix SIMPLIS Script Reference Manual GetDatumCurve page 164 Returns information about curve attached to the refer ence cursor including its ID GetGraphObjects page 178 Returns all objects on a graph or objects of a specified type GetSelectedCurves page 207 Returns IDs of all selected curves GetSelectedGraphAnno page 207 Returns ID of the selected annotation object GetSelectedYAxis page 208 Returns the ID of the selected Y axis GetXAxis page 231 Returns the ID of the X axis Some of the functions in the above list are technically redundant For example the value obtained by GetCurveAxis page 162 can also be obtained by reading the value of the Y axis property of the curve This can be done with the general purpose GetGraphObjPropValue page 179 function Symbolic Values Some properties used for labels may be given symbolic values Symbolic values consist of a property name enclosed with the character When the label is actually displayed the property name is replaced with its value Symbolic values may also be indirect Some properties return the id of some other associated object and the value of a property for that object may be referenced w
640. y axis attached to curve Yes YUnit Physical type of curve s y data Yes Frozen If true curve will not be purged That is it will not be No removed to satisfy the persistence setting for a fixed probe Label The curve s label This is the text that appears in the No legend panel This can use a symbolic constant and in fact defaults to DefaultLabel Note that when reading back a symbolic value assigned to this property the resolved value will be returned Name The curve s base name This is the value passed to the No name switch of the Curve Plot command or the name of the vector plotted if no name switch is supplied RGBColour Colour of curve Can be entered as value returned from No GetColourSpec page 156 or using format rrggbb where rr gg and bb are two digit hex values representing the red green and blue colour content respectively 575 SIMetrix SIMPLIS Script Reference Manual Name Description Read Only Sequence Integer value that is used to define default colour The No actual colour used may be set globally using options dialog box ShowPoints If true data point markers will be displayed No Suffix This is assigned when the result of a multistep analysis is No plotted to give information about the step E g if you stepped a resistor value the suffix would hold the name and value of the resistor at the step Visible If false curve will be hidden but its legend display will No remain CurveMarker
641. y in them Argument 3 If set will only choose elements that have the property stated by argument 2 with the value stated by this argument Argument 4 Handle to a particular schematic If not set uses the currently highlighted schematic Returns Return type string array Returns the property values for all applicable properties Each row of the resulting array will be a different element s property flag 314 SIMetrix SIMPLIS Script Reference Manual See Also Prop ValuesAll on page 312 Prop ValuesAnnotations on page 313 PutEnvVar Write a system environment variable Note that this only modifies environment variables in the current process and any child processes initiated using the commands Shell page 538 or ShellOld page 538 Arguments Number Type Compulsory Default Description 1 string Yes Definition Argument 1 Definition Must be of form name value Returns Return type real The function returns 1 on success or 0 on failure Failure can occur if the argument is of the wrong format PWLDialog Opens the dialog box shown below allowing the entry of X Y pairs intended for the definition of piece wise linear devices 315 SIMetrix SIMPLIS Script Reference Manual loetne rw source Press the insert key to insert a row or rows Press the delete key to delete the selected rows Paste Cancel Arguments Number Type Compulsory Default Description 1 st
642. y name Output file history key name Description history key name Checkbox history key name Input file type Output file type Any text without strings if omitted or empty empty string no files will be remembered Any text without strings if omitted or empty empty string no files will be remembered Any text without strings if omitted or empty empty string no description text will be re membered Any text without strings if omitted or empty empty string no checkbox state will be re membered Unlike the other memories this only remembers the last checkbox state SIMetrix SIMPLIS has several internally empty defined and user customizable input file types Schematic Schematic files Model Model files Netlist Netlist files Graph Graph binary files Script Script files VerilogA Verilog A files VerilogHDL Verilog HDL files Data Data files Text Text files AsciiFileEditor Schematic ASCII Files LogicDef Logic definition files used with arbitrary logic block Init SIMPLIS Initial izaition files An empty string will open the file browser with all files displayed Same as the Input file type but for the out empty put file extension SIMetrix SIMPLIS Script Reference Manual Index Purpose Notes Default 6 Output file replace ment mode none no replacement is performed on the
643. y result is returned if the user cancels the dialog box SIMetrix SIMPLIS Script Reference Manual EditPinDialog Opens a dialog box used to edit a pin in the symbol editor Arguments Number Type Compulsory Default Description 1 string Yes initial pin name 2 string No 256 initial flags value 3 string No not used 4 string No not used 5 string No empty font override style 6 string No empty available font override styles Argument 1 Specifies the initial value for the Pin name entry Argument 2 Specifies the initial value for the remaining controls using the property attributes flag See At tribute Flags in the Prop command on page 510 for details Returns Return type string If the user selects Cancel the function returns an empty vector otherwise The function returns a string array of length 2 Index Description 0 Flags value defining justification and property attributes 1 Pin name Edit Pot Dialog Opens a dialog to define a potentiometer Arguments Number Type Compulsory Default Description 1 real array Yes initial settings 115 SIMetrix SIMPLIS Script Reference Manual Argument 1 The argument is a real array of length 3 and defines the initial settings as follows SIMetrix SIMPLIS Script Reference Manual O Resistance 1 Wiper position 0 to 1 2 Run simulation after position changed check box state 1 checked O not checked Returns Return type real
644. y the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns an array of strings holding all the net names in the currently selected schematic Returns an empty value if the schematic is empty or can t be found Net Wires Returns wire handles of names net Note that this function requires that the schematic has been netlisted This can be forced using the function Netlist page 489 in the form Netlist nooutput nodescend if required Note also that for a child schematic in a hierarchy a local netname is expected that is without the path prefix e g voutn not ul voutn 277 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Net name 2 real No 1 Schematic ID Argument 1 Name of net whose wire handles are required Argument 2 Schematic ID as returned by the function OpenSchematic page 286 This allows this function to be used with a schematic that is not open or not currently selected If omitted or 1 the currently selected schematic will be used Returns Return type string array Returns an array of strings holding the handles for all wires on the specified net Returns an empty string if there are no wires on the net or if the net does not exist
645. ype Compulsory Default Description 1 string Yes Item name Returns Return type string Get PlatformFeatures Returns information on availability of certain features that are platform dependent Arguments No arguments Returns Return type string array Currently a string of length 4 defined as follows Index Description 0 Is the function ShellExecute page 354 implemented true or false 1 Obsolete 2 Is VersionStamp function implemented true or false 3 Is context sensitive help implemented true or false 202 SIMetrix SIMPLIS Script Reference Manual Get PrinterInfo Returns information on installed printers Arguments No arguments Returns Return type string array Returns array of strings providing system printer names and current application default printer Format is as follows Index Description 0 Number of printers available in system 1 Index of printer that is currently set as default This is the default for the application not the system default printer see below 2 List of printer names and subsequent indexes Example The following is an example of executing the command Show GetPrinterInfo Index GetPrinterInfo 5 91 Dell Laser Printer 1100 Fax HP Color LaserJet CP4020 Series PCL6 Microsoft XPS Document Writer Send To OneNote 2010 AnFWNFO The default index is 2 so this means that HP Color LaserJe
646. ype of axis Arguments Number Type Compulsory Default Description 1 string Yes Axis ID Returns Return type string Returns the type of axis Possible values are K X axis Digital A Digital Y axis Created with Curve dig or menu Probe Voltage Digital Main Main Y axis axes at bottom of graph Grid Grid Y axis axes stacked on top of main NotExist Axis does not exist Get AxisUnits Returns physical units of axis See the function Units on page 388 for list of possible values 154 SIMetrix SIMPLIS Script Reference Manual Arguments Number Type Compulsory Default Description 1 string Yes Axis ID Returns Return type string Get ChildModulePorts Finds information about module ports in the underlying schematic of a hierarchical block This function was developed as part of the system to allow buses to pass through hierarchies as it can find whether the underlying module port for a hierarchical block is defined for bus connections Property name and value must uniquely define an instance Arguments Number Type Compulsory Default Description 1 string Yes Property name 2 string Yes Property value 3 real No 1 use currently selected Schematic ID schematic Argument 1 Usually arg 1 the property name is handle If arg 1 is an empty string a single selected instance will be used Argument 2 The property value Argument 3 Schematic ID as

Download Pdf Manuals

image

Related Search

Related Contents

deXlan 47200 User's Manual  MODE D`EMPLOI www.mondpc.fr  Installation, Start-Up and Owner`s Manual  LASUR AQUA SATINADO  I6000 User Manual    Stinger MC2 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file