You may use Commands in Analytica Script, in a Button Script, or the Typescript Window. They are not part of the Analytica language used in Definitions, except as the text parameter to the built-in function EvaluateScript(s).
The syntax is the name of the command followed by its parameters, if any -- e.g:
Open Diagram Details
Unlike functions, commands use no parentheses around their parameters, and use spaces not commas between parameters. Most parameters are optional. If no parameter is specified, it usually applies the command to the current object -- the object most recently mentioned in the Script. If an omitted parameter is not optional, it gives an error message.
These Typescript commands show information about objects and the model. They generate their results in the Typescript window. They can be helpful in debugging. Profile is especially useful to see object attributes not otherwise visible in the user interface. If you use one of these commands in the parameter to EvaluateScript in an Analytica expression, it returns the results as a text value.
Displays all user-specified attributes of object x.
Lists all the attributes of object o, both user-specified and system-generated. This is useful for writing and debugging scripts and functions called from scripts that work with the system-generated attributes.
Allshow m Shows the user-defined attributes of module m and all of the objects in it. If no model is specified, it assumes the current model.
What o Shows object the identifier, title of object o. If o is a variable, it also lists its units and value (or indexes of its value if it is an array).
Does the same as What on v and all its Inputs. This can be useful to examine why a variable has the value it does.
Shows the Inputs of all objects in a model, to show the dependency structure. This is way too much information in a complex model.
Lists alphabetically the identifiers of all objects of class c, where c may be Variable, Function, Module, Sysvar, Keyword, and so on. If you omit c, it lists all objects -- way more than you probably want to see.
Lists the inputs of object o (variable or function, and each of its inputs, and so on, as a crude tree. Not very useful.
Shows the current date, time, and memory usage, e.g:
Sat 06-Oct-07 12:50 PM Memory Size Max Used In Use Free % Full 2.147G 12.09M 12.09M 2.135G 0.5631%
Lists the build date, edition, copyright notice, and Lumina contact information.
10 Sept 2007 Enterprise edition 4.0.0 beta for creating and evaluating models. Copyright © 1996-2007 Lumina Decision Systems, Inc. This program was written with MacApp®: ©1985-1996 Apple Computer, Inc. Lumina Decision Systems 26010 Highland Way Los Gatos, CA 95033 Support: 650-212-1212, firstname.lastname@example.org.
User Interface Commands
These commands open and close windows in the user interface:
Open Diagram m
Opens or brings to front the Diagram window for module m.
Open Object o
Opens or brings to front the Object window for object o.
Open Result v
Opens or brings to the front the Result window for variable v, using the table or graph form it was last viewed.
Opens a window in Edit mode to let you edit the definition of object o: It may be the Attribute panel, Object window or Edit table, according to the value and setting in Preferences (similar to shortcut control-e).
Close Diagram m
Closes the Diagram window for model m.
Close Object o
Closes the object window for object o.
Close Result v
Closes the Result window for variable v.
Ends a session, like Quit from File menu. It asks if you want to save any changes.
In a model File, Close specifies the end of the current model. When used as a Command interactively, Close moves you from a Submodel to its Parent.
Object Manipulation Commands
These commands let you write scripts to generate and modify objects:
Deletes object o from the model, with no confirmation dialog. If o has outputs -- variables that depend on it -- it is advisable to first delete or redefine those outputs.
Rename o newName
Changes the identifier of object o to newName. If the object has outputs, it updates their definitions to use the new identifier.
Move o m
Moves object o into module m at the same x, y location as it was in its previous diagram.
Makes modulem the current module.
Include alias, volRefNum, dirID, class object, filename
Read in a module or library from the specified file's location on a disk.
- alias refers to a Macintosh File alias (type ‘alis’) resource ID, or 0 if none is specified. Only a model file should specify a non-zero value. If a non-zero value is specified and the resource exists, Analytica uses the Alias manager to resolve the location of the file and ignores the additional information in this attribute. If a zero value is specified or if the resource doesn't exist, Analytica uses the additional information stored in this attribute to locate the file. On Windows, alias should always be 0.
- volRefNum and dirID are Macintosh HFS specifiers that help locate the file.
- class and object are this object's class and identifier, respectively, used to check consistency.
- filename is the actual file name, or pathname.
Command that puts Analytica into update mode, so that it allows redefinitions of existing objects. Existing attributes of such objects will be overwritten by the attributes of the new Versions. This mode is used when reading in new Versions of selected objects.
A Command used to finish an Update File. It changes the Analytica mode to make it illegal to attempt to re-declare existing objects.
- Analytica Script
- Inspection Commands
- File System Typescript Commands
- User Interface Typescript Commands
- Object Manipulation Typescript Commands