Analytica Command Line


Release:

…  • 4.6 •  5.0 •  5.1 •  5.2 •  5.3 •  5.4 •  6.0 •  6.1 •  6.2 •  6.3 •  6.4 •  6.5 •   •  6.6 •  7.0 •  7.1 •  7.2

The desktop Analytica.exe process is launched with a command line having the format:

Analytica.exe [options] [filename]

The brackets mean that these are optional. When filename has one or more spaces, you need to put double quotes around the filename. Or, you can put double quotes around the filename even if it doesn't have spaces. The filename will usually have the extension *.ana. When no filename is specified, Analytica launches to the intro screen. When a filename is specified, it loads that model file.

Options

Each option can be prefixed either with a forward slash, /, or with a minus, -. Option values appear after a colon. There can be no spaces within the option or its value. When an option value contains a space, the option value must be quoted using double quotes.

As of Analytica 7.2, an option may also be prefixed with a double minus, --, and an option value may be introduced by an equal sign, =, in place of the colon. So /nosplash, -nosplash and --nosplash are all the same option, and /mcp:8080 and --mcp=8080 are the same option with the same value. This makes the spellings that are conventional for Chromium and for command lines on other operating systems work as expected.

  • /rlmDiag:filename: Writes diagnostic information about licenses to filename. This is very useful if you are encountering problems with a license that you believe has been activated, but is not working. After launching Analytica with this option, exit Analytica and either review the log file in a text editor, or email the diagnostic file to [email protected] for assistance. The diagnostic file logs the information about licenses that it finds on your computer, and hence is very useful for debugging license problems.
    Example usage: Analytica.exe /rlmDiag:"c:\Temp\rlmDiag.log"
  • /roam:days: Specifies the number of days to roam a floating license. Or, if days is -1, it releases a roamed license. See License Roaming.
    Example usage: Analytica.exe /roam:7
  • /lic:licenseName: Uses the specified license name without changing which license is selected by default. The license must already be activated (i.e., the license must be in your C:\ProgramData\Lumina\Licenses folder).
    Example: Analytica.exe /lic:analytica_optimizer_761_2
  • /rlm:server: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.
  • /eval:expression: (new to Analytica 6.0). Specifies an Analytica expression that is evaluated immediately after the model file that is specified on the command line finishes loading. The evaluating occurs after any proactively evaluated variables or buttons in the model. It does not dirty the model. The expression can include global variable assignments, and button identifiers. You will almost certainly want to include double quotes around the expression, and you need to escape any interior quotes by proceeding the quote with a backslash. As of Analytica 7.1, the expression is evaluated even when no filename appears on the command line; it then runs once the model that Analytica starts up with -- your startup model, or a new untitled model -- has finished loading. See Running a model in a command line workflow.
  • Example usage: Analytica.exe /eval:"Claimant=\"JDoe\";Run_Batch;Exit" "Claim analysis.ana"
    In this example, Claimant is the identifier of an input variable in the model and Run_batch and Exit are names of a buttons in the model.


  • /evalThenExit:expression: (new to Analytica 7.2) The same as /eval:, except that Analytica exits as soon as expression has finished, without asking whether to save changes. This is almost always what you want in a command line workflow.
    Example usage: Analytica.exe /evalThenExit:"Claimant=\"JDoe\";Run_Batch" "Claim analysis.ana"
    Before 7.2, you had to write the exit into the expression yourself, as /eval:"expression;EvaluateScript('Bye -')". That was awkward and easy to leave out -- and when it was left out, the batch run did its work and then sat at an idle Analytica window forever, waiting for a person who was never coming.
    If expression exits on its own -- because it runs Bye, or presses a button that does -- that simply happens first, and this option then has nothing left to do.
    If expression fails, the error dialog still appears and waits to be dismissed before Analytica exits. Add /Automation when the run must not stop for a dialog under any circumstances.
    /eval: and /evalThenExit: may both appear on the same command line, in which case the /eval: expression is evaluated first.
  • /comment:text: (new to Analytica 6.0) The text is a comment that is ignored by Analytica. In one example usage, ACP3 adds a comment to each spawned processes to differentiate them in task manager.
  • /NoSplash: (new to Analytica 6.0) Don't show the splash screen at startup (which normally displays for 3 seconds).
  • /mcp:«port»: (new to Analytica 7.0) Enable Analytica as an MCP server (a protocol that allows A.I. language models to call functions in your model). UDFs that contain @mcpTool in their description are exposed as functions that the external A.I. client can call.
  • /lang:«code» (new to Analytica 7.1) Specifies the User Interface language for Analytica (for menus, dialogs, error messages, built-in function descriptions, etc.). «code» is a language code such as 'en' (for English), 'es' (for Spanish), etc. The language is only used when the resource files exist for that language in
    «Analytica install folder»\Resources\«code»\
    The command line overrides the registry setting Language (if present) in the hive
    HKCU\Software\Lumina Decision Systems\Analytica
    As of Analytica 7.1, non-English UI options is an experimental feature and not complete.

The remaining options exist for internal purposes and aren't generally used by end-users:

  • /embedding: The Windows operating system uses this parameter when launching Analytica as a OLE-link server. Not used by end-users. Causes Analytica to launch quietly (without a GUI), load an indicated model, and exposes key OLE interfaces to Windows enabling an external application to complete the link to the model's data.
  • /solverDevLic: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from Frontline Systems found in the Solver.lic file are developer licenses rather than runtime licenses.
  • /forcerelease: This parameter is used by Analytica quality assurance engineers during beta testing periods. It causes a beta release to behave like a final release build with regard to licensing.
  • /config:filename: This is an option used by ACP3 (by Suan.exe) and not in Desktop Analytica. The specified config file contains settings that define the ACP3 server configuration.


  • /remote-debugging-port:«port»: (new to Analytica 7.2) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on 127.0.0.1:«port», so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's chrome://inspect page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the CefWindow function. The Chromium spelling --remote-debugging-port=«port» is also accepted. Use a «port» of 0 to have a free (ephemeral) port picked automatically. Valid values are 0 or 1024 through 65535. The endpoint listens only on 127.0.0.1, and enabling it is per-process (all CEF windows of the process share one endpoint, with one DevTools target per window).
    After launch, the process reports the outcome in %LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json, where «pid» is the process id of the launched Analytica.exe. On success this contains "status":"listening" and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains "status":"failed" with a reason, and a warning dialog is also shown. A tool that launches Analytica.exe with this option should read this file rather than connecting blindly, so that it cannot be fooled into talking to some other process that owns the port.
    While remote debugging is enabled, each page in a CEF window exposes the JavaScript global window.anaCefWindow with fields pid, handle, kind and title, identifying which window a DevTools target belongs to. The handle matches the handle of the corresponding CefWindow object in the model.
  • /remote-allow-origins:«origins»: (new to Analytica 7.2) A comma-separated list of origins (or *) allowed to connect to the remote-debugging endpoint from a web page. This is only needed when the DevTools client is itself a web page, which sends an HTTP Origin header that Chromium rejects by default. Ordinary clients (Python or Node scripts, Puppeteer, chrome://inspect) send no Origin header and connect without this option. The Chromium spelling --remote-allow-origins=«origins» is also accepted.
  • /lib:filename: (new to Analytica 7.2) Loads the Analytica library in filename into the SysLib_Customizations system module, before the model named on the command line is opened. The library is then present no matter which model is loaded, and it stays loaded as models are closed and opened during the session. The option can be repeated to load several libraries. They load in the order given, all of them before the model.
    Example usage: Analytica.exe /lib:"W:\Analytica\Libraries\Multivariate Distributions.ana" MyModel.ana
    A relative filename is looked for first in the directory that the process was launched from, then in the directories on the AddLibraryDir library search path, then in the Analytica installation folder, and finally in the preferences folder. Path substitutions such as %appdata% and %installdir% are expanded.
    Each library loaded this way is its own namespace. Since SysLib_Customizations is a private namespace, the library is not in namespace scope for the user's model. A model that wants to use one of these libraries must name it in its NamespaceImports attribute.
    When the file is not found, or when it fails to load, a warning dialog names the file and Analytica continues to start up without it.
    Uses for this include loading an MCP server in Analytica that works with whatever model is subsequently loaded, a benchmark driver, or a library that adds toolbar buttons or menu items.


  • /stores:filename: (new to Analytica 7.2) Names the FileProviders.config file that declares the custom file system providers this process should use. A file provider makes a URI-style path such as repo://Sales/Q3.csv usable anywhere Analytica accepts a file name -- opening a model, ReadTextFile, FileSystemListing, and so on -- with the repo prefix served by an HTTP storage service that you configure, or write yourself.
    Example usage: Analytica.exe /stores:"C:\ACME\FileProviders.config" MyModel.ana
    A relative filename is resolved against the directory that the process was launched from.
    This option overrides the other places the file is otherwise looked for -- the ANALYTICA_FILE_PROVIDERS_CONFIG environment variable, the FileProvidersConfig registry value, and a FileProviders.config sitting in the same folder as the engine binary -- so it is mainly a deployment and debugging convenience. The registry value is the usual way to configure stores, and, with the environment variable, it is the only way to do it for ADE and ADEW, which have no command line of their own.
    The configuration is read once, while the engine initializes, so changing it means restarting the process. When the file named is not there, no providers are registered.
    The same option, with the same meaning, is accepted by Suan.exe and by Amp.exe.
    Requires the Analytica Developer edition or better. For what to put in the file, and for the HTTP API a storage service implements, see Custom file system providers.


  • /Automation: (new to Analytica 7.2) Runs Analytica in automation mode, in which every modal dialog that would otherwise block is answered automatically, so that an unattended run never stops waiting for a person. Each dialog is answered either by a built-in default, or by a handler function that the model or a library registers with RegisterAutomationModalHandler. This is intended for unattended and agent-driven runs, such as a benchmark driver, an automated QA run, or a session driven by an AI coding agent through the MCP server in Analytica.
    This is not a headless mode. The user interface, diagram windows, HTML dialogs, and Assista all remain fully alive and usable; only the blocking dialogs are answered for you. The splash screen is suppressed, as with /nosplash, and no recovery file is written, as with /Autosave=0 (give /Autosave=1 explicitly to keep auto-recovery on).
    Some built-in defaults are deliberately conservative so that an unattended run cannot damage the model it is testing. In particular, "Save changes?" is answered No, so the model file on disk is never written when the process exits. File open and save prompts fail rather than choosing a file, unless a registered handler supplies a path.
    For the full list of defaults, how to write and register a handler, and worked examples of driving Analytica this way, see Analytica Command Line/Automation.
    Example usage: Analytica.exe /Automation /lib:BenchmarkDriver.ana MyModel.ana
  • /AutomationTrace:filename: (new to Analytica 7.2) Writes a log of every modal dialog to filename, in JSON Lines format (one JSON object per line). Each dialog record names the kind of dialog, its caption and body text, the buttons it offered, the answer that was given, and where that answer came from. Records are appended, so a driver can pre-create the file and tail it while the run proceeds, and each record carries the process id so that concurrent runs remain distinguishable.
    Used together with /Automation, this records what automation answered. Used without /Automation, it is an observe mode: dialogs appear and behave completely normally, and the log records what the user actually chose. This is a convenient way to inventory which dialogs a scenario poses before you automate it.
    A relative filename is resolved against the directory the process was launched from. If the file cannot be opened, Analytica starts normally and simply produces no log.
    Example usage: Analytica.exe /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana

These two options place the main Analytica application window explicitly, instead of using the size and position that Analytica saved when it last exited. They are intended for benchmark automation and automated QA, where the window needs to be the same from one run to the next, or needs to be somewhere predictable.

  • /WindowSize:«width»,«height»: (new to Analytica 7.2) Sets the size of the main application window, in screen pixels.
    Example usage: Analytica.exe /WindowSize:1000,600
  • /WindowXY:«x»,«y»: (new to Analytica 7.2) Sets the position of the top left corner of the main application window, in screen coordinates. On a computer with more than one monitor, these coordinates can be negative, or larger than the size of the primary monitor, to place the window on another monitor.
    Example usage: Analytica.exe /WindowSize:1000,600 /WindowXY:-1000,100

Either option can be used without the other. The one you leave out keeps the value that was saved when Analytica last exited.

The window is placed exactly where you ask for it. Unlike a position restored from a previous session, it is not nudged back onto a monitor, so a window that falls partly or entirely off screen stays where you put it. These options also take precedence over a maximized state saved from the previous session, and over the Run: Maximized setting of a Windows shortcut, so that the size you ask for is never ignored.

The geometry given on the command line is not saved back to the registry when Analytica exits. An automated run that uses these options therefore leaves the window size and position of your own interactive sessions undisturbed.

The size is that of the visible window frame. Windows surrounds that frame with an invisible drop shadow, so a script that measures the window using GetWindowRect sees a few extra pixels on each side, while DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS reports exactly the size that was requested.

A value that is not two whole numbers, or a width or height that is not positive, produces the Unrecognized command line parameter warning and that option is ignored.

  • /Autosave=0 or /Autosave=1: (new to Analytica 7.2) Turns the Maintain recovery info preference off or on for this process only, without changing the stored preference. That preference controls the incremental autosave that lets Analytica offer to recover unsaved changes after a crash. With /Autosave=0, no recovery file is written while the process runs, so if the process is killed rather than closed, the next launch does not stop at the "recover unsaved changes?" dialog. With /Autosave=1, recovery information is maintained for the session even when the preference is off (in editions that support auto-recovery). A bare /Autosave means /Autosave=1; the spellings /Autosave:0 and --autosave=0 are also accepted.
    Example usage: Analytica.exe /Autosave=0 MyModel.ana
    When /Automation is given and /Autosave is not, /Autosave=0 is implied: an automated run is usually killed rather than closed, and would otherwise leave a recovery record behind for the next interactive launch to ask about. Give /Autosave=1 explicitly if an automated run needs auto-recovery on.
    While the option is in effect, the Maintain recovery info checkbox in the Preferences dialog shows the effective state but is disabled. Recovery records left behind by earlier sessions are still offered at startup as usual; the option only controls whether this process writes one. A value other than 0 or 1 produces the Unrecognized command line parameter warning and the option is ignored.

Command line options for libraries

new in Analytica 7.2

An option that begins with a double minus, --, and that is not one of the options listed above, does not produce the Unrecognized command line parameter warning. Analytica ignores it and passes it through, so that a library or a model can read it. This lets a library define command line options of its own without having to be built into Analytica. For example:

Analytica.exe --AssistaURL:"https://aaia.analytica.com/staging" --OpenAssista MyModel.ana

A library reads them with GetProcessInfo:

GetProcessInfo("Command line:--AssistaURL") → 'https://aaia.analytica.com/staging'
GetProcessInfo("Command line:--OpenAssista") → True
GetProcessInfo("Command line:--NotGiven") → Null
GetProcessInfo("Command line parameters") → ['--AssistaURL', '--OpenAssista']

The value of such an option is the text that follows its colon or equal sign, and it must be quoted when it contains a space. An option that appears with no value reads as True, and an option that is not on the command line at all reads as Null, so a library can tell those two apart. A value always comes back as text, even when it looks like a number, so use ParseNumber when you want a number. When the same option appears more than once, the last occurrence is the one reported.

Because Analytica accepts any unrecognized -- option silently, a misspelled one is simply ignored rather than reported. GetProcessInfo("Command line parameters") returns the list of -- options that actually arrived, which is how a driver or library can check that it was passed what it expected.

The -- options are not copied into the file names that Analytica opens, and they are not case-sensitive. When reading one, the leading dashes are optional, so GetProcessInfo("Command line:AssistaURL") finds it as well.

This mechanism is available in Analytica.exe, in ACP (Suan.exe) and in ADE. In ADE the command line is the one belonging to the host process that loaded ADE, which is the same command line that GetProcessInfo("Command line") reports.

Accessing the Command line from a model

The expression GetProcessInfo('Command line') returns the command line used to launch the process.

See also

Comments
Loading comments...