User Interface Typescript Commands

Revision as of 18:49, 23 October 2024 by Lchrisman (talk | contribs) (→‎BrowseModeOn)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The typescript commands described here can be used from the Typescript window or from a button script to manipulate the user interface. For example, they let you display or close selected windows. These commands generally have no effect when used from ADE.

Open

Open module

Makes «module» the current module. Any new objects declared/created from typescript are placed into the current module.

Open [diagram | object | definition | table | graph | result ] o

The first parameter specifies what kind of window to open:

diagram: Diagram window
object: Object window
definition: Definition
table: Result as table
graph: Result as graph
result: Result as table or graph depending on what it was last saved as.

Open Diagram m

Opens the diagram window for module «m».

Open Object o

Opens the object window for «o».

Open Definition o

Opens the Edit table window if «o» is defined as edit table, otherwise input control if there is one, otherwise definition attribute.

Open Table v

Opens the result table for «v». The view mode (Mid, Mean, PDF, etc) is determined by the value of the ValueState attribute of «v». It will open to the previously viewed mode, unless you alter this attribute prior to executing.

Open Graph v

Opens the result graph for «v». The view mode (Mid, Mean, PDF, etc) is determined by the value of the ValueState attribute of «v».

Open Result v

Opens the Result window for «v», showing a Table or graph, depending on the last view selected. The last view shown is and the result mode are stored as the 7th and 8th fields of the ValueState attribute. (Its other fields store the location and size of the window).

Close

Close m

When used within the typescript window, there is always a "current module". If you've created a module from typescript by typing:

Module myModuleIdent

then this will be the current module. If you've used the typescript command:

Open myModule

then that will be your current module. When you create new objects from typescript, they are placed into the current module.

Close m

This can be used when «m» is the current module. If «m» is the current module and also the top-level module, it will close your model, prompting whether you want to save changes if any unsaved changes are pending, and then exit Analytica. If «m» is a sub-module and the current one, then the current module will become the parent of «m». If «m» is not the current module, it signals an error.

Close Diagram m

Closes the diagram window for module «m».

Close Object o

Closes the object window for «o».

Close Definition o

Closes the edit table window for object «o».

Close Graph v, Close Table v, Close Result v

These all close the result window for «v».

Edit

Edit «v»

Same as: Open Definition «v»

ResynchAllWindows

In rare situations, Scripts button or assignments may cause changes that don't immediately update corresponding information displayed on screen. Thus, the user interface may show information inconsistent with what is in the model. The command ResynchAllWindows cures this by re-displaying all open windows so that they are synchronized with the underlying model. It has no parameters.

BrowseModeOn

Equivalent to pressing the Browse tool button on the toolbar. Changes the user into browse-mode if he is currently in edit mode.


  • (New to 6.5) A module (even non-filed modules) can be set as browse-only from the typescript window as follows:

with ModuleName
BrowseModeOn

Bye

When executed from within a file, as the file is loading, terminates the loading of that file.

When used from the typescript window, or from a button script, terminates Analytica. Equivalent to selecting Quit on the File menu.

(new to Analytica 6.0) With a minus sign as a parameter, it terminates Analytica without asking to save (and without saving) changes to your model. E.g.:

Bye -

As with any typescript command, from a button OnClick event, this needs to be run as

EvaluateScript('Bye -')

See Also

Comments


You are not allowed to post comments.