 <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.analytica.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lchrisman</id>
	<title>Analytica Docs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.analytica.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lchrisman"/>
	<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php/Special:Contributions/Lchrisman"/>
	<updated>2026-08-18T05:32:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.2%3F&amp;diff=64276</id>
		<title>What's new in Analytica 7.2?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.2%3F&amp;diff=64276"/>
		<updated>2026-08-17T20:26:46Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Analytica 7.2 is currently under development, and will be a future release of Analytica. The current official release is [[Analytica 7.1]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.2.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_6.6%3F&amp;diff=64275</id>
		<title>What's new in Analytica 6.6?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_6.6%3F&amp;diff=64275"/>
		<updated>2026-08-17T20:25:49Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:What's new pages]]&lt;br /&gt;
[[category:Analytica releases]]&lt;br /&gt;
&amp;lt;!--This page lists new features in release 6.6, which is currently in beta testing prior to final release. Analytica 6.6 is currently in [[Beta Tester Page|Beta Testing]].  If have have an active subscription license, we encourage you to try it out from the [[Beta Tester Page]].--&amp;gt;&lt;br /&gt;
This page lists new features in release 6.6 (not the current release) of Analytica (including [[ACP]] and [[ADE]]) since the previous [[Analytica 6.5]] release. &lt;br /&gt;
&lt;br /&gt;
Analytica normally prompts you to download and install the new release the next time you run it.&lt;br /&gt;
If not, you can download it from [https://analytica.com/users/renew-upgrade/ Renew, upgrade or download].&lt;br /&gt;
&lt;br /&gt;
== Highlights of 6.6 ==&lt;br /&gt;
&lt;br /&gt;
* [[#Assista|Assista]], the Analytica AI Assistant, is faster and more reponsive.&lt;br /&gt;
* The [[#Keelin Metalog distribution 2.0|Keelin (or Metalog) distribution]] is now the preferred method to define any continuous distribution, because it now avoids the occasional infeasibility problem that previously bedeviled it.&lt;br /&gt;
* You can select [[#Diagrams and controls|All in Checkboxes]] for parametric analysis  and in Multichoice.&lt;br /&gt;
* You can use [[Links_or_URL_in_model_attributes#Extended_HTML_markup| html to set text styles in text nodes]], including bold, italic, underline, bold, colors, bullets, and more in desktop Analytica. Even more html tags work in ACP.&lt;br /&gt;
* [[#Expression language|Sum(x, All) sums over All indexes of x]]. Similar for Min, Max, Product, and more.&lt;br /&gt;
* The new [[OAuth2Authorize]] function lets you access web services, such as Google docs, sheets, Salesforce, etc to read or write data.&lt;br /&gt;
* You can specify a [[#Graphing|Fill origin for graphs]] to let you show colored bands around the center line -- e.g. for probability bands over time.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
* The chat UI is faster. Responses start streaming sooner.&lt;br /&gt;
* You can use the Enter key (or Ctrl+Alt) to submit responses without having to click to submit button. The Return key adds a new line (the behavior elsewhere in Analytica).  If you have the [[Preferences_dialog#Personal_Preferences|Use Return to enter data]] preference set, then the Return key will submit responses and the Enter key adds a new line.&lt;br /&gt;
&lt;br /&gt;
== Keelin Metalog distribution 2.0 ==&lt;br /&gt;
Introducing the '''''always feasible''''', [[Keelin|infinitely flexible distribution]]!&lt;br /&gt;
&lt;br /&gt;
The  [[Keelin (MetaLog) distribution]] has become popular due to its ability to closely match the shapes of all the standard continuous distributions as well as offering enormous flexibility in matching amost any shape. But up until now it has been plagued by finding some parameter combinations ''infleasible'',  so it would sometimes fail t to find a valid distribution to fit.&lt;br /&gt;
&lt;br /&gt;
[[Analytica 6.6]] fixes this problem with the MetaLog 2.0 distribution. It includes many new results from &lt;br /&gt;
* Manel Baucells, Lonnie Chrisman, Thomas W. Keelin and Stephen Xu (2025), &amp;quot;[https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5279416 On the properties of the Metalog distribution]&amp;quot; (preprint), forthcoming.&lt;br /&gt;
&lt;br /&gt;
New features include:&lt;br /&gt;
* The resulting [[Keelin (MetaLog) distribution]]s are ''always'' feasible.&lt;br /&gt;
* There are closed-form analytic expressions for all central and standardized moments (see [[KeelinPropertyFromA#Basic_statistics_and_moments]]). &lt;br /&gt;
* There is a closed-form analytic expression for partial expectation (see [[KeelinPropertyFromA#Partial_expectation]]). This makes the Keelin distribution especially convenient for many problems that use piecewise-linear transformations of an uncertain quantity.&lt;br /&gt;
* It uses the superior basis order of the MetaLog 2.0.&lt;br /&gt;
* You can also specify the desired «mean», in addition to «values» (data points).&lt;br /&gt;
* New set of functions with names of the form &amp;lt;code&amp;gt;&amp;lt;x&amp;gt;KeelinFromA(...)&amp;lt;/code&amp;gt;use the «a» coefficient vector from [[KeelinCoefficients]]:&lt;br /&gt;
** &amp;lt;code&amp;gt;[[KeelinFromA]](...)&amp;lt;/code&amp;gt; -- analog to &amp;lt;code&amp;gt;[[Keelin]](...)&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;[[DensKeelinFromA]](...)&amp;lt;/code&amp;gt; -- analog to &amp;lt;code&amp;gt;[[DensKeelin]](...)&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;[[CumKeelinFromA]](...)&amp;lt;/code&amp;gt; -- analog to &amp;lt;code&amp;gt;[[CumKeelin]](...)&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;[[CumKeelinInvFromA]](...)&amp;lt;/code&amp;gt; -- analog to &amp;lt;code&amp;gt;[[CumKeelinInv]](...)&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;[[KeelinPropertyFromA]](...)&amp;lt;/code&amp;gt; -- ''new to [[Analytica 6.6]]''&lt;br /&gt;
*:When using the Keelin distribution,  you can either use a quantile parameterization or an «a»-vector parameterization. These new functions make it clearer that you are using the «a»-vector parameterization, instead of using the original (analogous) functions with a special flag. &lt;br /&gt;
* A new option uses a [https://docs.analytica.com/index.php?title=Keelin_(MetaLog)_distribution&amp;amp;anarelease=6.6#Using_direct_method_for_bounds direct method for bounded support] as an alternative to the previous [https://docs.analytica.com/index.php?title=Keelin_(MetaLog)_distribution&amp;amp;anarelease=6.6#Using_the_Transform_method_for_bounds transform-method for bounded support].&lt;br /&gt;
&lt;br /&gt;
== Diagrams and controls ==&lt;br /&gt;
* [[Checkbox]] now has an &amp;quot;include ALL&amp;quot; option, enabling [[Parametric analysis]] even with a checkbox.&lt;br /&gt;
* [[Multichoice]] controls include a new option at the top to ''select '''all''''', ''select '''none''''' or ''select '''first''''', depending on the context. These are more obvious to the user than using the &amp;lt;code&amp;gt;Ctrl+A&amp;lt;/code&amp;gt; key.&lt;br /&gt;
* A text node can display several [[Links_or_URL_in_model_attributes#Extended_HTML_markup|new html formatting options]], including changes to text color, bullets and numbered lists.&lt;br /&gt;
* A new [[ChangeNodeVisibility|node visibility option]] lets you hide a node while Analytica is computing.&lt;br /&gt;
&lt;br /&gt;
== Expression language ==&lt;br /&gt;
* There is a new separate &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; data type. To preserve backward compatibility, the values continue to display as 0 or 1, but the [[Number format dialog]] provides an option to display values with the boolean data type as True or False to distinguish them from 0 and 1. &lt;br /&gt;
* You can now find the maximum over all indexes of &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; using &lt;br /&gt;
*::&amp;lt;code&amp;gt;[[Max]](X, All)&amp;lt;/code&amp;gt; &lt;br /&gt;
*:as a shortcut for &lt;br /&gt;
*::&amp;lt;code&amp;gt;[[Max]]( X, ...[[IndexesOf]](X) )&amp;lt;/code&amp;gt;&lt;br /&gt;
*:which uses [[Repeated parameter forwarding]]. The &amp;lt;code&amp;gt;All&amp;lt;/code&amp;gt; keyword works for these array-reducing functions, [[Sum]],  [[Min]], [[BitAnd]], [[BitOr]] and [[BitXOr]].&lt;br /&gt;
* If you write your own function, and want it to accept the keyword &amp;lt;code&amp;gt;All&amp;lt;/code&amp;gt; for a repeated index parameter, you can include a new &amp;lt;code&amp;gt;OrAll&amp;lt;/code&amp;gt; [[Function parameter qualifiers|function parameter qualifier]].&lt;br /&gt;
* When passing a [[Local function]] (aka '''lambda function''') as a parameter to a function call, you no longer have to include a function name (which wasn't used anyway).&lt;br /&gt;
* You can use '.. operator ([[Repeated parameter forwarding]]) on literal lists to &amp;quot;splat&amp;quot; lists (or 1-D arrays) together into the list. Example:&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Local]] s1 := 'c'..'f', s2 := 'h'..'k' Do [ 'a', 'b', ...s1, 'g', ...s2, 'l' ]&amp;lt;/code&amp;gt;&lt;br /&gt;
*::&amp;amp;rarr; &amp;lt;code&amp;gt;['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* [[OAuth2Authorize]]: A new function to log into web services such as Google docs, sheets, Salesforce, etc., which makes it much easier for Analytica models to access (read from or write to) web applications that require authentication.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[TypeOf]](x, shallow: True)&amp;lt;/code&amp;gt; now returns &amp;lt;code&amp;gt;&amp;quot;Image&amp;quot;&amp;lt;/code&amp;gt; when &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is an image.&lt;br /&gt;
* When &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is an image, &amp;lt;code&amp;gt;f&amp;quot;{x:H}&amp;quot;&amp;lt;/code&amp;gt; returns the long hex string that appears in a [[Pict]] attribute in a model file (but without the parens around it that appear in the model file).&lt;br /&gt;
* [[ReadTextFile]] returns the file encoding as its fourth return value.&lt;br /&gt;
* [[RunConsoleProcess]] is able to launch several applications that it previous could not, including PowerShell.&lt;br /&gt;
* New syntactic extensions added to the [[Arrow_operator#x_.E2.86.92_.5Bi.5D|arrow operator]], namely   &amp;lt;code&amp;gt;x&amp;amp;rarr;[n]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;x&amp;amp;rarr;[m..n]&amp;lt;/code&amp;gt; for [[Text values]] and [[In-memory binary data terms]].&lt;br /&gt;
&lt;br /&gt;
== File saving and loading ==&lt;br /&gt;
* '''Add Library...''' defaults to ''Link to filed module or library'' for almost all the standard libraries, which is the preferred way to add libraries to your model. (Except it still defaults to ''Embed a copy'' for the [[ACP Style Library]] since that library acts more module-like and changes its internal state).&lt;br /&gt;
* You can now set the [[Att_Dirties]] attribute (to 0) for your own user Variables. When set to 0, a change to the Definition doesn't dirty the Library or module that contains the Variable.&lt;br /&gt;
&lt;br /&gt;
== Example models and libraries ==&lt;br /&gt;
* A new example model included: &amp;lt;code&amp;gt;&amp;quot;Engineering / Generator availability.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* An able to handle file paths &amp;gt; 256 characters in most cases. Actually taking advantage of this requires you to have long paths enabled in Windows, e.g., by setting the registry setting&lt;br /&gt;
*::&amp;lt;code&amp;gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem :: LongPathsEnabled = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
*:or  by using the &amp;lt;code&amp;gt;\\unc\.... &amp;lt;/code&amp;gt; syntax for file paths. However, long file paths are not supported by Microsoft One drive or by Microsoft office, including Excel, so you cannot use long paths for files within a One drive folder or when opening a spreadsheet file.&lt;br /&gt;
* Several of the diagram themes in the [[Themes Library]] were renamed. &lt;br /&gt;
&lt;br /&gt;
== Graphing ==&lt;br /&gt;
* For Filled-area charts, in '''Graph set up''' you can now set the '''Fill type''' to &amp;quot;From origin&amp;quot;., and then select the '''Fill origin''' in the graph. A common use is in probability bands plot to select &amp;lt;code&amp;gt;.Probability=0.5&amp;lt;/code&amp;gt; as the fill origin, to produce a plot like this:&lt;br /&gt;
*:::[[image:filled_bands_plot.png]]&lt;br /&gt;
*: You could previously do this by placing the [[Plot solid prob bands]] function in the [[OnGraphDraw]] attribute, but the new feature is much easier to configure, with just a few clicks in the [[Graph setup dialog]].&lt;br /&gt;
* '''Graph Setup / Text / Adapt displayed font sizes to graph height''' now uses the current height of the  graph window you were viewing as the reference height, so that the font sizes you select in the graph setup dialog will be correct when the graph is at that height.  Font sizes automatically adjust when you change the graph window size. Previously the reference height was fixed at the default result window height (a graph of 241 pixels tall), which tended to make the fonts way too large for normal window heights.  We now recommend using this setting by default so that text on graphs is easily legible at various sizes.&lt;br /&gt;
&lt;br /&gt;
== Other GUI ==&lt;br /&gt;
* There are a few new options on the '''Windows''' menu:&lt;br /&gt;
** Bring next window to front &lt;br /&gt;
** Bring previous window to front&lt;br /&gt;
** [[Typescript window|Typescript console]] to show the Typescript window. (Still also available with ctrl+'.)&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
* [[ParseJSON]] and [[MakeJSON]] no longer require {{Analytica Enterprise}}.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64274</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64274"/>
		<updated>2026-08-17T20:25:19Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Live with 7.1 release.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is the current official release of Analytica. This page lists features that were added since the previous [[Analytica 7.0]] release.&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most visible improvement is in [[#Assista|Assista]], Analytica's A.I. helper.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest version is so much smarter and more reliable, you may find chatting with Assista is the main way you interact with Analytica. Of course, the familiar influence diagram interface is still there when you need it. But now Assista is pretty good at drawing diagrams and writing Analytica expressions. &lt;br /&gt;
&lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' is faster and more responsive, with a new look and feel, and clear formatting of responses. Leave it within the Analytica window, or move it anywhere on your screen(s) to make best user of screen space.&lt;br /&gt;
* You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
* Click the microphone button to speak your request. Click it again when you're done.&lt;br /&gt;
* Selected objects in the Analytica window stay selected as you type into Assista, so you can refer to them as &amp;quot;this variable&amp;quot; and so on.&lt;br /&gt;
* It  shows its &amp;quot;thinking&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
* It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI (saved on your local computer, not on our server).&lt;br /&gt;
&lt;br /&gt;
On the '''backend,''' Assista has:&lt;br /&gt;
* A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
* An extensible set of '''skills (competencies)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
* You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand its capabilities, or ask it to create new skills for you.&lt;br /&gt;
&lt;br /&gt;
Assist can now:&lt;br /&gt;
* '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
* ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
* '''Create images and node icons''' in your model.&lt;br /&gt;
* '''Read from URLs''' that you explicitly point it to (or drag into the chat)&lt;br /&gt;
* Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
* '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
* '''Personalize tone''', style, level of verbosity and provide custom instructions. Click the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
* '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs, and influence diagrams from your model and formatted equations.&lt;br /&gt;
* '''Take you through a tutorial''' of how to use Analytica for new users.&lt;br /&gt;
&lt;br /&gt;
== More languages: Spanish UI ==&lt;br /&gt;
&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. The installer runs with a Spanish UI by default when you are in a Spanish-language region.  &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
You may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== CSV files and Spreadsheets ==&lt;br /&gt;
&lt;br /&gt;
Import data&lt;br /&gt;
&lt;br /&gt;
* You can drag and drop a CSV file onto the diagram (it does the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
* You can drag and drop a CSV file, spreadsheet, or even a PDF or Doc containing tables into the Assista Window. Assista can then extract the tables and add them as&lt;br /&gt;
* If you launch Analytica from command line, you can include a CSV file as a parameter: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanded Spreadsheet functions:&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Preface a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] to add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Also works with Excel and LibXl backends.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== User Interface ==&lt;br /&gt;
&lt;br /&gt;
* The frames of Windows (the &amp;quot;chrome&amp;quot;,  aka the &amp;quot;non-client area&amp;quot;) now use the Windows 11 stylse -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, and plain (text-like) button images in the toolbar.&lt;br /&gt;
* The [[Outline window]] is now docked on the left of the Anallytica Window, and won't overlap other windows.&lt;br /&gt;
* The '''Node Icon editor''' (on the Diagram menu) is far more powerful. You can use it to edit arbitrary node images, with color and transparency.&lt;br /&gt;
* New keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* The new '''Use as default arrow style''' on the right-click menu for an influence diagram arrow lets you set model defaults arrows styles, such as thickness and color.&lt;br /&gt;
* When your model uses a [[Modules_and_Libraries#Filed_Module|filed module]] or [[Modules_and_Libraries#Filed_Module|filed library]], it auto-detects any  changes to the source file, and informs you, letting you update to (reload) the new version.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which file extensions show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server for LLMs ==&lt;br /&gt;
* You can install multiple ADE-based Mcp servers that run different ADE releases. For example, you could install two MCP servers into Claude Code to compare results for the same model across different releases:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The  &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explains how, with enough info for Claude code to configure this for you.  &lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
&lt;br /&gt;
There has been major internal restructuring and refactorization in this release. This shouldn't change functionality, but may improve speed and memory efficiency now, and more in future releases.&lt;br /&gt;
&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Reduced sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** Evaluation speeds of various functions and operations.&lt;br /&gt;
* When loading a large model, it parses expressions in parallel, using multiple threads/cores. On some computers on some models, this dramatically speed sup model load time.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
* [[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* SysVar [[Graph_ColorSequence]] replaces [[Graph_ColorSeq]] which is now deprecated. It contains a list of color integers with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the old version used a triple of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.0%3F&amp;diff=64273</id>
		<title>What's new in Analytica 7.0?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.0%3F&amp;diff=64273"/>
		<updated>2026-08-17T20:23:54Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:What's new pages]]&lt;br /&gt;
[[category:Analytica releases]]&lt;br /&gt;
&lt;br /&gt;
This page lists new features in [[Analytica 7.0]] since the previous [[Analytica 6.6]]. Its successor, [[Analytica 7.1]] has been released, making this a past (non-current) release.&lt;br /&gt;
&lt;br /&gt;
==Highlights of Analytica 7.0==&lt;br /&gt;
&lt;br /&gt;
* '''[[#Python integration|Python integration]]:''' The major enhancement is integration with Python and hence the entire Python ecosystem of libraries. You can easily call functions from Python libraries, access Python variables, and even write Python code right inside Analytica variables and functions. So now you can mix and match Analytica and Python according to which language you think best for your modeling or coding needs.&lt;br /&gt;
*  '''[[#Index label auto updates|Index label auto updates]]:''' A common source of errors has been when you change a text label in an Index without remembering to change expressions that refer to that same text label. Changes to labels now update automatically in expressions in most cases.&lt;br /&gt;
*  The '''Analytica Enterprise'''' edition has been renamed the [[#Developer Edition (formerly known as Enterprise) |Developer edition]], which better reflects what it is.&lt;br /&gt;
* It introduces two new object Classes:  &lt;br /&gt;
** [[Struct]] lets you bundle disparate values, like text, numbeers, atoms and arrays, together in one object that does not array abstract -- similar to Records and Classes in other languages).  &lt;br /&gt;
** [[Callable]] is like a user-defined Function but it's Definition can be a [[handle]] to a Python class or a Python function. &lt;br /&gt;
* [[ParseJSON]] and [[MakeJSON]] now use Structs, which are much more convenient for representing the hierarchical structure of JSON.&lt;br /&gt;
* [[#SpreadsheetOpen|Read and write spreadsheets without Excel]]:  This is faster and more robust, and you don't need Excel installed.&lt;br /&gt;
&lt;br /&gt;
== [[Using Python from Analytica|Python integration]] ==&lt;br /&gt;
&lt;br /&gt;
You can now write Python code inside Analytica definitions! It's easy to call Python functions, with Analytica-style Intelligent Arrays!. So you can access the vast ecosystem of Python libraries (''modules'' in Python lingo). Among the gazillion possibilities are specialized libraries for data visualization, statistics, machine learning, and much more.&lt;br /&gt;
It means that you can mix and match Analytica and Python -- write Analytica code for what's easiest in Analytica and Python code for what's easiest in Python.  &lt;br /&gt;
&lt;br /&gt;
See: [[Using Python from Analytica]]&lt;br /&gt;
(In [[Analytica Developer]] edition or better). &lt;br /&gt;
&lt;br /&gt;
For the Analytica modeler, this puts a ton of resources at your fingertips. &lt;br /&gt;
&lt;br /&gt;
It's also pretty cool for the Python developer. Analytica is like a new interactive development environment with a lot of unique advantages, especially during interactive code development:&lt;br /&gt;
* Analytica's dependency maintenance can be really convenient during interactive development, creating automatic dependency maintenance between your Python functions, classes and variables that don't exist in Python.&lt;br /&gt;
* The visual influence diagram layout can be a super useful to way organize and visualize your code.&lt;br /&gt;
* It naturally encourages declarative code practices, which leads to better and more maintainable coding style.&lt;br /&gt;
* You get the benefits of Analytica's edit tables, plus for results, Analytica's multi-D result tables and one-click, no-code, graphing.&lt;br /&gt;
* It is easy to wrap existing Python models to get Monte Carlo, parametric analysis and sensitivity analysis with Analytica ease.&lt;br /&gt;
* Sometimes one or the other language is more convenient for a particular task. You can freely switch between whichever language feels better suited to the immediate task, and intermix languages easily.&lt;br /&gt;
&lt;br /&gt;
== Developer Edition (formerly known as Enterprise) ==&lt;br /&gt;
&lt;br /&gt;
Analytica's middle-tier edition formerly known as the ''Enterprise Edition'', it is now called the [[Analytica Developer|Analytica Developer edition]]. That name better reflects what it is--software for developers of decision applications.  If you're now a user of Analytica Enterprise you don't have to update your license or do anything special. The name will just change when you install Analytica 7.0.  In Analytica docs, when you select &amp;quot;7.0&amp;quot; on the release bar (at the top of pages that have release-contingent content), all the docs automatically use the new Analytica Developer edition name. &lt;br /&gt;
&lt;br /&gt;
== Analytica language extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Index label auto updates ===&lt;br /&gt;
&lt;br /&gt;
When you change the identifier of a variable, Analytica automatically updates all Definitions to use the new name. But, when you change a text label in an Index, it previously caused an error in any Definition using that label. For example, if you have&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 Index Animal := ['Cat', 'Dog']&lt;br /&gt;
 Variable Sound := IF Animal = 'Cat' THEN 'Miaow' ELSE 'Woof'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you change &amp;lt;code&amp;gt; 'Cat'&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;'Feline' &amp;lt;/code&amp;gt; in Index &amp;lt;code&amp;gt;Animal&amp;lt;/code&amp;gt;, the Definition of &amp;lt;code&amp;gt;Sound&amp;lt;/code&amp;gt; will now automatically update to&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 IF Animal = 'Feline' THEN 'Miaow' ELSE 'Woof'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does this wherever it sees &amp;lt;code&amp;gt;Animal= 'Cat'&amp;lt;label&amp;gt;&amp;lt;/code&amp;gt;. If you use an index label in a context where the index doesn't normally appear, you should use the new [[Index-label dot syntax]] (&amp;lt;code&amp;gt;Animal . 'Cat'&amp;lt;/code&amp;gt;). By associating the label with its index it will automatically update when needed. These [[Keeping text literals consistent with index labels| features]] help you avoiding a common error when updating text labels in Indexes.&lt;br /&gt;
&lt;br /&gt;
=== Callable ===&lt;br /&gt;
&lt;br /&gt;
The new object [[Class]] [[Callable]] is a variable-like object, meaning it has a [[Definition]] and a computed value, but can be used for convenience and documentation when the computed value itself is something that can be called, such as a [[Local function]] (aka ''lambda function''), a [[handle]] to an global function, a Python class or a Python function.&lt;br /&gt;
&lt;br /&gt;
If you &amp;quot;compute&amp;quot; the identity of a callable data item inside a normal [[Variable]] instance, &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;, you could call it using the syntax &amp;lt;code&amp;gt;X-&amp;gt;(a,b,c)&amp;lt;/code&amp;gt;. On your influence diagram the object would have a rounded rectangle and thus would not communicate that the result is something that can be called. When you change its class to be a [[Callable]], you can then invoke the call using the syntax &amp;lt;code&amp;gt;X(a,b,c)&amp;lt;/code&amp;gt; and the shape of the node changes to something that resembles a function shape, thus communicating that this holds something that is callable.&lt;br /&gt;
&lt;br /&gt;
To create a callable, first create a [[Variable]] node, then use the [[Class]] dropdown from the [[Object window]] or [[Attribute pane]] to change the class to ''Callable''.&lt;br /&gt;
&lt;br /&gt;
=== Struct ===&lt;br /&gt;
A [[Struct]] defines a new atomic, immutable data type. For use when you need to bundle multiple heterogeneous items and don't want their dimensionalities to interact. Array abstract treats an instance of a Struct as a single cell (an atom).&lt;br /&gt;
&lt;br /&gt;
=== Expression and Lazy qualifiers ===&lt;br /&gt;
An expression passed to a function parameter declared with the qualifier as &amp;lt;code&amp;gt;[[Function_parameter_qualifiers#Expression|Expression]]&amp;lt;/code&amp;gt; can now include local variable identifiers. The local variables are captured (similar to how they would be captured by a [[Local function]]).&lt;br /&gt;
&lt;br /&gt;
A new function parameter qualifier, [[Function_parameter_qualifiers#Lazy]], has been added, which does lazy evaluation of the expression passed to it. In the function Definition, you can use it as if it were a normal value parameter, but evaluation occurs when the value is used rather than when the function is called, and in the evaluation context (which includes the [[Evaluation modes|evaluation mode]]) where the value is used instead as in the context of the call.&lt;br /&gt;
&lt;br /&gt;
=== Excess parameter qualifier ===&lt;br /&gt;
A new function declaration allows a function to tolerate or capture excess named parameters in the call that are not declared as parameter names in the function's Parameters declaration. It can also be used in a [[Struct]] declaration.&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== ParseJSON ===&lt;br /&gt;
Changed to parse to [[Struct]]s, thus greatly simplifying and improving the convenience of using JSON in Analytica expressions. &lt;br /&gt;
&lt;br /&gt;
For parsing with a schema, a Struct's declaration serves as the schema, which is far easier and more familiar for an Analytica user than the former scheme for specifying a schema.&lt;br /&gt;
&lt;br /&gt;
[[MakeJSON]] is able to generate JSON from a Struct (or nested structs) as well, which is the most convenient representation for JSON representations.&lt;br /&gt;
&lt;br /&gt;
=== SpreadsheetOpen ===&lt;br /&gt;
Added a new «backend» parameter to [[SpreadsheetOpen]] with a new option of &amp;lt;code&amp;gt;'LibXl'&amp;lt;/code&amp;gt;, allowing you to read and manipulate a spreadsheet without having Excel installed. But unlike the Excel backend, the &amp;lt;b&amp;gt;LibXl&amp;lt;/b&amp;gt; option does not have a calculation engine (so can't recompute cell formulas after you change cells). This option is be better when you simply want to read (or write) data in a *.xlsx file format.&lt;br /&gt;
&lt;br /&gt;
== Example models and libraries ==&lt;br /&gt;
&lt;br /&gt;
* There is a new &amp;quot;Auto insurance claim risk analysis.ana&amp;quot; in the Example Models / Risk Analysis folder.&lt;br /&gt;
* The [[Mutables library]] has been updated. It provides a new [[Mutable]] [[Struct]] which is superior to the older representation, which displays the actual value in result table cells and is atomic. The legacy functions ([[MutableNew]], [[MutableSet]] and [[MutableGet]]) are still there for backward compatibility, but have been changed to just wrap the new Mutable.&lt;br /&gt;
&lt;br /&gt;
== Result tables and graphs ==&lt;br /&gt;
* A blank (none) entry was added to the [[XY_comparison#Use_comparison_index|comparison index pulldown]]. Use this to quickly unset the comparison index without having to re-enter the [[XY_comparison]] dialog. Also, the pulldown is now visible and enabled in browse mode.&lt;br /&gt;
* Comparison variables are no longer summed over slicer indexes that are set to '''Totals''' when the value for that variable does not include the slicer index. Note that this results in some changes to what is displayed in table body cells and in axis scaling on graphs.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
&lt;br /&gt;
You can now copy-paste from Expression blocks in Assista's response using the little copy icon in the top-right corner of the expression block.&lt;br /&gt;
&lt;br /&gt;
== Experimental ==&lt;br /&gt;
* A way for an Analytica model running in desktop Analytica to [[MCP server in Analytica|act as a Model Context Protocol (MCP) server]] for use by Large Language Models (LLMs).&lt;br /&gt;
&lt;br /&gt;
== ADE ==&lt;br /&gt;
* Added a new example: &amp;lt;code&amp;gt;Mcp_server&amp;lt;/code&amp;gt;.  This is an MCP server that wraps ADE. Among other things, it can give AI agents like Claude Code the ability to build, explore and use Analytica models.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Docs&amp;diff=64272</id>
		<title>Analytica Docs</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Docs&amp;diff=64272"/>
		<updated>2026-08-17T20:21:43Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* What's new in Analytica 7.1? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
LLM Usage License:&lt;br /&gt;
You are welcome to crawl, store, analyze, and train on any publicly accessible pages of this site.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Analytica Docs]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 90%&amp;quot;&lt;br /&gt;
|style=&amp;quot;width: 100%;border: 1px solid #ffffff;background-color:#ffffff; text-align:center;&amp;quot; |&lt;br /&gt;
[[File:Splashero.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; border: 1px solid #ffffff&amp;quot;&lt;br /&gt;
|style=&amp;quot;width: 33%;border: 1px solid #ffffff;padding: 10px; background-color:#ffffff;vertical-align:top;&amp;quot;|&lt;br /&gt;
&amp;lt;big&amp;gt;'''About'''&amp;lt;/big&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
These '''Analytica docs''' include a rich variety of [[Tutorial|tutorials]], [[User Guide|user guides]], example models, and reference materials. You can explore what's available in the '''Docs contents''' -- the  expandable outline on the left of this and every page.&lt;br /&gt;
&lt;br /&gt;
[[What are these Analytica docs?]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|style=&amp;quot;width: 33%;border: 1px solid #ffffff;padding: 10px; background-color:#ffffff;vertical-align:top;&amp;quot;| &lt;br /&gt;
&amp;lt;big&amp;gt;'''Analytica'''&amp;lt;/big&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Open these docs from Analytica]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Edit and improve these docs]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[What's new|What's new in the latest release?]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[What's new in ACP?]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Editions of Analytica|Compare editions]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://analytica.com/products/free/ Download Analytica Free Edition]&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://analytica.com/analytica-downloads/ Download Analytica and ADE]&amp;lt;br /&amp;gt;&lt;br /&gt;
|style=&amp;quot;width: 33%;border: 1px solid #ffffff;padding: 10px; background-color:#ffffff;vertical-align:top;&amp;quot;|&lt;br /&gt;
&amp;lt;big&amp;gt;'''Getting Started'''&amp;lt;/big&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Analytica Tutorial|Tutorial]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Building Effective Models]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Creating Lucid Influence Diagrams]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Indexes and arrays: An introduction|Intro to Indexes and Arrays]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Example Models and Libraries]]&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[What's new in Analytica 7.1?|What's new in the latest release of Analytica?]]==&lt;br /&gt;
&lt;br /&gt;
=What if you don't read docs or tutorials?=&lt;br /&gt;
&lt;br /&gt;
If you want to use Analytica but don't want to spend time reading these docs, you're in luck!&lt;br /&gt;
Start up Analytica and open Assista -- the AI collaborator. You can ask it anything about Analytica. Or you can just ask it to help you build your model. And you can learn Analytica in the process.&lt;br /&gt;
&lt;br /&gt;
==Recent additions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 100%;vertical-align:top;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot; style=&amp;quot;width: 50%;vertical-align:top;&amp;quot;| &amp;lt;big&amp;gt;[[Assista]]&amp;lt;/big&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
Analytica's new AI assistant has a conversational interface to answer questions about Analytica and your model. It can even help you build your model and write Analytica expressions. It makes modeling much faster and more convenient.  Learn more at [[Assista]].&lt;br /&gt;
&lt;br /&gt;
|[[Database library]]: A library of functions to make it easy to create, read, update, examine and delete database tables, without having to write SQL.&lt;br /&gt;
|-&lt;br /&gt;
|[[Themes Library]]: Use the Themes Library to quickly update your diagram and graph styles with some new and updated preset themes!&lt;br /&gt;
|-&lt;br /&gt;
|[[Weibull estimation library]]: Functions to generate and estimate Weibull distributions for lifespan or time to failure from data.&lt;br /&gt;
|[[Why Analytica doesn't need Map and Reduce functions]]  Analytica's Intelligent Arrays mean that you can operate on arrays directly, without needing to use these functions, or even know what they are.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Template:ReleaseBar&amp;diff=64269</id>
		<title>Template:ReleaseBar</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Template:ReleaseBar&amp;diff=64269"/>
		<updated>2026-08-17T15:54:41Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Change default to 7.1 for the 7.1 release.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#svarset:anarelease|{{#urlget:anarelease|{{#svarget:anarelease|7.1}}}}}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#svarset:show_full|&lt;br /&gt;
  {{#ifexpr: {{#isReleaseBetween:1.0|{{#svarget:anarelease}}|5.9}} |1|}}&lt;br /&gt;
}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#switch:{{#svarget:anarelease}}&lt;br /&gt;
| 4.6 =&lt;br /&gt;
| 5.0 =&lt;br /&gt;
| 5.1 =&lt;br /&gt;
| 5.2 =&lt;br /&gt;
| 5.3 =&lt;br /&gt;
| 5.4 =&lt;br /&gt;
| 6.0 =&lt;br /&gt;
| 6.1 =&lt;br /&gt;
| 6.2 =&lt;br /&gt;
| 6.3 =&lt;br /&gt;
| 6.4 =&lt;br /&gt;
| 6.5 =&lt;br /&gt;
| 6.6 =&lt;br /&gt;
| 7.0 =&lt;br /&gt;
| 7.1 =&lt;br /&gt;
| 7.2 =&lt;br /&gt;
| #default = {{#svarset:anarelease|7.1}}&lt;br /&gt;
}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{|class=&amp;quot;release-table&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
!  Release:&lt;br /&gt;
| &lt;br /&gt;
{{#if: {{#svarget:show_full}}&lt;br /&gt;
| &amp;lt;!-- SHOW COMPLETE LIST --&amp;gt;&lt;br /&gt;
{{ReleaseBarItem|4.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.5|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.2|{{#svarget:anarelease}}}}&lt;br /&gt;
| &amp;lt;!-- COLLAPSED VIEW --&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-rbar&amp;quot; style=&amp;quot;cursor:pointer;&amp;quot;&amp;gt;…&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;mw-customcollapsible-rbar&amp;quot;&lt;br /&gt;
        class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
        style=&amp;quot;display:inline;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;•&amp;amp;nbsp;{{ReleaseBarItem|4.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;/span&amp;gt;&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.5|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.2|{{#svarget:anarelease}}}}&lt;br /&gt;
}}&lt;br /&gt;
|}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#svarset:anamajor|{{#expr:floor{{#svarget:anarelease|7.1}}}}}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To display a release bar at the top of a page, insert the following at the top:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{ReleaseBar}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You must have a Release Bar visible for a &amp;lt;nowiki&amp;gt;{{Release|startVer|endVer|content}}&amp;lt;/nowiki&amp;gt; macro to work properly within the page.&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Additional_libraries&amp;diff=64259</id>
		<title>Additional libraries</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Additional_libraries&amp;diff=64259"/>
		<updated>2026-08-14T17:58:09Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Add the Salesforce REST library to the data-source libraries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Function libraries]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page describes a set of useful Analytica function libraries.  These are ''additional'' to the [[Standard libraries]] that are automatically installed when you install Analytica.  If you want to use any of these additional libraries, click on its link and it will download onto your computer. Depending on your download settings, it may automatically open it in Analytica. Either way, you should save it into a directory so that you can add it into your models.  It's usually most convenient to save it with your [[Standard libraries]] in directory&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;C: \Program Files\Lumina\Analytica {{#svarget:anarelease|6.5}}\Libraries&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then easily add it into your models using the standard menu option '''Add Library...''' from the [[File menu]].&lt;br /&gt;
&lt;br /&gt;
See [[User-defined Functions and Libraries]] to build your own functions and libraries.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Misc. libraries ==&lt;br /&gt;
=== Large Sample Library ===&lt;br /&gt;
'''Download:''' [[media:Large_Sample_Library_v10.ana]]&lt;br /&gt;
&lt;br /&gt;
:[[image:Large sample library.png]]&lt;br /&gt;
&lt;br /&gt;
The [[Large Sample Library: User Guide|Large Sample Library]] is an Analytica library that lets you run a Monte Carlo simulation for large models or a large sample size that might otherwise exhaust computer memory, including virtual memory. It breaks up a large sample into a series of batch samples, each small enough to run in memory. For selected variables, known as the Large Sample Variables or LSVs, it accumulates the batches into a large sample. You can then view the probability distributions for each LSV using the standard methods — confidence bands, [[PDF]], [[CDF]], etc. — with the full precision of the large sample.&lt;br /&gt;
&lt;br /&gt;
See [[Large Sample Library: User Guide]].&lt;br /&gt;
&lt;br /&gt;
===The Sensitivity Analysis Library===&lt;br /&gt;
[[The Sensitivity Analysis Library]] provides functions for analyzing the sensitivity of an output to each cell of each array-valued chance input, and locating those individual scalar inputs that have the greatest impact on the result.  See [[The Sensitivity Analysis Library]] for documentation on using this library.  &lt;br /&gt;
&lt;br /&gt;
The library itself can be downloaded from [[media:Sensitivity Analysis Library.ana|Sensitivity Analysis Library.ana]], and an example model to demonstrate its usage is at [[media:Sensitivity Functions Examples.ana|Sensitivity Functions Examples.ana]].&lt;br /&gt;
&lt;br /&gt;
=== Model Documentation Library ===&lt;br /&gt;
'''Download: ''' [[media:Model Documentation Library.ana|Model Documentation Library.ana]]&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites:''' [[Analytica 5.0]] or later. The [[Preferences_dialog|Domain acts as self index]] legacy preference must be OFF. You must be using [[Diagram_Style_dialog|ClearType text]] (not the very old non-clearType legacy setting).&lt;br /&gt;
&lt;br /&gt;
Some people like to create a concise report on paper that contains all objects in their model along with descriptions or other selected attributes.  The &amp;quot;Print Report&amp;quot; feature in Analytica can be used for this purpose, but is not at all concise and ends up placing each object window on a separate page.  The ''Model Documentation Library'' allows you to select a module from your model and produce a result table containing every object within that module with its selected attributes such as title, description, units, definition, or user-defined attributes.  This table can then be exported to Excel where you can format it nicely and print it.  Thus, you can end up with a very concise report on paper.&lt;br /&gt;
&lt;br /&gt;
To use this library, load your model and then select '''File &amp;amp;rarr; Add Module...'''.  Add the [[media:Model Documentation Library.ana|Model Documentation Library.ana]] module file using Embed.  In that module, using the pulldown, select the top-level module for the report.  Follow the instructions shown on the diagram.  If you make changes to your model later, press the ''Update Model Documentation'' button to adjust the pulldown content.&lt;br /&gt;
&lt;br /&gt;
=== [[Units Conversion Library]] ===&lt;br /&gt;
'''Download: ''' [[media:Units conversion library.ANA|Units conversion library.ana]]&lt;br /&gt;
&lt;br /&gt;
These functions convert between different units -- for example, from feet to kilometers, or from Btu (British thermal units) to gigajoules of energy.  They  relieve you from having to look up conversion factors. They also make your model more transparent by making it clear where you are converting from one units to another -- instead of just embedding conversion constants in the formulas. &lt;br /&gt;
&lt;br /&gt;
[[File:Units conversion library.png|600px]]&lt;br /&gt;
&lt;br /&gt;
You can use the '''Conversion example''' section to enter a quantity, select its type (dimensions) and units, and convert it to another unit of that type.&lt;br /&gt;
&lt;br /&gt;
====Library functions====&lt;br /&gt;
&lt;br /&gt;
'''Units_factor'''(oldUnits, newUnits) to give a conversion factor between two units.&lt;br /&gt;
If you omit newUnits, it will assume the standard units for that type (dimensions).&lt;br /&gt;
The units parameters text values must match an abbreviation, synonym, or full name (case insensitive) in the Units data table.&lt;br /&gt;
If the units are of different dimensions, e.g. energy and power, or if it doesn't recognize the units, it will give an error.&lt;br /&gt;
&lt;br /&gt;
'''Units_conversion'''(x, oldUnits, newUnits) returns the value of quantity x converted from oldUnits to newUnits. This works for units like temperature, where simple factors don't work.&lt;br /&gt;
&lt;br /&gt;
'''Units_real_dollars'''(yr, baseYr) returns a multiplication factor used to convert nominal dollars in year yr to real (also known as constant) dollars using baseYr as the base year. If you omit baseYr, it uses the &amp;quot;Standard base year for inflation&amp;quot; which you can set in the Units Conversion Library user interface.  It uses consumer price index data provided by the US Energy Information Administration from 1949 to 2017 with projections up to 2040. It gives an error if yr or baseYr are outside that range.&lt;br /&gt;
&lt;br /&gt;
The '''Units_table''' contains the list of units, with abbreviation, full-name, and synonyms, type (dimensions) and conversion factors to the base unit for each type. For example, the base unit for 'Energy' is Joule. The conversion factor for gigajoule (GJ) is 10^9. You can add your own units. Be careful to select the correct type (dimensions).&lt;br /&gt;
&lt;br /&gt;
=== Greatest Common Divisor functions ===&lt;br /&gt;
'''Download: ''' [[media:GCD function library.ana|GCD function library.ana]]&lt;br /&gt;
&lt;br /&gt;
This library contains two [[User-Defined Functions]] for computing the greatest common divisor.&lt;br /&gt;
&lt;br /&gt;
=== [[Database library]] ===&lt;br /&gt;
'''Download: ''' [[Media:Database library.ana|Database library.ana]]&lt;br /&gt;
&lt;br /&gt;
A library of functions to make it easy to create, read, update, examine and delete database tables, without having to write SQL. It works with Microsoft Access, Microsoft SQL Server, MariaDB, and PostgreSQL, and can be expanded to support other database platforms.&lt;br /&gt;
&lt;br /&gt;
=== [[Salesforce REST library]] ===&lt;br /&gt;
&lt;br /&gt;
Reads Salesforce records and metadata into your model through the Salesforce REST API. It provides OAuth 2.0 client-credentials authentication, SOQL queries with automatic pagination, record retrieval, SOSL search, and Salesforce object and field metadata. It reads from Salesforce -- it has no functions to create, update, or delete records.&lt;br /&gt;
&lt;br /&gt;
Requires [[Analytica 7.1]] {{Analytica Developer}} edition or better. See [[Salesforce REST library]] for the download and the function reference.&lt;br /&gt;
&lt;br /&gt;
=== DB Conversion Library ===&lt;br /&gt;
'''Download: ''' [[media:Db conversion lib.ana|DB conversion lib.ana]]&lt;br /&gt;
&lt;br /&gt;
Lets you embed data obtained from a database into the Analytica model. This breaks the need to use it with an external database, so -- for example -- you can send to someone (e.g. Lumina tech support) who does not have access to the database or has an edition of Analytica (e.g. Professional) that doesn't support database access.  &lt;br /&gt;
&lt;br /&gt;
Press a button in this library to transform all the variables defined using [[DbQuery]], [[DbLabels]] and [[DbTable]] to literal data.  Variables and indexes defined using [[DbQuery]] or [[DbLabels]] are transformed to list definitions, and those defined using [[DbTable]] are transformed into edit tables.  This breaks the connection to the external database. So, of course, the model will no longer be able to get new or extended data from the database.&lt;br /&gt;
&lt;br /&gt;
The library is limited in its scope.  It only works when all calls to [[DbQuery]], [[DbLabels]] and [[DbTable]] occur at the top level of variable definitions.  Do not try to use it if the calls to these functions are embedded within larger expressions or in [[User-Defined Functions]].  &lt;br /&gt;
&lt;br /&gt;
'''''Use with extreme caution!!''''':  Make a copy of your original model ''before'' adding and executing this module.  After running the transformation, be sure to use '''File &amp;amp;rarr; Save As...''' to save the transformed model under a different filename, so you don't clobber your original model.&lt;br /&gt;
&lt;br /&gt;
=== Spreadsheet Helper Library ===&lt;br /&gt;
'''Download: ''' [[media:Spreadsheet Helper lib.ana|Spreadsheet Helper lib.ana]]&lt;br /&gt;
&lt;br /&gt;
Includes functions that return the list of worksheet names and the Excel filename of the workbook.  It also contains a SpreadsheetOpenEx function that can be used in place of [[SpreadsheetOpen]], but which remembers the filename selected by the user so the next time they don't have to select the file again.&lt;br /&gt;
&lt;br /&gt;
=== Data Standardization Library ===&lt;br /&gt;
'''Download: ''' [[media:Data Standardization Library.ana|Data Standardization Library.ana]]&lt;br /&gt;
&lt;br /&gt;
Imported data is often inconsistent.  This library allows you to choose what the &amp;quot;standard&amp;quot; values should be in a column of data.  You can then map any non-standard value to one of the standard values.  The result is a column of consistent data.&lt;br /&gt;
&lt;br /&gt;
== Additional probability distributions ==&lt;br /&gt;
&lt;br /&gt;
=== Laplacian distribution ===&lt;br /&gt;
&lt;br /&gt;
'''Download: ''' [[media:Laplacian distribution library.ana|Laplacian distribution library.ana]]&lt;br /&gt;
&lt;br /&gt;
'''Description: ''' The Laplacian distribution (or [https://en.wikipedia.org/wiki/Laplace_distribution Laplace distribution]) is a continuous, unbounded distribution that is essentially a double-sided [[Exponential distribution]] with a «mean» parameter. The library contains the distribution function, and the analytica functions for density, cumulative density and inverse cumulative density (the quantile function).&lt;br /&gt;
&lt;br /&gt;
== The HDR pseudo-random number generator ==&lt;br /&gt;
&lt;br /&gt;
'''Download:''' [[media:Hubbard HDR Library.ana|Hubbard HDR Library.ana]]&lt;br /&gt;
&lt;br /&gt;
'''Authors:''' [https://en.wikipedia.org/wiki/Douglas_W._Hubbard Doug Hubbard], [https://hubbardresearch.com/ Hubbard Decision Research], and Lonnie Chrisman, [https://lumina.com Lumina Decision Systems]&lt;br /&gt;
&lt;br /&gt;
'''Description:''' [https://www.researchgate.net/publication/338824184_A_Multi-Dimensional_Counter-Based_Pseudo_Random_Number_Generator_as_a_Standard_for_Monte_Carlo_Simulations The HDR] is a simple, open-source pseudo-random number generation algorithm. It has been embraced by organizations such as [https://ProbabilityManagement.org ProbabilityManagement.org] as a standard for efficiently exchanging exact Monte Carlo samples. Given 4 integer seed values, the sequence is deterministic, so two parties with these same 4 values can reproduce precisely the same sequence up to a length of 100M samples, even from Excel.  Select a different combination of seeds to prevent any two independent simulations from inadvertently using the same random number stream. This ensures that independent simulation results can be combined without unintended correlations. Or use the same combination of seeds to intentionally produce identical simulations of the same stream. This allows entire Monte Carlo simulation samples to be communicated in just a few numbers.&lt;br /&gt;
&lt;br /&gt;
This library provides the functions for using HDR in an Analytica model. The &amp;lt;code&amp;gt;Hubbard_HDR(...)&amp;lt;/code&amp;gt; function enables you to obtain the nth random number in a sequence, while the &amp;lt;code&amp;gt;HDR_U(...)&amp;lt;/code&amp;gt; function acts as a &amp;lt;code&amp;gt;[[Uniform|Uniform(0,1)]]&amp;lt;/code&amp;gt; distribution as is convenient to use in any Inverse Cumulative Probability Function (e.g., [[CumKeelinInv]], [[CumNormalInv]], [[CumBetaInv]], etc) to encode a specific distribution inside a model.&lt;br /&gt;
&lt;br /&gt;
* Douglas Hubbard (Aug 2019), &amp;quot;[https://www.researchgate.net/publication/338824184_A_Multi-Dimensional_Counter-Based_Pseudo_Random_Number_Generator_as_a_Standard_for_Monte_Carlo_Simulations A Multi-Dimensional, Counter-Based Pseudo Random Number Generator as a Standard for Monte Carlo Simulations]&amp;quot;, Winter Simulation Conference, Washington DC, DOI: 10.1109/WSC40007.2019.9004773.&lt;br /&gt;
&lt;br /&gt;
== Individual functions with examples ==&lt;br /&gt;
&lt;br /&gt;
'''Download: '''  [[media:Recumulate example.ana|Recumulate example.ana]] : Like [[Cumulate]], but resets to zero at selected points.&lt;br /&gt;
&lt;br /&gt;
'''Download:''' [[media:Apportion.ana|Apportion.ana]]: Aggregates or disaggregates an array of values from one index to another index, where the second index may be larger or smaller. Does not require the indexes to be index multiples of each other. For example, if you map from a 47-element index to a 13-element index, each 3.62 elements of the original map to an element in the destination, so for example, the first 3 items map to the first item, then the fourth item is shared, with 0.62 apportioned to the first element and 0.38 apportioned to the second element. Supports aggregation types &amp;lt;code&amp;gt;'SUM'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AVERAGE'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'MIN'&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;'MAX'&amp;lt;/code&amp;gt;. Contributed by Paul Sanford of EPRI.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div name=&amp;quot;SequentialDispatch&amp;quot;&amp;gt;&lt;br /&gt;
'''Download: ''' [[media:Sequential dispatch library.ana|Sequential dispatch library.ana]] : The function '''SequentialDispatch''' generalizes the [[Dispatch]] function by adding a time-like index to carry over unsatisfied demand or unallocated capacity.  [[media:Sequential dispatch test.ana|Sequential dispatch test.ana]] is an example of its use.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The [[Legendre Library]] ==&lt;br /&gt;
The [[Legendre Library]] includes functions for:&lt;br /&gt;
&lt;br /&gt;
* Gauss-Legendre Quadrature&lt;br /&gt;
* Numerically stable, accurate and efficient calculation of an order n Legendre Polynomial at values -1&amp;lt;=x&amp;lt;=1&lt;br /&gt;
* Numerically stable calculation of the derivative of an order n Legendre Polynomial at x.&lt;br /&gt;
* Calculation of the zeros of Legendre polynomials.&lt;br /&gt;
* Calculation of the Legendre polynomial coefficients.&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Lonnie Chrisman, Lumina Decision Systems&lt;br /&gt;
&lt;br /&gt;
'''Download:''' [[media:Legendre library.ana|Legendre library.ana]]&lt;br /&gt;
&lt;br /&gt;
The library has [[Legendre Library|its own reference page]] on this wiki.&lt;br /&gt;
&lt;br /&gt;
== Cell Icon Set Library ==&lt;br /&gt;
:[[image:CellIconSetExample1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Provides pre-curated icon sets for use as [[CellIcon|cell icons in tables]]. The functions automatically select which icon in a set to use to depict the value that you want the icon to depict. Each icon set uses a consistent color scheme and consistent icon shapes having a consistent theme. Icon sets include shape collections, directional indicators, indicator styles and rating styles. &lt;br /&gt;
&lt;br /&gt;
Without this library, you can use cell icons in table cells by using the [[CellIcon]] function in a [[Computed cell format attribute]]. But this requires you to find suitable icon images and write logic to map from your values to these images. This library takes care of these pain points for you.&lt;br /&gt;
&lt;br /&gt;
'''Documentation:''' [[Cell Icon Set Library]]&lt;br /&gt;
&lt;br /&gt;
'''Download:''' [[media:Cell_Icon_Set_Library.ana|Cell_Icon_Set_Library.ana]]&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Lonnie Chrisman, Lumina Decision Systems&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Standard libraries]]: Installed with Analytica&lt;br /&gt;
* [[User Libraries]]: How to create your own Libraries&lt;br /&gt;
* [[Example Models]]&lt;br /&gt;
* [[Large Sample Library: User Guide]]&lt;br /&gt;
* [[Modules and Libraries]]&lt;br /&gt;
* [[Filed modules and libraries]]&lt;br /&gt;
* [[User-defined Functions and Libraries]]&lt;br /&gt;
* [[Example Models and Libraries]]&lt;br /&gt;
* [[Financial library functions]]&lt;br /&gt;
* [[The Sensitivity Analysis Library]] &lt;br /&gt;
* [[Distribution Densities Library]]&lt;br /&gt;
* [[Linked list library]]&lt;br /&gt;
* [[Base Conversion Function Library]]&lt;br /&gt;
* [[Performance Profiler library]]&lt;br /&gt;
* [[List of libraries]]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64258</id>
		<title>Salesforce REST library</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64258"/>
		<updated>2026-08-14T17:49:34Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Pin the Libraries folder path to release 7.1, the minimum this library requires&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Function libraries]]&lt;br /&gt;
[[Category:Integration Functions]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
''Requires [[Analytica 7.1]] {{Analytica Developer}} edition or better.''&lt;br /&gt;
&lt;br /&gt;
The '''Salesforce REST library''' lets your model authenticate with [https://www.salesforce.com/ Salesforce] and read Salesforce records and metadata through the Salesforce REST API, version 67.0. Use it to pull live data -- accounts, contacts, opportunities, or your own custom objects -- straight into an Analytica model, so that your analysis works from current CRM data instead of an exported snapshot.&lt;br /&gt;
&lt;br /&gt;
It provides:&lt;br /&gt;
* OAuth 2.0 client-credentials authentication for unattended, server-to-server use&lt;br /&gt;
* A legacy SOAP-login option as a temporary migration bridge&lt;br /&gt;
* SOQL query execution, including automatic pagination&lt;br /&gt;
* Record-selection and record-retrieval helpers&lt;br /&gt;
* Salesforce object and field metadata&lt;br /&gt;
* SOSL search&lt;br /&gt;
&lt;br /&gt;
This library reads from Salesforce. It has no functions to create, update, or delete Salesforce records.&lt;br /&gt;
&lt;br /&gt;
'''Download:''' [[media:Salesforce REST library.ana|Salesforce REST library.ana]] (v. 1.01)&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
To use this library, you need:&lt;br /&gt;
* [[Analytica 7.1]] or later, {{Analytica Developer}} edition or better. The library is built on [[ReadFromUrl]](), which is not available in the Professional or Player editions.&lt;br /&gt;
* A Salesforce account, and an OAuth client configured in Salesforce (see [[#Setting up Salesforce for client-credentials authentication|Setting up Salesforce]] below).&lt;br /&gt;
* Internet access allowing Analytica to reach your Salesforce login and instance domains over HTTPS. If you have a strong firewall, you may need to add a rule to allow this.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
# [[media:Salesforce REST library.ana|Download the library]] and save it into your &amp;lt;code&amp;gt;&amp;quot;C:\Program Files\Lumina\Analytica 7.1\Libraries&amp;quot;&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
# Launch Analytica and open your model, or start a new one.&lt;br /&gt;
# Select '''Add Library...''' from the '''File''' menu, select &amp;lt;code&amp;gt;Salesforce REST library.ana&amp;lt;/code&amp;gt;, click '''OK''', select '''Link''', then click '''OK'''.&lt;br /&gt;
&lt;br /&gt;
A typical model then uses three Variables -- an authentication Struct, a connection Struct, and one or more query results:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Variable Sf_auth ::= ClientCredentialsAuth(&lt;br /&gt;
        &amp;quot;https://login.salesforce.com&amp;quot;,&lt;br /&gt;
        Sf_client_id,&lt;br /&gt;
        Sf_client_secret )&lt;br /&gt;
&lt;br /&gt;
Variable Sf ::= Salesforce( Sf_auth )&lt;br /&gt;
&lt;br /&gt;
Variable Active_accounts ::= SalesforceSelect( Sf, &amp;quot;Account&amp;quot;, &amp;quot;Id, Name, Industry&amp;quot;,&lt;br /&gt;
        where: &amp;quot;IsDeleted = false&amp;quot;,&lt;br /&gt;
        order_by: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        row_limit: 100 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Active_accounts&amp;lt;/code&amp;gt; is a query-result [[Struct]]. Its list of records is:&lt;br /&gt;
:&amp;lt;code&amp;gt;Active_accounts -&amp;gt; records&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read a field from the first record:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Active_accounts -&amp;gt; records[@=1], &amp;quot;Name&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you authenticate to a sandbox, use &amp;lt;code&amp;gt;&amp;quot;https://test.salesforce.com&amp;quot;&amp;lt;/code&amp;gt; in place of &amp;lt;code&amp;gt;&amp;quot;https://login.salesforce.com&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== A brief introduction to SOQL ==&lt;br /&gt;
&lt;br /&gt;
Salesforce Object Query Language (SOQL) resembles SQL, but it queries Salesforce objects and fields by their '''API names''' rather than by table and column names. A basic query looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SELECT Id, Name, Industry&lt;br /&gt;
FROM Account&lt;br /&gt;
WHERE Industry = 'Technology'&lt;br /&gt;
ORDER BY Name&lt;br /&gt;
LIMIT 100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Standard object names include &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Contact&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Opportunity&amp;lt;/code&amp;gt;. API names of custom objects and custom fields usually end in &amp;lt;code&amp;gt;__c&amp;lt;/code&amp;gt; -- for example &amp;lt;code&amp;gt;License__c&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Expiration_Date__c&amp;lt;/code&amp;gt;. An object's API name is often not the same as the label you see in the Salesforce user interface, so use [[#SalesforceObjects|SalesforceObjects]]() and [[#SalesforceFields|SalesforceFields]]() to discover the names you need.&lt;br /&gt;
&lt;br /&gt;
Whenever you insert a text value into a SOQL expression, quote it with [[#SalesforceSoqlQuote|SalesforceSoqlQuote]](). Don't use that function for object or field API names.&lt;br /&gt;
&lt;br /&gt;
For the full language, see the Salesforce [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/ SOQL and SOSL Reference].&lt;br /&gt;
&lt;br /&gt;
== Setting up Salesforce for client-credentials authentication ==&lt;br /&gt;
&lt;br /&gt;
[[#ClientCredentialsAuth|ClientCredentialsAuth]]() is meant for unattended, server-to-server access. It needs an OAuth client configured in Salesforce, plus a dedicated Salesforce user whose permissions the integration runs under.&lt;br /&gt;
&lt;br /&gt;
Salesforce terminology and Setup screens vary by edition and release. In current releases the OAuth client is normally an '''External Client App'''; some organizations still use a '''Connected App'''.&lt;br /&gt;
&lt;br /&gt;
A Salesforce administrator generally needs to:&lt;br /&gt;
# Create an '''External Client App''' in Salesforce Setup.&lt;br /&gt;
# Enable '''OAuth settings''' and the '''OAuth 2.0 Client Credentials Flow'''.&lt;br /&gt;
# Grant the OAuth scope needed for REST access, normally '''Manage user data via APIs''' (&amp;lt;code&amp;gt;api&amp;lt;/code&amp;gt;). Avoid broader scopes unless you need them.&lt;br /&gt;
# Save the app, then copy its '''Consumer Key''' and '''Consumer Secret'''. These become the «client_id» and «client_secret» parameters in Analytica.&lt;br /&gt;
# In the app's OAuth policies, select a dedicated '''Run As''' integration user for the client-credentials flow. Depending on the app type, Salesforce may also require '''Admin approved users are pre-authorized'''.&lt;br /&gt;
# Give the integration user the permissions your model needs -- API access, plus read access to the required objects and fields. Prefer permission sets and least privilege.&lt;br /&gt;
# If the app uses pre-authorization, assign the app's permission set or profile authorization to the integration user.&lt;br /&gt;
&lt;br /&gt;
The library sends the token request to:&lt;br /&gt;
:&amp;lt;code&amp;gt;https://login.salesforce.com/services/oauth2/token&amp;lt;/code&amp;gt;&lt;br /&gt;
or, for a sandbox:&lt;br /&gt;
:&amp;lt;code&amp;gt;https://test.salesforce.com/services/oauth2/token&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Salesforce returns an access token and the instance URL that the library uses for all later requests.&lt;br /&gt;
&lt;br /&gt;
For current Salesforce-side details, see the Salesforce [https://developer.salesforce.com/docs/platform/mobile-sdk/guide/oauth-client-credentials-flow.html OAuth 2.0 Client Credentials Flow] documentation.&lt;br /&gt;
&lt;br /&gt;
=== Protect the client secret ===&lt;br /&gt;
&lt;br /&gt;
The consumer secret grants access as the configured integration user. Don't save it in a model that you distribute to people who shouldn't have the credential, and don't commit it to source control. Where you can, obtain it at deployment time from your organization's approved secret-management mechanism.&lt;br /&gt;
&lt;br /&gt;
== Authentication and connection ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;ClientCredentialsAuth&amp;quot;&amp;gt;ClientCredentialsAuth(login_url, client_id, client_secret)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Authenticates using the OAuth 2.0 client-credentials flow and returns a [[Struct]] holding the access token.&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| «login_url»&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;https://login.salesforce.com&amp;quot;&amp;lt;/code&amp;gt; for production, or &amp;lt;code&amp;gt;&amp;quot;https://test.salesforce.com&amp;quot;&amp;lt;/code&amp;gt; for a sandbox&lt;br /&gt;
|-&lt;br /&gt;
| «client_id»&lt;br /&gt;
| Consumer key from the Salesforce External Client App or Connected App&lt;br /&gt;
|-&lt;br /&gt;
| «client_secret»&lt;br /&gt;
| Consumer secret from the same app&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Struct it returns contains these members:&lt;br /&gt;
* &amp;lt;code&amp;gt;access_token&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;instance_url&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;status_code&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;status_text&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;raw_response&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;ClientCredentialsAuth( &amp;quot;https://login.salesforce.com&amp;quot;, Sf_client_id, Sf_client_secret )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When authentication fails, it reports an Analytica error that includes the HTTP status and the Salesforce response.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;ClientCredentialsAuth(login_url: Text; client_id: Text; client_secret: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Salesforce&amp;quot;&amp;gt;Salesforce(auth)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Creates the connection Struct that you pass to every query, record, search, and metadata function. «auth» is the Struct returned by [[#ClientCredentialsAuth|ClientCredentialsAuth]]() or [[#SoapLoginAuth|SoapLoginAuth]]().&lt;br /&gt;
&lt;br /&gt;
The Struct it returns contains these members:&lt;br /&gt;
* &amp;lt;code&amp;gt;api_version&amp;lt;/code&amp;gt; -- &amp;lt;code&amp;gt;&amp;quot;67.0&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;instance_url&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;access_token&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;rest_base_url&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;Salesforce( Sf_auth )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's usually clearer to define the authentication and the connection as separate Variables, as shown in [[#Getting started|Getting started]], so that you can inspect an authentication failure on its own. You can also nest the calls:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Salesforce(&lt;br /&gt;
    ClientCredentialsAuth(&lt;br /&gt;
        &amp;quot;https://login.salesforce.com&amp;quot;,&lt;br /&gt;
        Sf_client_id,&lt;br /&gt;
        Sf_client_secret ) )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All REST calls use API version 67.0, including calls authenticated through [[#SoapLoginAuth|SoapLoginAuth]]().&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;Salesforce(auth)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SoapLoginAuth&amp;quot;&amp;gt;SoapLoginAuth(login_url, username, password, security_token)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Logs in with the legacy Salesforce SOAP Partner API &amp;lt;code&amp;gt;login()&amp;lt;/code&amp;gt; call and returns a Struct whose session ID the REST functions use as a bearer token.&lt;br /&gt;
&lt;br /&gt;
«security_token» is the Salesforce security token for that user account. The function concatenates it onto the password, as SOAP login requires.&lt;br /&gt;
&lt;br /&gt;
'''This authentication method is a migration bridge only.''' Salesforce retires the SOAP &amp;lt;code&amp;gt;login()&amp;lt;/code&amp;gt; mechanism on '''1-Jun-2027''', after which this function stops working. Write new models against [[#ClientCredentialsAuth|ClientCredentialsAuth]](), and migrate existing ones before that date.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SoapLoginAuth(login_url: Text; username: Text; password: Text; security_token: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Query functions ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceSelect&amp;quot;&amp;gt;SalesforceSelect(sf, sobject, fields, ''where, order_by, row_limit'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Builds and runs a common SOQL &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt;. This is the easiest entry point when your query has a straightforward &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;LIMIT&amp;lt;/code&amp;gt; structure. It returns the same query-result Struct as [[#SalesforceQuery|SalesforceQuery]]().&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| «sf»&lt;br /&gt;
| The connection returned by [[#Salesforce|Salesforce]]()&lt;br /&gt;
|-&lt;br /&gt;
| «sobject»&lt;br /&gt;
| Salesforce object API name, such as &amp;lt;code&amp;gt;&amp;quot;Account&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| «fields»&lt;br /&gt;
| Comma-separated field API names&lt;br /&gt;
|-&lt;br /&gt;
| «where»&lt;br /&gt;
| Optional SOQL condition, without the &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; keyword&lt;br /&gt;
|-&lt;br /&gt;
| «order_by»&lt;br /&gt;
| Optional ordering expression, without the &amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; keywords&lt;br /&gt;
|-&lt;br /&gt;
| «row_limit»&lt;br /&gt;
| Optional maximum number of records. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the default, applies no explicit limit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The three optional parameters are declared &amp;lt;code&amp;gt;Named&amp;lt;/code&amp;gt;, so pass them by name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SalesforceSelect( Sf, &amp;quot;Contact&amp;quot;, &amp;quot;Id, Name, Email, Account.Name&amp;quot;,&lt;br /&gt;
        where: &amp;quot;Email = &amp;quot; &amp;amp; SalesforceSoqlQuote( Target_email ),&lt;br /&gt;
        order_by: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        row_limit: 20 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It validates the object and field API names, but «where» and «order_by» are SOQL fragments that you supply. Quote any text value you interpolate into them with [[#SalesforceSoqlQuote|SalesforceSoqlQuote]](), as in the example above.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceSelect(sf; sobject: Text; fields: Text; where: Named Text := &amp;quot;&amp;quot;; order_by: Named Text := &amp;quot;&amp;quot;; row_limit: Named Number := 0)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceQuery&amp;quot;&amp;gt;SalesforceQuery(sf, soql, ''include_deleted, max_pages'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a complete SOQL expression and follows Salesforce pagination until it has retrieved every page.&lt;br /&gt;
&lt;br /&gt;
It returns a query-result Struct with these members:&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Member&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;records&amp;lt;/code&amp;gt;&lt;br /&gt;
| List of parsed Salesforce record Structs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;total_size&amp;lt;/code&amp;gt;&lt;br /&gt;
| Total matching records, as reported by Salesforce&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pages&amp;lt;/code&amp;gt;&lt;br /&gt;
| Number of pages retrieved&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;done&amp;lt;/code&amp;gt;&lt;br /&gt;
| Whether Salesforce reported the query complete&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;next_records_url&amp;lt;/code&amp;gt;&lt;br /&gt;
| URL of a subsequent page. Normally &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt; once the query is complete&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;raw_response&amp;lt;/code&amp;gt;&lt;br /&gt;
| Raw response for the final page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Set «include_deleted» to &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt; to use Salesforce's query-all behavior, which can include deleted and archived records where Salesforce supports it.&lt;br /&gt;
&lt;br /&gt;
«max_pages», 100 by default, protects your model from an unexpectedly large or insufficiently bounded query. If the result needs more pages than this, it raises an error rather than quietly returning an incomplete result.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Local soql := &amp;quot;SELECT Id, Name, Amount, CloseDate &amp;quot; &amp;amp;&lt;br /&gt;
              &amp;quot;FROM Opportunity &amp;quot; &amp;amp;&lt;br /&gt;
              &amp;quot;WHERE IsClosed = false &amp;quot; &amp;amp;&lt;br /&gt;
              &amp;quot;ORDER BY CloseDate&amp;quot;;&lt;br /&gt;
SalesforceQuery( Sf, soql )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceQuery(sf; soql: Text; include_deleted := False; max_pages: Number := 100)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceQueryFirst&amp;quot;&amp;gt;SalesforceQueryFirst(sf, soql)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a SOQL expression and returns the first matching record Struct, or &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt; when nothing matches. Include an &amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; clause whenever more than one record could match, so that you get a predictable result.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SalesforceQueryFirst( Sf,&lt;br /&gt;
    &amp;quot;SELECT Id, Name FROM Account WHERE Name = &amp;quot; &amp;amp;&lt;br /&gt;
    SalesforceSoqlQuote( Account_name ) &amp;amp;&lt;br /&gt;
    &amp;quot; ORDER BY LastModifiedDate DESC LIMIT 1&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceQueryFirst(sf; soql: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceCount&amp;quot;&amp;gt;SalesforceCount(sf, soql, ''include_deleted'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns the query's &amp;lt;code&amp;gt;totalSize&amp;lt;/code&amp;gt; as a number, so you don't have to retrieve and inspect the record list to count matches.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceCount( Sf, &amp;quot;SELECT Id FROM Opportunity WHERE IsClosed = false&amp;quot; )&amp;lt;/code&amp;gt; &amp;amp;rarr; &amp;lt;code&amp;gt;42&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceCount(sf; soql: Text; include_deleted := False)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceQueryPage&amp;quot;&amp;gt;SalesforceQueryPage(sf, soql_or_next_url, ''include_deleted'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves exactly one query page. Pass a SOQL expression to get the first page, or the &amp;lt;code&amp;gt;next_records_url&amp;lt;/code&amp;gt; from a previous result to get the page after it.&lt;br /&gt;
&lt;br /&gt;
Most models should use [[#SalesforceQuery|SalesforceQuery]](), which handles pagination for you. Use this function when your model deliberately needs page-by-page control.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceQueryPage(sf; soql_or_next_url: Text; include_deleted := False)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Record functions ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceGetRecord&amp;quot;&amp;gt;SalesforceGetRecord(sf, sobject, record_id, fields)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves one record, given its Salesforce object API name and record ID. It returns the record Struct itself, not a query-result wrapper.&lt;br /&gt;
&lt;br /&gt;
* «record_id» must be a 15- or 18-character Salesforce ID.&lt;br /&gt;
* «fields» is a comma-separated list of field API names.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceGetRecord( Sf, &amp;quot;Account&amp;quot;, Account_id, &amp;quot;Id, Name, Industry, BillingCountry&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceGetRecord(sf; sobject: Text; record_id: Text; fields: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceGetRecords&amp;quot;&amp;gt;SalesforceGetRecords(sf, sobject, record_ids, fields)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves several records from a list of Salesforce record IDs, and returns a list of record Structs. Internally it builds a SOQL &amp;lt;code&amp;gt;IN (...)&amp;lt;/code&amp;gt; condition from the IDs.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceGetRecords( Sf, &amp;quot;Contact&amp;quot;, Contact_ids, &amp;quot;Id, Name, Email&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceGetRecords(sf; sobject: Text; record_ids: List; fields: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceField&amp;quot;&amp;gt;SalesforceField(record, field_path, ''default_value'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Reads a field from a Salesforce record Struct when the field name is a text value. A dotted «field_path» traverses relationship Structs.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Contact_record, &amp;quot;Email&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Contact_record, &amp;quot;Account.Name&amp;quot;, &amp;quot;No account&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It returns «default_value», &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt; by default, when the member is absent or it can't traverse the path.&lt;br /&gt;
&lt;br /&gt;
When you already know the field name as you write the Definition, direct Struct access is simpler:&lt;br /&gt;
:&amp;lt;code&amp;gt;Contact_record -&amp;gt; Email&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;SalesforceField&amp;lt;/code&amp;gt; for dynamic field names, dotted paths, or when you want a controlled default.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceField(record; field_path: Text; default_value := Null)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quoting text values ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceSoqlQuote&amp;quot;&amp;gt;SalesforceSoqlQuote(value)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Escapes a text value as a SOQL string literal and surrounds it with single quotes, handling quotes, backslashes, and control characters.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Name = &amp;quot; &amp;amp; SalesforceSoqlQuote( Customer_name )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;Customer_name&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;O'Reilly&amp;lt;/code&amp;gt;, this produces a valid quoted SOQL literal instead of letting the apostrophe terminate the value early.&lt;br /&gt;
&lt;br /&gt;
Use this function for '''values only'''. You can't safely turn Salesforce object or field API names into identifiers by quoting them -- the library validates those names instead.&lt;br /&gt;
&lt;br /&gt;
[[Intelligent Arrays|Array abstraction]] applies, so it also quotes a list of values. [[#SalesforceGetRecords|SalesforceGetRecords]]() relies on this when it builds its &amp;lt;code&amp;gt;IN (...)&amp;lt;/code&amp;gt; condition.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceSoqlQuote(value: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Metadata functions ==&lt;br /&gt;
&lt;br /&gt;
These functions help you discover the API names and properties available to the authenticated integration user.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceObjects&amp;quot;&amp;gt;SalesforceObjects(sf)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns a list of summary Structs for the Salesforce objects that the authenticated user can see.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceObjects( Sf )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Useful members usually include the object's API &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, its display &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;, and capability flags. Salesforce supplies the exact members, which vary by API release and object type.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceObjects(sf)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceDescribe&amp;quot;&amp;gt;SalesforceDescribe(sf, sobject)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns Salesforce's full metadata description for an object, including its fields, relationships, picklist entries, and access capabilities.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceDescribe( Sf, &amp;quot;Opportunity&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceDescribe(sf; sobject: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceFields&amp;quot;&amp;gt;SalesforceFields(sf, sobject)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns just the list of field metadata Structs from [[#SalesforceDescribe|SalesforceDescribe]](). Use it to find field API names, types, labels, whether a field can be filtered, and its allowed picklist values.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceFields( Sf, &amp;quot;Account&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceFields(sf; sobject: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Search ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceSearch&amp;quot;&amp;gt;SalesforceSearch(sf, sosl)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a Salesforce Object Search Language (SOSL) expression and returns its &amp;lt;code&amp;gt;searchRecords&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
SOQL queries known objects and fields; SOSL searches text across one or more objects. Use &amp;lt;code&amp;gt;SalesforceSearch&amp;lt;/code&amp;gt; when your search spans object types, or when it resembles a text search more than a structured query.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SalesforceSearch( Sf,&lt;br /&gt;
    &amp;quot;FIND {Acme} IN NAME FIELDS &amp;quot; &amp;amp;&lt;br /&gt;
    &amp;quot;RETURNING Account(Id, Name), Contact(Id, Name, Email)&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the full SOSL syntax, see the Salesforce [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/ SOQL and SOSL Reference].&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceSearch(sf; sosl: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Working with returned records ==&lt;br /&gt;
&lt;br /&gt;
The library represents Salesforce JSON objects as Analytica [[Struct]]s, and collections as lists. Given:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Variable Result ::= SalesforceSelect( Sf, &amp;quot;Account&amp;quot;, &amp;quot;Id, Name, Owner.Name&amp;quot;,&lt;br /&gt;
        where: &amp;quot;BillingCountry = &amp;quot; &amp;amp; SalesforceSoqlQuote( Country ),&lt;br /&gt;
        order_by: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        row_limit: 100 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the records are:&lt;br /&gt;
:&amp;lt;code&amp;gt;Result -&amp;gt; records&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the first record is:&lt;br /&gt;
:&amp;lt;code&amp;gt;Result -&amp;gt; records[@=1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you can read a field directly:&lt;br /&gt;
:&amp;lt;code&amp;gt;Result -&amp;gt; records[@=1] -&amp;gt; Name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or through the helper, which also handles the dotted relationship path:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Result -&amp;gt; records[@=1], &amp;quot;Owner.Name&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build an array from the record list, introduce an [[Index]] for the record position and extract the members you want over that Index.&lt;br /&gt;
&lt;br /&gt;
== Error handling and troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
The library raises an Analytica error when authentication fails, when Salesforce returns an unsuccessful HTTP status, when a record ID is malformed, when an object or field API name is invalid, or when a query exceeds «max_pages».&lt;br /&gt;
&lt;br /&gt;
Common causes:&lt;br /&gt;
; Authentication fails&lt;br /&gt;
: Check the login URL, the consumer key and secret, the client-credentials setting, the '''Run As''' user, and the app authorization.&lt;br /&gt;
; &amp;lt;code&amp;gt;INVALID_FIELD&amp;lt;/code&amp;gt;, or an unknown field&lt;br /&gt;
: Use [[#SalesforceFields|SalesforceFields]]() to check the field's API name. The display label is often not the API name.&lt;br /&gt;
; Insufficient access&lt;br /&gt;
: Check the integration user's API permission, object permissions, field-level security, sharing access, and permission-set assignments.&lt;br /&gt;
; No records returned&lt;br /&gt;
: Try a simpler query, confirm the integration user can see the records, and inspect &amp;lt;code&amp;gt;total_size&amp;lt;/code&amp;gt; in the query-result Struct.&lt;br /&gt;
; Query exceeds «max_pages»&lt;br /&gt;
: Add a selective &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; clause or a &amp;lt;code&amp;gt;LIMIT&amp;lt;/code&amp;gt;. Raise «max_pages» only when you intend the larger transfer.&lt;br /&gt;
; Sandbox authentication fails&lt;br /&gt;
: Use &amp;lt;code&amp;gt;&amp;quot;https://test.salesforce.com&amp;quot;&amp;lt;/code&amp;gt;, unless your organization requires a specific My Domain login URL.&lt;br /&gt;
; The network request fails&lt;br /&gt;
: Confirm that the computer running Analytica reaches the Salesforce login and instance domains over HTTPS, and that any proxy or firewall permits the requests.&lt;br /&gt;
&lt;br /&gt;
An HTTP 401 gets its own message asking you to recalculate the authentication and the connection, then retry -- the access token has expired or been revoked.&lt;br /&gt;
&lt;br /&gt;
== Function summary ==&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Function&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClientCredentialsAuth|ClientCredentialsAuth]]()&lt;br /&gt;
| Authenticate with the OAuth 2.0 client-credentials flow&lt;br /&gt;
|-&lt;br /&gt;
| [[#Salesforce|Salesforce]]()&lt;br /&gt;
| Create the REST connection Struct&lt;br /&gt;
|-&lt;br /&gt;
| [[#SoapLoginAuth|SoapLoginAuth]]()&lt;br /&gt;
| Legacy SOAP authentication. Migrate before 1-Jun-2027&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceSelect|SalesforceSelect]]()&lt;br /&gt;
| Build and run a common SOQL &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceQuery|SalesforceQuery]]()&lt;br /&gt;
| Run complete SOQL and retrieve all pages&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceQueryFirst|SalesforceQueryFirst]]()&lt;br /&gt;
| Return the first matching record, or &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceCount|SalesforceCount]]()&lt;br /&gt;
| Return the total matching-record count&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceQueryPage|SalesforceQueryPage]]()&lt;br /&gt;
| Retrieve one query page manually&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceGetRecord|SalesforceGetRecord]]()&lt;br /&gt;
| Retrieve one record by ID&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceGetRecords|SalesforceGetRecords]]()&lt;br /&gt;
| Retrieve several records from a list of IDs&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceField|SalesforceField]]()&lt;br /&gt;
| Read a dynamic or dotted field path from a record&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceSoqlQuote|SalesforceSoqlQuote]]()&lt;br /&gt;
| Quote a text value safely for SOQL&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceObjects|SalesforceObjects]]()&lt;br /&gt;
| List the objects visible to the authenticated user&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceDescribe|SalesforceDescribe]]()&lt;br /&gt;
| Retrieve full metadata for an object&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceFields|SalesforceFields]]()&lt;br /&gt;
| List the field metadata for an object&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceSearch|SalesforceSearch]]()&lt;br /&gt;
| Run SOSL and return the search records&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
The Salesforce REST library was introduced in August 2026, and requires [[Analytica 7.1]] or later. The Constant &amp;lt;code&amp;gt;Salesforce_library_version&amp;lt;/code&amp;gt; in the library holds its version number, currently &amp;lt;code&amp;gt;1.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReadFromUrl]]() -- the function this library is built on&lt;br /&gt;
* [[ParseJSON]]() -- parses the JSON that Salesforce returns&lt;br /&gt;
* [[Struct]] -- the data structure used for connections, records, and query results&lt;br /&gt;
* [[Additional libraries]]&lt;br /&gt;
* [[OpenAI API library]]&lt;br /&gt;
* [[Database library]]&lt;br /&gt;
* Salesforce [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/ SOQL and SOSL Reference]&lt;br /&gt;
* Salesforce [https://developer.salesforce.com/docs/platform/mobile-sdk/guide/oauth-client-credentials-flow.html OAuth 2.0 Client Credentials Flow]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64257</id>
		<title>Salesforce REST library</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64257"/>
		<updated>2026-08-14T17:48:31Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Full documentation for the Salesforce REST library v1.01: overview, setup, function reference, troubleshooting, and download link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Function libraries]]&lt;br /&gt;
[[Category:Integration Functions]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
''Requires [[Analytica 7.1]] {{Analytica Developer}} edition or better.''&lt;br /&gt;
&lt;br /&gt;
The '''Salesforce REST library''' lets your model authenticate with [https://www.salesforce.com/ Salesforce] and read Salesforce records and metadata through the Salesforce REST API, version 67.0. Use it to pull live data -- accounts, contacts, opportunities, or your own custom objects -- straight into an Analytica model, so that your analysis works from current CRM data instead of an exported snapshot.&lt;br /&gt;
&lt;br /&gt;
It provides:&lt;br /&gt;
* OAuth 2.0 client-credentials authentication for unattended, server-to-server use&lt;br /&gt;
* A legacy SOAP-login option as a temporary migration bridge&lt;br /&gt;
* SOQL query execution, including automatic pagination&lt;br /&gt;
* Record-selection and record-retrieval helpers&lt;br /&gt;
* Salesforce object and field metadata&lt;br /&gt;
* SOSL search&lt;br /&gt;
&lt;br /&gt;
This library reads from Salesforce. It has no functions to create, update, or delete Salesforce records.&lt;br /&gt;
&lt;br /&gt;
'''Download:''' [[media:Salesforce REST library.ana|Salesforce REST library.ana]] (v. 1.01)&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
To use this library, you need:&lt;br /&gt;
* [[Analytica 7.1]] or later, {{Analytica Developer}} edition or better. The library is built on [[ReadFromUrl]](), which is not available in the Professional or Player editions.&lt;br /&gt;
* A Salesforce account, and an OAuth client configured in Salesforce (see [[#Setting up Salesforce for client-credentials authentication|Setting up Salesforce]] below).&lt;br /&gt;
* Internet access allowing Analytica to reach your Salesforce login and instance domains over HTTPS. If you have a strong firewall, you may need to add a rule to allow this.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
# [[media:Salesforce REST library.ana|Download the library]] and save it into your &amp;lt;code&amp;gt;&amp;quot;C:\Program Files\Lumina\Analytica {{#svarget:anarelease|7.1}}\Libraries&amp;quot;&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
# Launch Analytica and open your model, or start a new one.&lt;br /&gt;
# Select '''Add Library...''' from the '''File''' menu, select &amp;lt;code&amp;gt;Salesforce REST library.ana&amp;lt;/code&amp;gt;, click '''OK''', select '''Link''', then click '''OK'''.&lt;br /&gt;
&lt;br /&gt;
A typical model then uses three Variables -- an authentication Struct, a connection Struct, and one or more query results:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Variable Sf_auth ::= ClientCredentialsAuth(&lt;br /&gt;
        &amp;quot;https://login.salesforce.com&amp;quot;,&lt;br /&gt;
        Sf_client_id,&lt;br /&gt;
        Sf_client_secret )&lt;br /&gt;
&lt;br /&gt;
Variable Sf ::= Salesforce( Sf_auth )&lt;br /&gt;
&lt;br /&gt;
Variable Active_accounts ::= SalesforceSelect( Sf, &amp;quot;Account&amp;quot;, &amp;quot;Id, Name, Industry&amp;quot;,&lt;br /&gt;
        where: &amp;quot;IsDeleted = false&amp;quot;,&lt;br /&gt;
        order_by: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        row_limit: 100 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Active_accounts&amp;lt;/code&amp;gt; is a query-result [[Struct]]. Its list of records is:&lt;br /&gt;
:&amp;lt;code&amp;gt;Active_accounts -&amp;gt; records&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read a field from the first record:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Active_accounts -&amp;gt; records[@=1], &amp;quot;Name&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you authenticate to a sandbox, use &amp;lt;code&amp;gt;&amp;quot;https://test.salesforce.com&amp;quot;&amp;lt;/code&amp;gt; in place of &amp;lt;code&amp;gt;&amp;quot;https://login.salesforce.com&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== A brief introduction to SOQL ==&lt;br /&gt;
&lt;br /&gt;
Salesforce Object Query Language (SOQL) resembles SQL, but it queries Salesforce objects and fields by their '''API names''' rather than by table and column names. A basic query looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SELECT Id, Name, Industry&lt;br /&gt;
FROM Account&lt;br /&gt;
WHERE Industry = 'Technology'&lt;br /&gt;
ORDER BY Name&lt;br /&gt;
LIMIT 100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Standard object names include &amp;lt;code&amp;gt;Account&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Contact&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Opportunity&amp;lt;/code&amp;gt;. API names of custom objects and custom fields usually end in &amp;lt;code&amp;gt;__c&amp;lt;/code&amp;gt; -- for example &amp;lt;code&amp;gt;License__c&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Expiration_Date__c&amp;lt;/code&amp;gt;. An object's API name is often not the same as the label you see in the Salesforce user interface, so use [[#SalesforceObjects|SalesforceObjects]]() and [[#SalesforceFields|SalesforceFields]]() to discover the names you need.&lt;br /&gt;
&lt;br /&gt;
Whenever you insert a text value into a SOQL expression, quote it with [[#SalesforceSoqlQuote|SalesforceSoqlQuote]](). Don't use that function for object or field API names.&lt;br /&gt;
&lt;br /&gt;
For the full language, see the Salesforce [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/ SOQL and SOSL Reference].&lt;br /&gt;
&lt;br /&gt;
== Setting up Salesforce for client-credentials authentication ==&lt;br /&gt;
&lt;br /&gt;
[[#ClientCredentialsAuth|ClientCredentialsAuth]]() is meant for unattended, server-to-server access. It needs an OAuth client configured in Salesforce, plus a dedicated Salesforce user whose permissions the integration runs under.&lt;br /&gt;
&lt;br /&gt;
Salesforce terminology and Setup screens vary by edition and release. In current releases the OAuth client is normally an '''External Client App'''; some organizations still use a '''Connected App'''.&lt;br /&gt;
&lt;br /&gt;
A Salesforce administrator generally needs to:&lt;br /&gt;
# Create an '''External Client App''' in Salesforce Setup.&lt;br /&gt;
# Enable '''OAuth settings''' and the '''OAuth 2.0 Client Credentials Flow'''.&lt;br /&gt;
# Grant the OAuth scope needed for REST access, normally '''Manage user data via APIs''' (&amp;lt;code&amp;gt;api&amp;lt;/code&amp;gt;). Avoid broader scopes unless you need them.&lt;br /&gt;
# Save the app, then copy its '''Consumer Key''' and '''Consumer Secret'''. These become the «client_id» and «client_secret» parameters in Analytica.&lt;br /&gt;
# In the app's OAuth policies, select a dedicated '''Run As''' integration user for the client-credentials flow. Depending on the app type, Salesforce may also require '''Admin approved users are pre-authorized'''.&lt;br /&gt;
# Give the integration user the permissions your model needs -- API access, plus read access to the required objects and fields. Prefer permission sets and least privilege.&lt;br /&gt;
# If the app uses pre-authorization, assign the app's permission set or profile authorization to the integration user.&lt;br /&gt;
&lt;br /&gt;
The library sends the token request to:&lt;br /&gt;
:&amp;lt;code&amp;gt;https://login.salesforce.com/services/oauth2/token&amp;lt;/code&amp;gt;&lt;br /&gt;
or, for a sandbox:&lt;br /&gt;
:&amp;lt;code&amp;gt;https://test.salesforce.com/services/oauth2/token&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Salesforce returns an access token and the instance URL that the library uses for all later requests.&lt;br /&gt;
&lt;br /&gt;
For current Salesforce-side details, see the Salesforce [https://developer.salesforce.com/docs/platform/mobile-sdk/guide/oauth-client-credentials-flow.html OAuth 2.0 Client Credentials Flow] documentation.&lt;br /&gt;
&lt;br /&gt;
=== Protect the client secret ===&lt;br /&gt;
&lt;br /&gt;
The consumer secret grants access as the configured integration user. Don't save it in a model that you distribute to people who shouldn't have the credential, and don't commit it to source control. Where you can, obtain it at deployment time from your organization's approved secret-management mechanism.&lt;br /&gt;
&lt;br /&gt;
== Authentication and connection ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;ClientCredentialsAuth&amp;quot;&amp;gt;ClientCredentialsAuth(login_url, client_id, client_secret)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Authenticates using the OAuth 2.0 client-credentials flow and returns a [[Struct]] holding the access token.&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| «login_url»&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;https://login.salesforce.com&amp;quot;&amp;lt;/code&amp;gt; for production, or &amp;lt;code&amp;gt;&amp;quot;https://test.salesforce.com&amp;quot;&amp;lt;/code&amp;gt; for a sandbox&lt;br /&gt;
|-&lt;br /&gt;
| «client_id»&lt;br /&gt;
| Consumer key from the Salesforce External Client App or Connected App&lt;br /&gt;
|-&lt;br /&gt;
| «client_secret»&lt;br /&gt;
| Consumer secret from the same app&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Struct it returns contains these members:&lt;br /&gt;
* &amp;lt;code&amp;gt;access_token&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;instance_url&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;status_code&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;status_text&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;raw_response&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;ClientCredentialsAuth( &amp;quot;https://login.salesforce.com&amp;quot;, Sf_client_id, Sf_client_secret )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When authentication fails, it reports an Analytica error that includes the HTTP status and the Salesforce response.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;ClientCredentialsAuth(login_url: Text; client_id: Text; client_secret: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Salesforce&amp;quot;&amp;gt;Salesforce(auth)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Creates the connection Struct that you pass to every query, record, search, and metadata function. «auth» is the Struct returned by [[#ClientCredentialsAuth|ClientCredentialsAuth]]() or [[#SoapLoginAuth|SoapLoginAuth]]().&lt;br /&gt;
&lt;br /&gt;
The Struct it returns contains these members:&lt;br /&gt;
* &amp;lt;code&amp;gt;api_version&amp;lt;/code&amp;gt; -- &amp;lt;code&amp;gt;&amp;quot;67.0&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;instance_url&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;access_token&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;rest_base_url&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;Salesforce( Sf_auth )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's usually clearer to define the authentication and the connection as separate Variables, as shown in [[#Getting started|Getting started]], so that you can inspect an authentication failure on its own. You can also nest the calls:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Salesforce(&lt;br /&gt;
    ClientCredentialsAuth(&lt;br /&gt;
        &amp;quot;https://login.salesforce.com&amp;quot;,&lt;br /&gt;
        Sf_client_id,&lt;br /&gt;
        Sf_client_secret ) )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All REST calls use API version 67.0, including calls authenticated through [[#SoapLoginAuth|SoapLoginAuth]]().&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;Salesforce(auth)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SoapLoginAuth&amp;quot;&amp;gt;SoapLoginAuth(login_url, username, password, security_token)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Logs in with the legacy Salesforce SOAP Partner API &amp;lt;code&amp;gt;login()&amp;lt;/code&amp;gt; call and returns a Struct whose session ID the REST functions use as a bearer token.&lt;br /&gt;
&lt;br /&gt;
«security_token» is the Salesforce security token for that user account. The function concatenates it onto the password, as SOAP login requires.&lt;br /&gt;
&lt;br /&gt;
'''This authentication method is a migration bridge only.''' Salesforce retires the SOAP &amp;lt;code&amp;gt;login()&amp;lt;/code&amp;gt; mechanism on '''1-Jun-2027''', after which this function stops working. Write new models against [[#ClientCredentialsAuth|ClientCredentialsAuth]](), and migrate existing ones before that date.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SoapLoginAuth(login_url: Text; username: Text; password: Text; security_token: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Query functions ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceSelect&amp;quot;&amp;gt;SalesforceSelect(sf, sobject, fields, ''where, order_by, row_limit'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Builds and runs a common SOQL &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt;. This is the easiest entry point when your query has a straightforward &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;LIMIT&amp;lt;/code&amp;gt; structure. It returns the same query-result Struct as [[#SalesforceQuery|SalesforceQuery]]().&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| «sf»&lt;br /&gt;
| The connection returned by [[#Salesforce|Salesforce]]()&lt;br /&gt;
|-&lt;br /&gt;
| «sobject»&lt;br /&gt;
| Salesforce object API name, such as &amp;lt;code&amp;gt;&amp;quot;Account&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| «fields»&lt;br /&gt;
| Comma-separated field API names&lt;br /&gt;
|-&lt;br /&gt;
| «where»&lt;br /&gt;
| Optional SOQL condition, without the &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; keyword&lt;br /&gt;
|-&lt;br /&gt;
| «order_by»&lt;br /&gt;
| Optional ordering expression, without the &amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; keywords&lt;br /&gt;
|-&lt;br /&gt;
| «row_limit»&lt;br /&gt;
| Optional maximum number of records. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the default, applies no explicit limit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The three optional parameters are declared &amp;lt;code&amp;gt;Named&amp;lt;/code&amp;gt;, so pass them by name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SalesforceSelect( Sf, &amp;quot;Contact&amp;quot;, &amp;quot;Id, Name, Email, Account.Name&amp;quot;,&lt;br /&gt;
        where: &amp;quot;Email = &amp;quot; &amp;amp; SalesforceSoqlQuote( Target_email ),&lt;br /&gt;
        order_by: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        row_limit: 20 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It validates the object and field API names, but «where» and «order_by» are SOQL fragments that you supply. Quote any text value you interpolate into them with [[#SalesforceSoqlQuote|SalesforceSoqlQuote]](), as in the example above.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceSelect(sf; sobject: Text; fields: Text; where: Named Text := &amp;quot;&amp;quot;; order_by: Named Text := &amp;quot;&amp;quot;; row_limit: Named Number := 0)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceQuery&amp;quot;&amp;gt;SalesforceQuery(sf, soql, ''include_deleted, max_pages'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a complete SOQL expression and follows Salesforce pagination until it has retrieved every page.&lt;br /&gt;
&lt;br /&gt;
It returns a query-result Struct with these members:&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Member&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;records&amp;lt;/code&amp;gt;&lt;br /&gt;
| List of parsed Salesforce record Structs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;total_size&amp;lt;/code&amp;gt;&lt;br /&gt;
| Total matching records, as reported by Salesforce&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pages&amp;lt;/code&amp;gt;&lt;br /&gt;
| Number of pages retrieved&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;done&amp;lt;/code&amp;gt;&lt;br /&gt;
| Whether Salesforce reported the query complete&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;next_records_url&amp;lt;/code&amp;gt;&lt;br /&gt;
| URL of a subsequent page. Normally &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt; once the query is complete&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;raw_response&amp;lt;/code&amp;gt;&lt;br /&gt;
| Raw response for the final page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Set «include_deleted» to &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt; to use Salesforce's query-all behavior, which can include deleted and archived records where Salesforce supports it.&lt;br /&gt;
&lt;br /&gt;
«max_pages», 100 by default, protects your model from an unexpectedly large or insufficiently bounded query. If the result needs more pages than this, it raises an error rather than quietly returning an incomplete result.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Local soql := &amp;quot;SELECT Id, Name, Amount, CloseDate &amp;quot; &amp;amp;&lt;br /&gt;
              &amp;quot;FROM Opportunity &amp;quot; &amp;amp;&lt;br /&gt;
              &amp;quot;WHERE IsClosed = false &amp;quot; &amp;amp;&lt;br /&gt;
              &amp;quot;ORDER BY CloseDate&amp;quot;;&lt;br /&gt;
SalesforceQuery( Sf, soql )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceQuery(sf; soql: Text; include_deleted := False; max_pages: Number := 100)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceQueryFirst&amp;quot;&amp;gt;SalesforceQueryFirst(sf, soql)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a SOQL expression and returns the first matching record Struct, or &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt; when nothing matches. Include an &amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; clause whenever more than one record could match, so that you get a predictable result.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SalesforceQueryFirst( Sf,&lt;br /&gt;
    &amp;quot;SELECT Id, Name FROM Account WHERE Name = &amp;quot; &amp;amp;&lt;br /&gt;
    SalesforceSoqlQuote( Account_name ) &amp;amp;&lt;br /&gt;
    &amp;quot; ORDER BY LastModifiedDate DESC LIMIT 1&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceQueryFirst(sf; soql: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceCount&amp;quot;&amp;gt;SalesforceCount(sf, soql, ''include_deleted'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns the query's &amp;lt;code&amp;gt;totalSize&amp;lt;/code&amp;gt; as a number, so you don't have to retrieve and inspect the record list to count matches.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceCount( Sf, &amp;quot;SELECT Id FROM Opportunity WHERE IsClosed = false&amp;quot; )&amp;lt;/code&amp;gt; &amp;amp;rarr; &amp;lt;code&amp;gt;42&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceCount(sf; soql: Text; include_deleted := False)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceQueryPage&amp;quot;&amp;gt;SalesforceQueryPage(sf, soql_or_next_url, ''include_deleted'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves exactly one query page. Pass a SOQL expression to get the first page, or the &amp;lt;code&amp;gt;next_records_url&amp;lt;/code&amp;gt; from a previous result to get the page after it.&lt;br /&gt;
&lt;br /&gt;
Most models should use [[#SalesforceQuery|SalesforceQuery]](), which handles pagination for you. Use this function when your model deliberately needs page-by-page control.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceQueryPage(sf; soql_or_next_url: Text; include_deleted := False)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Record functions ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceGetRecord&amp;quot;&amp;gt;SalesforceGetRecord(sf, sobject, record_id, fields)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves one record, given its Salesforce object API name and record ID. It returns the record Struct itself, not a query-result wrapper.&lt;br /&gt;
&lt;br /&gt;
* «record_id» must be a 15- or 18-character Salesforce ID.&lt;br /&gt;
* «fields» is a comma-separated list of field API names.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceGetRecord( Sf, &amp;quot;Account&amp;quot;, Account_id, &amp;quot;Id, Name, Industry, BillingCountry&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceGetRecord(sf; sobject: Text; record_id: Text; fields: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceGetRecords&amp;quot;&amp;gt;SalesforceGetRecords(sf, sobject, record_ids, fields)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves several records from a list of Salesforce record IDs, and returns a list of record Structs. Internally it builds a SOQL &amp;lt;code&amp;gt;IN (...)&amp;lt;/code&amp;gt; condition from the IDs.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceGetRecords( Sf, &amp;quot;Contact&amp;quot;, Contact_ids, &amp;quot;Id, Name, Email&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceGetRecords(sf; sobject: Text; record_ids: List; fields: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceField&amp;quot;&amp;gt;SalesforceField(record, field_path, ''default_value'')&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Reads a field from a Salesforce record Struct when the field name is a text value. A dotted «field_path» traverses relationship Structs.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Contact_record, &amp;quot;Email&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Contact_record, &amp;quot;Account.Name&amp;quot;, &amp;quot;No account&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It returns «default_value», &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt; by default, when the member is absent or it can't traverse the path.&lt;br /&gt;
&lt;br /&gt;
When you already know the field name as you write the Definition, direct Struct access is simpler:&lt;br /&gt;
:&amp;lt;code&amp;gt;Contact_record -&amp;gt; Email&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;SalesforceField&amp;lt;/code&amp;gt; for dynamic field names, dotted paths, or when you want a controlled default.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceField(record; field_path: Text; default_value := Null)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quoting text values ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceSoqlQuote&amp;quot;&amp;gt;SalesforceSoqlQuote(value)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Escapes a text value as a SOQL string literal and surrounds it with single quotes, handling quotes, backslashes, and control characters.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Name = &amp;quot; &amp;amp; SalesforceSoqlQuote( Customer_name )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;Customer_name&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;O'Reilly&amp;lt;/code&amp;gt;, this produces a valid quoted SOQL literal instead of letting the apostrophe terminate the value early.&lt;br /&gt;
&lt;br /&gt;
Use this function for '''values only'''. You can't safely turn Salesforce object or field API names into identifiers by quoting them -- the library validates those names instead.&lt;br /&gt;
&lt;br /&gt;
[[Intelligent Arrays|Array abstraction]] applies, so it also quotes a list of values. [[#SalesforceGetRecords|SalesforceGetRecords]]() relies on this when it builds its &amp;lt;code&amp;gt;IN (...)&amp;lt;/code&amp;gt; condition.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceSoqlQuote(value: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Metadata functions ==&lt;br /&gt;
&lt;br /&gt;
These functions help you discover the API names and properties available to the authenticated integration user.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceObjects&amp;quot;&amp;gt;SalesforceObjects(sf)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns a list of summary Structs for the Salesforce objects that the authenticated user can see.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceObjects( Sf )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Useful members usually include the object's API &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, its display &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;, and capability flags. Salesforce supplies the exact members, which vary by API release and object type.&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceObjects(sf)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceDescribe&amp;quot;&amp;gt;SalesforceDescribe(sf, sobject)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns Salesforce's full metadata description for an object, including its fields, relationships, picklist entries, and access capabilities.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceDescribe( Sf, &amp;quot;Opportunity&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceDescribe(sf; sobject: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceFields&amp;quot;&amp;gt;SalesforceFields(sf, sobject)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Returns just the list of field metadata Structs from [[#SalesforceDescribe|SalesforceDescribe]](). Use it to find field API names, types, labels, whether a field can be filtered, and its allowed picklist values.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceFields( Sf, &amp;quot;Account&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceFields(sf; sobject: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Search ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;SalesforceSearch&amp;quot;&amp;gt;SalesforceSearch(sf, sosl)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a Salesforce Object Search Language (SOSL) expression and returns its &amp;lt;code&amp;gt;searchRecords&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
SOQL queries known objects and fields; SOSL searches text across one or more objects. Use &amp;lt;code&amp;gt;SalesforceSearch&amp;lt;/code&amp;gt; when your search spans object types, or when it resembles a text search more than a structured query.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
SalesforceSearch( Sf,&lt;br /&gt;
    &amp;quot;FIND {Acme} IN NAME FIELDS &amp;quot; &amp;amp;&lt;br /&gt;
    &amp;quot;RETURNING Account(Id, Name), Contact(Id, Name, Email)&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the full SOSL syntax, see the Salesforce [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/ SOQL and SOSL Reference].&lt;br /&gt;
&lt;br /&gt;
[[Parameter types]]: &amp;lt;code&amp;gt;SalesforceSearch(sf; sosl: Text)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Working with returned records ==&lt;br /&gt;
&lt;br /&gt;
The library represents Salesforce JSON objects as Analytica [[Struct]]s, and collections as lists. Given:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
Variable Result ::= SalesforceSelect( Sf, &amp;quot;Account&amp;quot;, &amp;quot;Id, Name, Owner.Name&amp;quot;,&lt;br /&gt;
        where: &amp;quot;BillingCountry = &amp;quot; &amp;amp; SalesforceSoqlQuote( Country ),&lt;br /&gt;
        order_by: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        row_limit: 100 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the records are:&lt;br /&gt;
:&amp;lt;code&amp;gt;Result -&amp;gt; records&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the first record is:&lt;br /&gt;
:&amp;lt;code&amp;gt;Result -&amp;gt; records[@=1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you can read a field directly:&lt;br /&gt;
:&amp;lt;code&amp;gt;Result -&amp;gt; records[@=1] -&amp;gt; Name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or through the helper, which also handles the dotted relationship path:&lt;br /&gt;
:&amp;lt;code&amp;gt;SalesforceField( Result -&amp;gt; records[@=1], &amp;quot;Owner.Name&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build an array from the record list, introduce an [[Index]] for the record position and extract the members you want over that Index.&lt;br /&gt;
&lt;br /&gt;
== Error handling and troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
The library raises an Analytica error when authentication fails, when Salesforce returns an unsuccessful HTTP status, when a record ID is malformed, when an object or field API name is invalid, or when a query exceeds «max_pages».&lt;br /&gt;
&lt;br /&gt;
Common causes:&lt;br /&gt;
; Authentication fails&lt;br /&gt;
: Check the login URL, the consumer key and secret, the client-credentials setting, the '''Run As''' user, and the app authorization.&lt;br /&gt;
; &amp;lt;code&amp;gt;INVALID_FIELD&amp;lt;/code&amp;gt;, or an unknown field&lt;br /&gt;
: Use [[#SalesforceFields|SalesforceFields]]() to check the field's API name. The display label is often not the API name.&lt;br /&gt;
; Insufficient access&lt;br /&gt;
: Check the integration user's API permission, object permissions, field-level security, sharing access, and permission-set assignments.&lt;br /&gt;
; No records returned&lt;br /&gt;
: Try a simpler query, confirm the integration user can see the records, and inspect &amp;lt;code&amp;gt;total_size&amp;lt;/code&amp;gt; in the query-result Struct.&lt;br /&gt;
; Query exceeds «max_pages»&lt;br /&gt;
: Add a selective &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; clause or a &amp;lt;code&amp;gt;LIMIT&amp;lt;/code&amp;gt;. Raise «max_pages» only when you intend the larger transfer.&lt;br /&gt;
; Sandbox authentication fails&lt;br /&gt;
: Use &amp;lt;code&amp;gt;&amp;quot;https://test.salesforce.com&amp;quot;&amp;lt;/code&amp;gt;, unless your organization requires a specific My Domain login URL.&lt;br /&gt;
; The network request fails&lt;br /&gt;
: Confirm that the computer running Analytica reaches the Salesforce login and instance domains over HTTPS, and that any proxy or firewall permits the requests.&lt;br /&gt;
&lt;br /&gt;
An HTTP 401 gets its own message asking you to recalculate the authentication and the connection, then retry -- the access token has expired or been revoked.&lt;br /&gt;
&lt;br /&gt;
== Function summary ==&lt;br /&gt;
&lt;br /&gt;
:{| class=wikitable&lt;br /&gt;
! Function&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClientCredentialsAuth|ClientCredentialsAuth]]()&lt;br /&gt;
| Authenticate with the OAuth 2.0 client-credentials flow&lt;br /&gt;
|-&lt;br /&gt;
| [[#Salesforce|Salesforce]]()&lt;br /&gt;
| Create the REST connection Struct&lt;br /&gt;
|-&lt;br /&gt;
| [[#SoapLoginAuth|SoapLoginAuth]]()&lt;br /&gt;
| Legacy SOAP authentication. Migrate before 1-Jun-2027&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceSelect|SalesforceSelect]]()&lt;br /&gt;
| Build and run a common SOQL &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceQuery|SalesforceQuery]]()&lt;br /&gt;
| Run complete SOQL and retrieve all pages&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceQueryFirst|SalesforceQueryFirst]]()&lt;br /&gt;
| Return the first matching record, or &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceCount|SalesforceCount]]()&lt;br /&gt;
| Return the total matching-record count&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceQueryPage|SalesforceQueryPage]]()&lt;br /&gt;
| Retrieve one query page manually&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceGetRecord|SalesforceGetRecord]]()&lt;br /&gt;
| Retrieve one record by ID&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceGetRecords|SalesforceGetRecords]]()&lt;br /&gt;
| Retrieve several records from a list of IDs&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceField|SalesforceField]]()&lt;br /&gt;
| Read a dynamic or dotted field path from a record&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceSoqlQuote|SalesforceSoqlQuote]]()&lt;br /&gt;
| Quote a text value safely for SOQL&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceObjects|SalesforceObjects]]()&lt;br /&gt;
| List the objects visible to the authenticated user&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceDescribe|SalesforceDescribe]]()&lt;br /&gt;
| Retrieve full metadata for an object&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceFields|SalesforceFields]]()&lt;br /&gt;
| List the field metadata for an object&lt;br /&gt;
|-&lt;br /&gt;
| [[#SalesforceSearch|SalesforceSearch]]()&lt;br /&gt;
| Run SOSL and return the search records&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
The Salesforce REST library was introduced in August 2026, and requires [[Analytica 7.1]] or later. The Constant &amp;lt;code&amp;gt;Salesforce_library_version&amp;lt;/code&amp;gt; in the library holds its version number, currently &amp;lt;code&amp;gt;1.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReadFromUrl]]() -- the function this library is built on&lt;br /&gt;
* [[ParseJSON]]() -- parses the JSON that Salesforce returns&lt;br /&gt;
* [[Struct]] -- the data structure used for connections, records, and query results&lt;br /&gt;
* [[Additional libraries]]&lt;br /&gt;
* [[OpenAI API library]]&lt;br /&gt;
* [[Database library]]&lt;br /&gt;
* Salesforce [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/ SOQL and SOSL Reference]&lt;br /&gt;
* Salesforce [https://developer.salesforce.com/docs/platform/mobile-sdk/guide/oauth-client-credentials-flow.html OAuth 2.0 Client Credentials Flow]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=File:Salesforce_REST_library.ana&amp;diff=64256</id>
		<title>File:Salesforce REST library.ana</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=File:Salesforce_REST_library.ana&amp;diff=64256"/>
		<updated>2026-08-14T17:43:13Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: The Salesforce REST library for Analytica -- a REST + JSON client for the Salesforce API v67.0. Supports OAuth 2.0 client-credentials authentication (and legacy SOAP login), paginated SOQL queries, record retrieval, SOSL search, and sObject metadata. Library version 1.01. Requires Analytica 7.1 {{Analytica Developer}} edition or better.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
The [[Salesforce REST library]] for Analytica -- a REST + JSON client for the Salesforce API v67.0. Supports OAuth 2.0 client-credentials authentication (and legacy SOAP login), paginated SOQL queries, record retrieval, SOSL search, and sObject metadata. Library version 1.01. Requires [[Analytica 7.1]] {{Analytica Developer}} edition or better.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64255</id>
		<title>Salesforce REST library</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64255"/>
		<updated>2026-08-14T17:30:30Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Requires [[Analytica 7.1]] {{Developer}} edition or better&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64254</id>
		<title>Salesforce REST library</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Salesforce_REST_library&amp;diff=64254"/>
		<updated>2026-08-14T17:29:41Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Created page with &amp;quot;''Requires Analytica 7.1 {{Developer Edition}} or better&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Requires [[Analytica 7.1]] {{Developer Edition}} or better&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=ReadFromUrl&amp;diff=64253</id>
		<title>ReadFromUrl</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=ReadFromUrl&amp;diff=64253"/>
		<updated>2026-08-14T17:28:54Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Database Functions]]&lt;br /&gt;
[[Category:Image and canvas functions]]&lt;br /&gt;
[[Category:Integration Functions]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
Reads a page or text file from a URL and returns the result as a text value.&lt;br /&gt;
&lt;br /&gt;
''Requires Analytica Enterprise''&lt;br /&gt;
&lt;br /&gt;
== ReadFromUrl(url) ==&lt;br /&gt;
&lt;br /&gt;
This function can read text data from an HTTP or HTTPs page (a standard or secure web page), from FTP, or from GOPHER.  You can also submit data as would occur on a web page when a user submits an HTTP form.  You can also use it to &amp;quot;call&amp;quot; a web service to obtain data.  Its result is a text value. You can use functions like [[ParseCSV]]() to parse the text into data.&lt;br /&gt;
&lt;br /&gt;
There are several optional parameters:&lt;br /&gt;
;«method»: The HTTP method, usually &amp;quot;GET&amp;quot; or &amp;quot;POST&amp;quot;.  More esoteric methods include &amp;quot;HEAD&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;,  &amp;quot;OPTIONS&amp;quot;.  The verbs &amp;quot;CONNECT&amp;quot;, &amp;quot;PATCH&amp;quot; and &amp;quot;TRACE&amp;quot; cannot be used.&lt;br /&gt;
;«formFields», «formValues», «formIndex»: Data for form field values to submit to a web page.  Usually, you use «formValues» as an array indexed by «formFields», or if they both have a single common index.  If  «formValues» and «formFields» have multiple indexes in common, you should specify the common index as «formIndex».&lt;br /&gt;
;«httpHeaders»: Additional HTTP headers (separate with &amp;lt;code&amp;gt;Chr(13)&amp;lt;/code&amp;gt;).&lt;br /&gt;
;«httpContent»: custom submitted HTTP content&lt;br /&gt;
;«fieldHeaders»: Used only when sending multi-part requests. In multipart messages, the parts and the content for each part are passed in the «formFields» and «formValues» parameters, and can be text, images or binary blobs. But in general you also can specify separate httpHeaders for each part, which are passed in this parameter. The «httpHeaders» is for the full message, whereas the headers here (each is multi-line text) are the headers for each part. «fieldHeaders» is indexed by «formIndex». By specifying this parameter, the message will be configured as multipart.&lt;br /&gt;
;«connectTimeoutMs», «sendTimeoutMs», «receiveTimeoutMs»: Timeouts for the key stages of connecting to the server, sending the request, and receiving the response, each expressed in milliseconds.{{Release|6.5||&lt;br /&gt;
;«connectionType»: One of &amp;lt;code&amp;gt;'asyncWait'&amp;lt;/code&amp;gt; (default), &amp;lt;code&amp;gt;'synchronous'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'asynchronous'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'SSE'&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;'websocket'&amp;lt;/code&amp;gt;.  When &amp;lt;code&amp;gt;'asynchronous'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'SSE'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'websocket'&amp;lt;/code&amp;gt;, a «webConnection» object is returned instead of a response. }}&lt;br /&gt;
&lt;br /&gt;
== Return values ==&lt;br /&gt;
[[ReadFromUrl]] has multiple return values:&lt;br /&gt;
# The response. Could be text, image, or [[In-memory binary data terms|binary]].&lt;br /&gt;
# HTTP status code.  This is 200 when successful.&lt;br /&gt;
# HTTP status code textual description.&lt;br /&gt;
# The HTTP response headers&lt;br /&gt;
# The content-type (if specified)&lt;br /&gt;
&lt;br /&gt;
For example, to capture the status code, use:&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] ( response, code ) {{eq}}  [[ReadFromUrl]](....);&amp;lt;/code&amp;gt;&lt;br /&gt;
or to avoid a warning and handle a code &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; yourself,&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] ( response, code, errMsg, headers, contentType )  {{eq}} [[IgnoreWarnings]]([[ReadFromUrl]](....));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Release|6.5||&lt;br /&gt;
When «connectionType» is &amp;lt;code&amp;gt;'asynchronous'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'SSE'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'websocket'&amp;lt;/code&amp;gt;, the return value is a «webConnection» object and there are no auxillary return values (they aren't available yet). In these cases, [[ReadFromUrl]] returns immediately without waiting for the response. You then use the methods [[_WebConnectionStatus]], [[_WebConnectionRead]], [[_WebConnectionSend]] (web sockets only), and [[_WebConnectionClose]] to receive the content.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Reading from a Web page ==&lt;br /&gt;
To read the contents of a web page,usually in HTML format, just supply the URL, e.g.:&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;http://lumina.com&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you omit the &amp;quot;http://&amp;quot; part, it defaults to an http query, e.g.:&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;lumina.com&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining an image from a web page ==&lt;br /&gt;
ReadFromUrl() can download images with standard formats (i.e., JPG, PNG, GIF, etc) from HTTP pages by supplying the URL, e.g.:&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;analytica.com/wp-content/uploads/2023/07/analytica-img.png&amp;quot;)&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The result is a picture value object.  You can assign the result to the [[Attributes#Node attributes|Pict]] attribute of an object on a diagram to view the image in the model (and to cause the image to be saved with the model file).&lt;br /&gt;
&lt;br /&gt;
== Submitting Data to a Web Page ==&lt;br /&gt;
&lt;br /&gt;
To simulate the submission of HTML form data when querying a web page, you can submit the information using either GET or POST methods.  With a GET method, you normally see the parameters appear on the URL itself.  With a POST method, you normally don't see the parameters -- they are passed in the body of the HTTP request.&lt;br /&gt;
&lt;br /&gt;
To submit form data, you can set up an table of fields values indexed by field names, usally as an index as a list-of-labels. &lt;br /&gt;
The function call uses these parameters:&lt;br /&gt;
:[[ReadFromUrl]](url, method, formValues, formFields'', formIndex'')&lt;br /&gt;
&lt;br /&gt;
You only need to specify the «formIndex» parameter if «formValues» and «formFields» are arrays that may have more than one index in common. &lt;br /&gt;
&lt;br /&gt;
For example, the following queries Google for &amp;quot;Analytica&amp;quot;:&lt;br /&gt;
:&amp;lt;code&amp;gt;INDEX fieldNames := [&amp;quot;hl&amp;quot;, &amp;quot;q&amp;quot;];&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;VARIABLE form := Array(fieldNames, [&amp;quot;en&amp;quot;, &amp;quot;Analytica&amp;quot;]);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;http://google.com/search&amp;quot;, &amp;quot;GET&amp;quot;, form, fieldNames)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It returns the result in HTML format.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry about URL-encoding the field names or values.  If  they containnon-alpha numeric characters in either, it will encode them before they are submitted.&lt;br /&gt;
&lt;br /&gt;
=== Submitting multi-part data ===&lt;br /&gt;
''Requires [[Analytica 6.4]]''&lt;br /&gt;
&lt;br /&gt;
Data sent in an HTTP &amp;lt;code&amp;gt;method:post&amp;lt;/code&amp;gt; can usually be formatted in two ways:&lt;br /&gt;
* &amp;lt;code&amp;gt;Content-Type:application/x-www-form-urlencoded&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Content-Type:multipart/form-data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a form value contains [[In-memory binary data terms|binary data]] or an image, you must use the multipart format. By default, it uses &amp;lt;code&amp;gt;Content-Type:application/x-www-form-urlencoded&amp;lt;/code&amp;gt; when possible, but uses &amp;lt;code&amp;gt;Content-Type:multipart/form-data&amp;lt;/code&amp;gt; when a form value requires a multipart format.&lt;br /&gt;
&lt;br /&gt;
To force a multipart format when it is not required (e.g.  if the web-service you requires a multipart format), include the header explicitly, e.g.:&lt;br /&gt;
:&amp;lt;code&amp;gt;[[ReadFromURL]]( url, method:'POST', formValues:vals, formIndex:I, httpHeaders: 'Content-Type:multipart/form-data' )&amp;lt;/code&amp;gt;&lt;br /&gt;
Or you can specify the «fieldHeaders» parameter (even by passing it an empty string). &lt;br /&gt;
In either case, it generates a boundary string between parts. If you provide your own boundary, it will use it, but you need to be careful that this exact sequence of bytes does not appear in any of the content.  For example&lt;br /&gt;
:&amp;lt;code&amp;gt;[[ReadFromURL]]( url, method:'POST', formValues:vals, formIndex:I, httpHeaders: 'Content-Type:multipart/form-data;boundary=MyBoundary' )&amp;lt;/code&amp;gt;&lt;br /&gt;
would malfunction if one of your vals contains the byte sequence &amp;quot;MyBoundary&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When sending multi-part data, you may also want to add custom headers to individual items. You can do this using the «fieldHeaders» parameter, which also uses the «formIndex». One example is when you want a field to appear to be the contents of a file and you want to provide the file name.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[LocalIndex]] Field := ['Date','Upload'];&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] fileContents := [[ReadBinaryFile]]( filename, typeFlags: 7 {binary data blob} );&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] values:= [[Array]]( Field, [ Today(), fileContents ] );&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] specialHeader := f&amp;quot;Content-Disposition: form-data; name=&amp;quot;&amp;quot;File&amp;quot;&amp;quot;; filename=&amp;quot;&amp;quot;{filename}&amp;quot;&amp;quot;&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] fieldHeaders := [[Array]]( Field, [ &amp;quot;&amp;quot;, specialHeader ] );&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[ReadFromURL]]( url, 'Post', formValues: values, formIndex: Field, fieldHeaders: fieldHeaders )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this code, specialHeader creates a header field for the form item 'Upload' which includes the file name. The server who receives this will think you used an HTML file upload field to select a file named ''filename''.  In addition, the server will see the field name as being &amp;lt;code&amp;gt;&amp;quot;File&amp;quot;&amp;lt;/code&amp;gt; (from the specialHeader) overriding the name &amp;quot;Upload&amp;quot; in the «formIndex» parameter.&lt;br /&gt;
&lt;br /&gt;
Note that if you are not adding a filename or altering the usual &amp;lt;code&amp;gt;Content-Disposition&amp;lt;/code&amp;gt;, you don't have to specify it as a fieldHeader. If you don't specify it, the function automatically creates &amp;lt;code&amp;gt;Content-Disposition&amp;lt;/code&amp;gt; for each part.&lt;br /&gt;
&lt;br /&gt;
A second common case where you might need to customize the «fieldHeaders» is when you need to customize the &amp;lt;code&amp;gt;Content-Type&amp;lt;/code&amp;gt;. For example, suppose you upload a video file, which you read into memory as a [[In-memory binary data terms|binary data term]]. If you don't specify the content-type, it will default to &amp;lt;code&amp;gt;Content-Type: application/octet-stream&amp;lt;/code&amp;gt;. Thus, you might specify it for the field:&lt;br /&gt;
:&amp;lt;code&amp;gt;[[ReadFromURL]](url, &amp;quot;Post&amp;quot;, vals, fields, I, fieldHeaders: If I=&amp;quot;video clip&amp;quot; then &amp;quot;Content-Type: video/mp4&amp;quot; else &amp;quot;&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are sending only a single image or a single [[In-memory binary data terms|binary data term]], it is usually simpler to pass it as the «httpContent» rather than using form fields at all. In that case the message is a single part (not multipart) body, assuming you also control what the receiving side expects.&lt;br /&gt;
&lt;br /&gt;
== Obtaining content from an FTP site ==&lt;br /&gt;
To obtain content from an FTP site, use:&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;ftp://site.com/directory/file.txt&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content must be textual.  Binary files will be corrupted as they are read into a text value (specifically, '\0' characters will be converted to spaces).  &lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
FTP sites usually require user and password authentication, as do web services and some web pages.  You can embed the user name and password in the URL like this:&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;http://user:password@www.site.com/dir/page.htm&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;ftp://user:password@www.site.com/dir/page.htm&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the user or password contains any of the special characters &amp;lt;code&amp;gt;@ : / ? #&amp;lt;/code&amp;gt;, these must be percent encoded. Thus an email user name, &amp;lt;code&amp;gt;john.doe@gmail.com&amp;lt;/code&amp;gt;, would be &lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromURL(&amp;quot;https://john.doe%40gmail.com@domain.com&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the % codes for the other special chars that might appear in a username or password:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Char !! Code &lt;br /&gt;
|-&lt;br /&gt;
! Space || %20&lt;br /&gt;
|-&lt;br /&gt;
! @ || %40&lt;br /&gt;
|-&lt;br /&gt;
! : || %3A&lt;br /&gt;
|-&lt;br /&gt;
! / || %2F&lt;br /&gt;
|-&lt;br /&gt;
! ? || %3F&lt;br /&gt;
|-&lt;br /&gt;
! # || %23&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sending data CGI scripts and proprietary web services ==&lt;br /&gt;
&lt;br /&gt;
If you call a CGI service, the CGI program will accept input in its own format, which could be arbitrary.  You can send this data as follows:&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;http://server.com/cgi-bin/myProgram.cgi&amp;quot;, httpContent: data)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, ''data'' contains the data that you are submitting to the CGI script.  This data will form the body of the HTTP request.  Content may only be used with HTTP requests, not with FTP or Gopher requests.&lt;br /&gt;
&lt;br /&gt;
Various web services fall into this category as well, where data being submitted via HTTP may be in a proprietary format.&lt;br /&gt;
&lt;br /&gt;
In some cases, you may also need to include additional HTTP headers in your request.  You can insert these using the optional «httpHeaders» parameter.  If you have more than one HTTP header, separate them using a CR character, [[Chr]](13).  If you enter these into a definition (e.g., with quotes), you can just type a new line, or if you enter them into a single edit table cell, pressing ''ALT-ENTER'' to insert a CR (new-line) into the cell.  Otherwise, you can use the &amp;amp; operator to concatenate each header line with [[Chr]](13).&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ReadFromUrl(&amp;quot;http://somehost.com&amp;quot;, httpHeaders: &amp;quot;Accept:text/xml&amp;quot;&amp;amp;Chr(13)&amp;amp;&amp;quot;User-Agent:MyModel.ana&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content value is passed directly with no special encoding of characters.&lt;br /&gt;
&lt;br /&gt;
== HTTP Status Codes ==&lt;br /&gt;
During an HTTP request, if the status code returned by the server is greater than or equal to 400, [[ReadFromUrl]] issues a warning displaying the status code and status text, unless the '''Show Result Warnings''' preference is turned off.&lt;br /&gt;
&lt;br /&gt;
== Proxy Servers ==&lt;br /&gt;
[[ReadFromUrl]] uses information stored in the system registry to determine whether or a proxy server should be used to access the internet.  The configuration can be set up using Internet Explorer or Chrome web browsers (but not through Firefox).  The proxy configuration is stored in the system registry in the hive:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the registry values ''ProxyEnable'', ''ProxyServer'' and ''ProxyOverride''.&lt;br /&gt;
&lt;br /&gt;
It should work with TIS, SOCKS and CERN style proxy servers as long as Internet Explorer is installed (SOCKS support requires IE).&lt;br /&gt;
&lt;br /&gt;
{{Release|6.5||&lt;br /&gt;
== Connection types ==&lt;br /&gt;
In most situations, [[ReadFromUrl]] sends a request to a remote server then waits until it has received the response. It then returns the response. This is synchronous operation.  This occurs when you omit the «connectionType» parameter, or when you specify it as &amp;lt;code&amp;gt;'asynchWait'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'synchronous'&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;'synchronous'&amp;lt;/code&amp;gt; option is fully synchronous, turning control over to the operating system while it waits for a response. The downside of this is that no window events arrive to the Analytica process during this time, which means the screen cannot redraw and the application cannot respond to Ctrl+Break, etc. In [[Analytica 6.4]] and earlier, this is the mode that was used by [[ReadFromUrl]]. This fully synchronous connection type is the lowest in complexity, so it can serve as a fallback if you discover an unexpected problem in the default &amp;lt;code&amp;gt;'asynchWait'&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;'asynchWait'&amp;lt;/code&amp;gt; method is synchronous as far as your model and code is concerned, but it allows Windows events to arrive and be processed. It can be aborted by pressing Ctrl+Break or Stop calculation. And the screen can redraw while you are waiting. But as with fully synchronous operation, the function call does not return until the full response is received, and the response is then returned directly as the return value of [[ReadFromUrl]].&lt;br /&gt;
&lt;br /&gt;
The remaining connection types are asynchronous. In these cases, [[ReadFromUrl]] returns immediately without waiting for the response from the server. These are each discussed in the next subsections.&lt;br /&gt;
&lt;br /&gt;
=== Asynchronous connections ===&lt;br /&gt;
With an &amp;lt;code&amp;gt;'asynchronous'&amp;lt;/code&amp;gt; «connectionType», [[ReadFromUrl]] returns immediately, allowing your code to work on something else while the server works on your request. This would be applicable to RESTful web services that take a long time to process AND where your code has something it can work on concurrently, or when you want to launch multiple concurrent web service calls so that they can process concurrently.  If you aren't computing while waiting or launching multiple simultaneous calls, then you probably don't want to use an &amp;lt;code&amp;gt;'asynchronous'&amp;lt;/code&amp;gt; connection type, simply because it is more complex for your own code.&lt;br /&gt;
&lt;br /&gt;
When you specify &amp;lt;code&amp;gt;connectionType: 'asynchronous'&amp;lt;/code&amp;gt;, [[ReadFromUrl]] returns a «webConnection» object immediately. You can then call&lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionStatus( wc )&amp;lt;/code&amp;gt;&lt;br /&gt;
to test the status, which moves through the stages: &amp;lt;code&amp;gt;'Connecting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Done'&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;'Closed'&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can receive the message with &lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionRead(wc)&amp;lt;/code&amp;gt;&lt;br /&gt;
which blocks until the message arrives.  Or you can use&lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionRead(wc, block:false)&amp;lt;/code&amp;gt;&lt;br /&gt;
which returns immediately. If so message is available (i.e., &amp;lt;code&amp;gt;_WebConnectionStatus(wc)&amp;lt;/code&amp;gt; is something other than &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt;), it returns Null.&lt;br /&gt;
&lt;br /&gt;
An asynchronous connections is one-directional, so [[_WebConnectionSend]] does nothing. Also, the entire message, when ready, is received in a single call to [[_WebConnectionRead]]. If you were to call it multiple times (in the &amp;lt;code&amp;gt;'Done'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'Closed'&amp;lt;/code&amp;gt; states), it would simply return null.&lt;br /&gt;
&lt;br /&gt;
When you are done, you can close the connection by releasing the «webConnection», or by calling &amp;lt;code&amp;gt;_WebConnectionClose(wc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once you have stored (cached) the «webConnection» object, so that it is not released, then stop-calculation events, such as when you press Ctrl+Break, do not cancel the communication. However, if you are only holding the «webConnection» in a local variable and the calculation aborts, then the «webConnection» will, in general, be released, thus closing the connection.&lt;br /&gt;
&lt;br /&gt;
=== Streaming responses (SSE) ===&lt;br /&gt;
&lt;br /&gt;
Server-Sent Events (SSE) is a standard used when the HTTP server streams the response rather than sending it all at once. The response is a sequence of messages (events), and you can process these message-by-message as they arrive by setting «connectionType» to &amp;lt;code&amp;gt;'sse'&amp;lt;/code&amp;gt; (or to &amp;lt;code&amp;gt;'stream'&amp;lt;/code&amp;gt;, which is a synonym). SSE is still a uni-directional communication channel, with the server sending the events only as a stream. After the initial request, the client cannot send additional data to the server.&lt;br /&gt;
&lt;br /&gt;
Most people have used ChatGPT and thus seen an example of streaming SSE in action. In the case of ChatGPT, the server sends one token at a time to the UI, and you see the response appear token-by-token without having to wait for the entire response to appear.&lt;br /&gt;
&lt;br /&gt;
To use SSE streaming, specify &amp;lt;code&amp;gt;connectionType: 'sse'&amp;lt;/code&amp;gt; (or synonymously, &amp;lt;code&amp;gt;connectionType: 'stream'&amp;lt;/code&amp;gt;).  A «webConnection» is returned immediately.  Use &lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionStatus(wc)&amp;lt;/code&amp;gt;&lt;br /&gt;
to monitor the status of incoming messages. The status moves through the states: &amp;lt;code&amp;gt;'Connecting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt;, ...., and &amp;lt;code&amp;gt;'Closed'&amp;lt;/code&amp;gt;. If a message arrives before you have read it, then it skips the &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt; state.&lt;br /&gt;
&lt;br /&gt;
To read the next incoming message, use&lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionRead(wc)&amp;lt;/code&amp;gt;&lt;br /&gt;
If the next message has not yet arrived, this waits (blocks) until it arrives. Or you can call&lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionRead(wc, block:false)&amp;lt;/code&amp;gt;&lt;br /&gt;
which return Null if a full message has not yet been received.&lt;br /&gt;
&lt;br /&gt;
You will read each event message successively by iterating over calls to [[_WebConnectionRead]]. The SSE standard does not have a standard for flagging the end of the stream, but many specific applications agree on a common convention. For example, the OpenAI API sends &amp;lt;code&amp;gt;&amp;quot;[DONE]&amp;quot;&amp;lt;/code&amp;gt; as the last message. However, with or without a special closing message, either side might close the connection. Once closed, [[_WebConnectionRead]] will simple return Null, so to avoid an infinite loop you should also check that [[_WebConnectionStatus]] is not equal to &amp;lt;code&amp;gt;'Closed'&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because SSE is not bi-directional, the [[_WebConnectionSend]] method does nothing with an 'SSE' connection.&lt;br /&gt;
&lt;br /&gt;
=== Websocket connections ===&lt;br /&gt;
A Websocket is a bi-directional communication standard, which starts with an HTTP request. Your client model can send and receive messages with the server in any order, and the connection can remain open for an extended period of time. &lt;br /&gt;
&lt;br /&gt;
Server URLs that expect a websocket connection usually start with a &amp;lt;code&amp;gt;ws://&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;wss://&amp;lt;/code&amp;gt;, but this is only a convention and not required. The way to tell [[ReadFromUrl]] to open a websocket connection is to specify &amp;lt;code&amp;gt;connectiontype:'websocket'&amp;lt;/code&amp;gt;, as in&lt;br /&gt;
:&amp;lt;code&amp;gt;[[ReadFromUrl]]( &amp;quot;ws://acme.org/interactive&amp;quot;, connectionType: 'websocket' )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[ReadFromUrl]] call returns after the header response has been received, and if the server has agreed to the websocket upgrade, it returns a «webConnection» object. If the server does not upgrade, then it returns the response in the same way an &amp;lt;code&amp;gt;'asynchWait'&amp;lt;/code&amp;gt; call would (i.e., as text in most cases). There is a good chance that this response contains error message information from the server.&lt;br /&gt;
&lt;br /&gt;
Use [[_WebConnectionStatus]] to examine the current status of the connection, which moves through the states &amp;lt;code&amp;gt;'Waiting'&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt; multiple times as messages are received and read. Eventually if either side closes the connection, the status becomes &amp;lt;code&amp;gt;'Closing'&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To read the next incoming message, you might optionally check the [[_WebConnectionStatus]] to make sure it is &amp;lt;code&amp;gt;'ResponseReady'&amp;lt;/code&amp;gt;, and then call&lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionRead(ws)&amp;lt;/code&amp;gt;&lt;br /&gt;
to receive the message.  To send a message, call&lt;br /&gt;
:&amp;lt;code&amp;gt;_WebConnectionSend(ws, &amp;quot;Hello out there&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
Messages are asynchronous is both direction, so the client and server don't need to alternate. &lt;br /&gt;
&lt;br /&gt;
To close the connection, release the «webConnection» object, or call &amp;lt;code&amp;gt;_WebConnectionClose(ws)&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
The function waits until the full request from the server has been received.  It does not respond to ''Ctrl+Break''.  Some requests (e.g. if there is a problem), may take a while to time out before you can return to using Analytica.&lt;br /&gt;
&lt;br /&gt;
On computers that aren't always connected to the internet, or need to dial up a modem or other connection to obtain access, the function does nothing to attempt to establish a connection.  It will simply fail with an error.&lt;br /&gt;
&lt;br /&gt;
Several possible error conditions return a cryptic message with only an error code number.&lt;br /&gt;
&lt;br /&gt;
If cannot download binary data.  It can only obtain text or pictures from HTTP sources.&lt;br /&gt;
 &lt;br /&gt;
It cannot access file system files, e.g., you can't use a url starting with &amp;quot;file://...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
[[ReadFromUrl]] was introduced in [[Analytica 4.2]].&lt;br /&gt;
&lt;br /&gt;
[[Analytica 6.4]] added support useful for some web service calls that includes&lt;br /&gt;
* the transfer of [[In-memory binary data terms|binary data]]&lt;br /&gt;
* multi-part message payloads in both directions&lt;br /&gt;
* Explicit control over timeouts&lt;br /&gt;
* Access to the HTTP status code and text, the HTTP response headers, and the content type (as aux return values).&lt;br /&gt;
&lt;br /&gt;
[[Analytica 6.5]] added asynchronous connection types ([[WebConnections]]), and the &amp;lt;code&amp;gt;'asynchWait'&amp;lt;/code&amp;gt; connection type that responds to Ctrl+Break and windows events (like redraw events) while waiting for a lengthy web service call.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{Release|6.5||&lt;br /&gt;
* [[WebConnections]]}}&lt;br /&gt;
{{Release|6.6||&lt;br /&gt;
* [[OAuth2Authorize]]}}&lt;br /&gt;
* [[OpenURL]]&lt;br /&gt;
* [[ReadTextFile]]&lt;br /&gt;
* [[RunConsoleProcess]]&lt;br /&gt;
* [[ReadImageFile]]&lt;br /&gt;
* [[TextCharacterEncode]]&lt;br /&gt;
* [[Retrieving Content From the Web]]&lt;br /&gt;
* [[Links or URL in model attributes]]&lt;br /&gt;
* Analytica example model: &amp;lt;code&amp;gt;&amp;quot;Function Examples/Map images from internet.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Salesforce REST library]] -- An Analytica library for querying Salesforce from a model.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Tutorial:_Arrays&amp;diff=64245</id>
		<title>Tutorial: Arrays</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Tutorial:_Arrays&amp;diff=64245"/>
		<updated>2026-08-12T17:24:02Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
[[Category:Analytica Tutorial]]&lt;br /&gt;
&amp;lt;breadcrumbs&amp;gt;Analytica Tutorial &amp;gt; {{PAGENAME}}&amp;lt;/breadcrumbs&amp;gt;&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
This section (page) introduces you to [[Intelligent Arrays]], which is source of much of Analytica's power and flexibility.  An array is a table of values, with one, two, or more dimensions. Even if you often skip tutorials, you may find it valuable to go through this section, because Analytica arrays have some unique  aspects different from other modeling tools and computer languages. And it's essential to understand the basics of arrays before you can use Analytica effectively.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This chapter shows you how to:&lt;br /&gt;
* Create and define an Index&lt;br /&gt;
* Define an array variable as a Table&lt;br /&gt;
* Understand principles of array abstraction when combining arrays in an expression&lt;br /&gt;
* Use conditional expressions and logical values when defining an array&lt;br /&gt;
* Define variables using Expression syntax&lt;br /&gt;
* Use local values to simplify an expression&lt;br /&gt;
* Analyze a multi-dimensional result by pivoting indexes&lt;br /&gt;
* Reduce an array using subscripts&lt;br /&gt;
* Use array reducing functions such as [[Sum]]() and [[NPV]]()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
In the previous chapter you defined a single variable, '''Miles per gallon''', as a list of values. This is an example of a simple one-dimensional array. When you defined '''Fuel cost''' using the '''Miles per gallon''' array variable as an input, it also became an array. This demonstrates the concept of [[Array Abstraction|array abstraction]]. Array variables can be used just like ordinary variables in expressions. Whenever you expand an index of the array to include more values, or even add an entirely new index along a new dimension, all dependent variables downstream will be extended automatically! [[Intelligent Arrays|Intelligent arrays]] allow you to scale your model without making any changes to the design. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
This section covers lots of ground. The example model is  simple, but demonstrates many important array concepts. The approach is  streamlined so you can learn the key ideas with-out getting bogged down with procedural details. You should already be familiar with the basic mechanics of Analytica‘s user interface, and know how to: &lt;br /&gt;
* Create a new model; Open an existing model; Save; Save As... (See [[Tutorial: Open a model to browse]]) &lt;br /&gt;
* Create and define new variables; Enter attributes in [[Attribute panel|Attribute]] or [[Object window]]s; Draw influence arrows between nodes. (See [[Tutorial: Create a model]])&lt;br /&gt;
&lt;br /&gt;
==Summarize variables using Expression syntax== &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
You will need to know how to enter definitions directly as [[Expression Syntax|Expressions]]. Every variable type and every functional expression can be represented this way. In addition to its usefulness in building models, expression syntax is a convenient and efficient way to summarize examples in the documentation. For example, this summarizes the '''Car cost '''model from the previous section:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable MPY := 12K&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable MPG := Sequence(20, 50, 5)&amp;lt;/code&amp;gt; &lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Fuel_price := 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Fuel_cost := MPY*Fuel_price/MPG&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
We summarize new variables in this form in this section. It is also widely used throughout the [[Analytica Docs|Docs]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
* The first term indicates the [[Class]] of the object being defined. Classes include '''Decision, Variable, Chance, Objective, Module, Index, Constant ''' and '''Function'''. &lt;br /&gt;
* The second term is the [[Identifier]] for the object. (Identifiers may not contain spaces.)&lt;br /&gt;
* &amp;lt;code&amp;gt;:=&amp;lt;/code&amp;gt; sometimes known as the [[Assignment Operator :=|assignment operator]]. &lt;br /&gt;
* The definition is an expression, which could be a number, function call, probability distribution, table, or other expression. It may refer to other variables (the &amp;quot;Inputs&amp;quot; of this variable. You could even copy the expression directly into the Definition of a variable or function.  The expressions are marked as  &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Fast Tony’s Generic Wheels== &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
In this chapter you extend the '''Car cost '''model to address an important decision scenario: the purchase of a new car. There are three cars to choose from: '''''Standard''''', '''''SUV '''''and '''''Hybrid'''''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
There are also three finance options: '''''Cash purchase''''', '''''Lease''''', or '''''Loan'''''. Fast Tony has presented you with an array of decision possibilities, a 3 x 3 array to be exact. Your objective is to determine the option with the lowest total cash outflow over a 24-month period, including fuel. (Maintenance costs are covered under warranty as long as Fast Tony’s cousin, Greasy Tony, is on his feet that day.) Ownership equity will be represented as a positive cash flow on the last period.&lt;br /&gt;
&lt;br /&gt;
==Continue with model== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
In this chapter, you will continue with the model you developed in [[Tutorial: Create a model]]. The model from the end of [[Tutorial: Create a model]] can be found in the '''Tutorial Models''' directory. Select '''Open''' on the '''File''' menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[Image:Chapter_5.1-updated.png]]|&lt;br /&gt;
{{CalloutAnnotation|Press the ''Example Models'' button.''|n=1|pt=43,95|v=20}}&lt;br /&gt;
{{CalloutAnnotation|Enter the '''Tutorial Models''' folder.|n=+|v=120}}&lt;br /&gt;
{{CalloutAnnotation|Open model from [[Tutorial%3A_Create_a_model#Saving_your_model_2|end of Chapter 4]].|pt=117,79|path=R10|n=+|v=220}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Create an index variable== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Index variables define the categories along a dimension of an array. They are represented by index nodes (parallelogram shapes) in the [[influence diagram]]. In this example, your decision will be arrayed by '''Car type''' and '''Finance Option''' so you will need to define an index for each of these dimensions. Index variables are generally defined as a ''list of labels'' or a ''list of values'' representing categories in the array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
(For the finance options you will leave out &amp;quot;Loan&amp;quot; for now. It will be added later.)&lt;br /&gt;
:&amp;lt;code&amp;gt;Index Car_type := ['Standard', 'SUV', 'Hybrid']&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Index Finance_option := ['Purchase', 'Lease']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
{{Release||4.6|&lt;br /&gt;
:[[File:Chapter_5.2-updated.png]]&lt;br /&gt;
}}{{Release|5.0||&lt;br /&gt;
{{CalloutAnnotationBlock|[[Image:TutChap5CreateIndexes.png]]|{{&lt;br /&gt;
CalloutAnnotation|For each of the index nodes listed above, do the following:|v=0|style=border:none;}}{{&lt;br /&gt;
CalloutAnnotation|Choose the Edit tool|n=1|path=-|pt=249,27|v=70}}{{&lt;br /&gt;
CalloutAnnotation|Drag the Index icon down to the diagram|n=+|path=/|pt=503,27|v=120}}{{&lt;br /&gt;
CalloutAnnotation|Enter a title for the node|n=+|v=190}}{{&lt;br /&gt;
CalloutAnnotation|Open the definition field and select '''List of text''' from the expression popup menu|n=+|v=270|pt=324,525|path=/}}{{&lt;br /&gt;
CalloutAnnotation|Enter labels as shown|n=+|v=400|pt=12,509}} }}&amp;lt;!--5.0--&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
{{#tag:tip|As an alternative to selecting '''''{{Release||4.6|List of Labels}}{{Release|5.0||List of Text}}''''' in [[the Expression popup menu]], you can select '''Expression''' and enter the definition directly using [[Expression Syntax|Expression syntax]]. Simply list the values separated by commas and encase them in square brackets &amp;lt;code&amp;gt;[ ]&amp;lt;/code&amp;gt;. Note that all text values in Expression syntax must be enclosed in quotes (single or double).}}&lt;br /&gt;
&lt;br /&gt;
==Defining a variable as a table== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Each of the cars has a unique purchase price. You will define '''Car price''' as a '''''Table''''' indexed by '''Car type'''. In this context, a &amp;quot;table&amp;quot; does not necessarily have two dimensions. It can have one (as in this case), two, three or more.&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Car_price := Table(Car_type)(22K, 40K, 24K)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[Image:Chapter_5.3-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Create a new variable titled '''Car price'''.|n=1|v=20|pt=76,87}}{{&lt;br /&gt;
CalloutAnnotation|Open the Definition field, then open the Expression popup menu. Select '''''Table'''''.|n=+|v=100|pt=326,400|path=R70!}}{{&lt;br /&gt;
CalloutAnnotation|The [[Indexes dialog]] appears. Select the '''Car type''' index and click the transfer button to move it to the selected indexes list. Click '''OK'''.|n=+|v=220|pt=486,160}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
After you close the [[Indexes dialog]] an [[Edit table]] will appear.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
Enter the following values for ''Car price'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
:Standard: ''''22K''''&lt;br /&gt;
:SUV: '''''40K''''&lt;br /&gt;
:Hybrid: ''''24K''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.4-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Click the index button if you want to go back to the [[Indexes dialog]].|v=0|pt=12,38}}{{&lt;br /&gt;
CalloutAnnotation|Index categories appear as table headings.|v=78|pt=10,134}}{{&lt;br /&gt;
CalloutAnnotation|Press '''Tab''' or '''Shift+Tab''' to move through the cells.|v=160|pt=122,161|path=-}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;tip&amp;gt;&lt;br /&gt;
You can draw influence arrows from index nodes to table variables to pre-populate the [[Indexes dialog]] with the chosen indexes. Influence arrows from index nodes are invisible by default but can be made visible by choosing the [[Diagram menu]] and selecting '''''Set diagram style'''''.&lt;br /&gt;
&amp;lt;/tip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
Next you will create a variable for lease payments. Fast Tony lists the following monthly payments for the two-year lease option:&lt;br /&gt;
:Standard: ''''$400''''&lt;br /&gt;
:SUV: '''''$700''''&lt;br /&gt;
:Hybrid: ''''$500''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
'''Lease Payment''' is similar to the '''Car price''' variable. But this time you will enter the [[definition]] directly using [[Expression Syntax|expression syntax]] instead of using the [[edit table]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Lease_payment := [[Table]](Car_type)(400, 700, 500)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[Image:Chapter_5.5-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Create a new variable titled '''Lease payment'''|n=+|v=0|pt=335,73}}{{&lt;br /&gt;
CalloutAnnotation|Open the definition field and select [[image:exprExpression_menu_item.png]] from the Expression popup menu.&lt;br /&gt;
(This will not change the definition of an existing variable.)|n=+|v=75|pt=432,184|path=-}}{{&lt;br /&gt;
CalloutAnnotation|Enter the definition directly as shown|n=+|v=250|pt=123,224}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
As you can see, [[Table]] definitions follow a specific syntax. The '''Table '''declaration is followed by two lists enclosed in parentheses. The first list contains the indexes by which the table will be arrayed. (In this simple example there is only one index but there can be many.) The second list contains the values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
'''It is important for the values to be in the same order as the index categories.''' Recall that the Car type index was defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Index Car_type := ['Standard', 'SUV', 'Hybrid']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
which matches the respective order of values in the '''Lease payment '''variable. The same principle applies when there is more than one index. For example, a two dimensional array might look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
:[[Table]] (Index_abc, Index_123)&lt;br /&gt;
::('a1', 'a2', 'a3', 'b1', 'b2', 'b3', 'c1', 'c2', 'c3')&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
It is generally easier to use an [[edit table]] when multiple dimensions are involved.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Finally, re-define the existing '''Miles per gallon '''variable as a table indexed by '''Car type'''. The MPG values for Standard, SUV and Hybrid are 28, 23, and 45 respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Mpg := Table(Car_type)(28, 23, 45)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
Select the '''Miles per gallon '''variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
Open the Definition field and select  [[File:Chapter_5.6-updated.png]]  from [[the Expression popup menu]]. Enter the new [[definition]] as shown above.&lt;br /&gt;
&lt;br /&gt;
==Combine arrays== &amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Now that you have established purchase and lease payments, you can combine them in one variable. This time the index will be '''Finance Option'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Payments := [[Table]] (Finance_option)(Car_price, Lease_payment)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Create a new variable titled '''Payments'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
Open the definition field and select '''''Table''''' from the [[Expression popup menu]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
The [[Indexes dialog]] appears. Select the Finance option index and transfer it to selected indexes list. Click '''OK'''. An edit table will appear.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[Image:Chapter_5.7-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Enter '''''Car_price''''' next to '''Purchase'''|v=0|pt=138,116|n=1}}{{&lt;br /&gt;
CalloutAnnotation|Enter '''''Lease_payment''''' next to '''Lease'''|n=+|v=60|pt=97,134}}{{&lt;br /&gt;
CalloutAnnotation|Press [[image:GreenCheck.png]]|n=+|v=140|pt=15,87}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
You may have noticed an important difference between this table and the previous tables. In the previous tables you entered number values into the table cells, but this time you are entering expressions! Expressions are valid entries for table cells. With very few exceptions they can be as complex as anything you might enter in a standard definition line, including formulas, logical expressions and conditional expressions. You will see more examples of this later in the chapter. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Now look at the result of this new variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
Select the '''Payments''' variable and click the '''Results''' button ([[File:Chapter_4.54-updated.png]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
Something interesting has happened! Notice that the array contains two dimensions even though only one index is called out in the definition of the array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Payments := [[Table]] (Finance_option)(Car_price, Lease_payment)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
Why is '''Car type''' included in the result when '''Finance_option''' is the only index included in the definition of the table?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
The '''Car type''' index is included because it is an index of the input variables '''Car price''' and '''Lease payment'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
You have just encountered one of the most powerful features of Analytica’s array abstraction: The dimensions of arrayed input variables will automatically be incorporated into the resulting output of an expression. The general principle of array abstraction can be summarized as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
'''In Analytica, the result of an expression is arrayed by the ''union'' set of dimensions from all input variables, and the definition of the expression itself.'''&lt;br /&gt;
&lt;br /&gt;
==Add a dimension to an array== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
So far, the Payments variable is not very useful for comparing the purchase and lease options. Lease payments are paid every month instead of just once, and there is still ownership equity to consider. In order to represent payments as a stream of cash flows over time, you will need to add a new dimension to the Payments array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
Create and define a new index titled Period. Define it as a sequence of months from 0 to 24.&lt;br /&gt;
:&amp;lt;code&amp;gt;Index Period := [[Sequence]](0, 24)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;tip&amp;gt;&lt;br /&gt;
There is a special shortcut syntax for sequences that have a step value of one: Type the starting value, followed by two periods (..), followed by the final value. For example, the '''Period''' index can be defined as: &amp;lt;code&amp;gt;Index Period := 0..24&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/tip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
Next, you will edit the '''Payments''' definition to include the new index. Try using the edit table for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[Image:Chapter_5.8-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Select the '''Payments''' variable and open the definition field.|n=1|v=50|pt=189,175|path=r(240,103)mbD20/}}{{&lt;br /&gt;
CalloutAnnotation|Click the '''''Edit Table''''' button.|n=+|v=180|pt=16,197}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
There is a button in the top left corner of the edit table, labeled with a parallelogram. Click this button to open the Indexes window. Then add '''Period''' to the list of selected indexes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.9-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Click the ''Index button'' in the top-left corner of the edit table.|n=+|v=30|pt=22,41}}{{&lt;br /&gt;
CalloutAnnotation|Select the '''Period''' index and add it to the Selected Indexes list.|n=+|v=130|pt=400,123|path=rR15(*,185)(400,185)(278,130)m(400,185)(488,114)m(400,185)}}{{&lt;br /&gt;
CalloutAnnotation|Note: By default, Analytica will copy current values to all new slices along the added index.|v=230|pt=216,265}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
The edit table should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.10-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|The '''Period''' index has been added to the '''Payments''' array.|v=0}}{{&lt;br /&gt;
CalloutAnnotation|Change vertical and horizontal indexes if necessary to pivot the table as shown.|n=+|v=90|path=(45,89)(67,59)m(45,89)|pt=86,80}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
The subset of an array corresponding to a singe index value is referred to as a [[slice]]. When you expanded the '''Payments''' array to include a new index, the original values (expressions in this case) were copied into all new slices along the '''Period''' index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
The '''Payments''' array is not yet accurate. Under the Purchase column you should have zero values for all periods except Period 0. Lease payments should be included in periods 1 through 24 but not Period 0. It would not take too much effort to edit all the cells to be the way you want them to be. The final definition of the array would look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
:[[File:Chapter_5.11-updated.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
Although this would work, it would not be a very efficient approach. In general, whenever you find yourself editing tables in the same way you would edit a spreadsheet, you are not benefiting from the advantages of array abstraction.&lt;br /&gt;
&lt;br /&gt;
==Use conditional expressions== &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
Expressions can include conditional statements using If...then...else syntax. The condition can be based on a variable or an index value. This is a very useful way of defining array variables. For example, the cash flow for purchasers can be represented as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[If]] Period = 0 [[Then]] Car_price [[Else]] 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
Likewise, the cash flow for lease holders can be represented as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[If]] Period = 0 [[Then]] 0 [[Else]] Lease_payment&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
Specifying a condition based on '''Period''' will automatically add the '''Period''' index to the array. This would have been a better way to add a new dimension to the '''Payments''' variable, compared to the example above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
Let’s revert the Payments variable to the way it was before adding the Period index:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Payments := [[Table]](Finance_option)(Car_price, Lease_payment)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
As you did in the section above, Select the '''Payments''' variable, open the edit table, and click the Index button in the top left corner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
Select the '''Period''' index in the Selected Indexes list and transfer it back to left hand box. Click '''OK'''. Answer '''Yes''' when the warning appears:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
:[[File:Chapter_5.12-updated.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.7-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|The edit table should be back to its original one-dimensional form.|v=5}} }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
This time you will add the '''Period''' index by including it in a conditional expression. Edit the cells to include conditional expressions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Payments := [[Table]](Finance_option)&amp;lt;/code&amp;gt;&lt;br /&gt;
:::&amp;lt;code&amp;gt;([[If]] Period = 0 [[Then]] Car_price [[Else]] 0,&amp;lt;/code&amp;gt;&lt;br /&gt;
:::&amp;lt;code&amp;gt;&amp;amp;nbsp;[[If]] Period = 0 [[Then]] 0 [[Else]] Lease_payment)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.14-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Enter conditional expressions in the edit table cells as shown.|v=5}} }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
Let’s take a step back to consider how many indexes are now included in the '''Payments '''array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
* '''Finance_option '''is called out specifically as a table index&lt;br /&gt;
* '''Period '''is the basis for a condition statement within an expression&lt;br /&gt;
* '''Car_type '''is an index of the '''Car price '''and '''Lease payment '''input variables. Therefore, you can expect that '''Payments '''will be a three-dimensional array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
Conditional expressions can have nested [[If-Then-Else]] statements. In fact, it would be possible to define the '''Payments '''array using only one conditional expression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Payments :=&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;[[If]] Finance_Option = 'Purchase' [[Then]]&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;[[If]] Period = 0 [[Then]] Car_price [[Else]] 0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;[[Else]] [[If]] Period = 0 [[Then]] 0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;[[Else]] Lease_payment&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
This would be equivalent to the table definition above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
Logical statements can also be used to specify a condition. They are enclosed in parentheses and include an equal sign. When used in a mathematical expression, a logical statement assumes a value of one if true, or zero if false. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;24*(2 + 2 = 4) &amp;amp;rarr; 24&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;24*(2 + 2 = 5) &amp;amp;rarr; 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
Hence another equivalent to the previous table definition is&lt;br /&gt;
:&amp;lt;code&amp;gt;[[If]] Finance_Option = 'Purchase' [[Then]] (Period=0) * Car_price&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Else]] (Period&amp;gt;0) * Lease_payment&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==View the results of a multi-dimensional array== &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
Representing a multi-dimensional array on a two-dimensional screen presents a challenge. When viewing results in tabular form, Analytica will display only a two-dimensional slice of the data. You can change the orientation and selection of data by ''pivoting ''the table. To do this, select the desired row and column indexes from the row and column pop-up menus. Any leftover indexes become ''slicer indexes ''for which only slice of data (corresponding to a single index value) can be displayed at a time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
Select the Payments variable and click the Results button ([[File:Chapter_4.54-updated.png]]). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
Select the table view button ([[File:Chapter_4.58-updated.png]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
You can experiment by selecting different row and column indexes, and by changing the value of the slicer index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.15-updated.png]]{{&lt;br /&gt;
CalloutAnnotation|The slicer menu button displays a pop-up menu of all slicer index values.|v=5|style=left:385px;|pt=104,54|path=lmU15-}}{{&lt;br /&gt;
CalloutAnnotation|Slicer steppers change the value of the slicer index sequentially.|v=100|style=left:385px;|pt=231,58|path=l}}|{{&lt;br /&gt;
CalloutAnnotation|The row index pop-up menu selects the index of rows.|v=20|pt=47,79}}{{&lt;br /&gt;
CalloutAnnotation|The column index pop-up selects the index of columns.|v=100|pt=78,100}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
Now click on the graph view button ([[File:Chapter_4.56-updated.png]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
The vertical axis of the graph represents data values. The graph indexes can be pivoted to select the desired horizontal axis, key, and slicer index. You can experiment with various graph configurations and slicer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.16-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|The graph displays data for only one value of the slicer index.|v=20|pt=110,58}}{{&lt;br /&gt;
CalloutAnnotation|The Horizontal Axis pop-up menu selects the index for the horizontal axis.|v=140|pt=146,241|path=rmU20(195,80)mrmD20}} {{&lt;br /&gt;
CalloutAnnotation|Key index categories are divided by color.|v=275|pt=131,302}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
&amp;lt;tip&amp;gt;&lt;br /&gt;
You can explore various chart types and options by selecting '''''Graph Setup'''''... from the [[Result menu]]. For more details about graphs reference [[Tutorial: Reviewing a model]].&lt;br /&gt;
&amp;lt;/tip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add a new value to an index== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
Fast Tony’s loan financing terms require 10% down and 2% of the purchase price per month for 60 months. His financing manager, Big Anthony, explains that at a 12% nominal interest rate (1% per month compounded monthly), the load will be paid off in 60 months. There are severe penal- ties for delinquency but none of them are expressed in dollar values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
One of the advantages of ''intelligent arrays ''is that they are easily expandable. So far, you have set up cash flows for purchasers and lease holders. Adding a third financing option is a simple matter of adding a new value to the '''Finance option '''index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Index Finance_option := ['Purchase','Lease','Loan']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
Select the '''''Finance option '''''index and open the [[Definition]] field. Select '''''{{Release||4.6|List of Labels}}{{Release|5.0||List of Text}}'''''from the [[Expression popup menu]]. You will see a list of current values in the definition field. Select the bottom value ('''Lease''') and press the '''down-arrow '''key. A new box appears at the bottom of the list. By default the previous label is copied down. Change the new value to '''''Loan'''''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[Image:Chapter_5.17-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Select '''{{Release||4.6|List of Labels}}{{Release|5.0||List of Text}}''' from the Expression pop-up menu.|n=1|v=0|pt=336,80|path=/}}{{&lt;br /&gt;
CalloutAnnotation|Select the bottom category and press ''Enter''.|n=+|v=85|pt=15,71}}{{&lt;br /&gt;
CalloutAnnotation|Enter '''Loan''' as the new value.|n=+|v=170|pt=33,94|path=-}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Now select the Payments variable and click the Results button ([[File:Chapter_4.54-updated.png]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
A new column appears with zero values by default.&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.18-updated.png]]{{&lt;br /&gt;
CalloutAnnotation|A new column appears for '''Loan'''.|v=30|style=left:400px;|pt=245,113|path=l-}}|{{&lt;br /&gt;
CalloutAnnotation|Click the table view button.|n=+|v=30|pt=11,56}}{{&lt;br /&gt;
CalloutAnnotation|Pivot the table as shown.|n=+|v=120}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
Now you will need to add an expression for loan payments in the edit table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Car_price*(If Period = 0 then 10% else 2%)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
Select the '''Payments''' variable. Open the Definition field, then click the '''''Edit table''''' button.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter 5.19-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Enter the new expression for Loan payments as show.|n=+|pt=100,151}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
Recall that the input variable '''Car price''' is indexed by '''Car type'''. Therefore, your new expression will be evaluated separately for the Standard car, the SUV and the Hybrid. The new expression also references the '''Period''' index, so it will be evaluated separately for each period as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter 5.20-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Loan payments have been added for all values of '''Car type''' and '''Period'''.|v=50|pt=238,142}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Using local values and indexes in an expression== &amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
Now that you have established all the cash outflows, you can start thinking about how much ownership equity you will have at the end of the 24-month period. Unavoidably you will need to calculate the remaining loan balance at that time. The financial dynamics of a typical loan include compound interest offset by fixed payment amounts. Although the formula for loan balances can be derived fairly easily, this section will focus on how to apply the formula rather than explaining the formula itself. Readers are invited to verify on their own if they wish:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
Assuming that a constant amount is paid and nominal interest is compounded every month:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B0&amp;lt;/code&amp;gt; = Starting balance of the loan&lt;br /&gt;
:&amp;lt;code&amp;gt;12%&amp;lt;/code&amp;gt; = Nominal interest rate&lt;br /&gt;
:&amp;lt;code&amp;gt;60&amp;lt;/code&amp;gt; = The total number of periods required to pay off the loan&lt;br /&gt;
:&amp;lt;code&amp;gt;Period&amp;lt;/code&amp;gt; = A number from 0 to 24 representing the current period&lt;br /&gt;
:&amp;lt;code&amp;gt;B(Period)&amp;lt;/code&amp;gt; = The remaining loan balance for the current period&lt;br /&gt;
:Let  &amp;lt;code&amp;gt;A = (1 + 12% / 12)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B(Period) = B0 * (A^60 - A^Period) / (A^60 - 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
It is easy to verify that &amp;lt;code&amp;gt;B(0) = B0&amp;lt;/code&amp;gt; and  &amp;lt;code&amp;gt;B(60)=0&amp;lt;/code&amp;gt; as required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:116--&amp;gt;&lt;br /&gt;
The quantity &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; appears several times in this formula so it makes sense to define it as an intermediate variable. To do the same thing in Analytica, you could define a new variable called &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; and use it as an input to the loan balance variable. But this would clutter your diagram with an unnecessary node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
Analytica allows ''local'' values and indexes to be used temporarily within a definition. In this case you will define a local identifier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
Create a new variable titled '''Loan balance''' and enter the following definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:119--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Loan_balance :=&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;{{Local}} A := (1 + 12%/12);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;Car_price * (1 - 10%) *  (A^60 - A^Period)/(A^60 - 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:120--&amp;gt;&lt;br /&gt;
Syntax rules for local objects are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
* The instruction line starts with &amp;lt;code&amp;gt;{{Local}}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;{{LocalIndex}}&amp;lt;/code&amp;gt; to declare a local value or index.&lt;br /&gt;
* The declaration is followed by an identifier. This can be anything you choose but it must not be identical to any other input contained in the expression.&lt;br /&gt;
* The ''assignment operator'' &amp;lt;code&amp;gt;:=&amp;lt;/code&amp;gt; comes next (colon followed by an equal sign), followed by an expression defining the object.&lt;br /&gt;
* A semicolon (&amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;) is required to end the instruction line. You may choose to have a visual break (Enter key) after the semicolon for appearance purposes but this is optional. Analytica only looks at semicolons to mark line breaks in code. Each local identifier declaration must be on a separate code line.&lt;br /&gt;
* The final line of instruction contains the definition as usual. All declared local values and indexes will be available to use in expressions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Local variables are used temporarily and then forgotten after the expression is evaluated. Therefore, the same local identifier (i.e. &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;) can be used in any number of nodes without conflict.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.21-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|Create a new Variable titled '''Loan balance''' and enter definition as shown.|pt=50,156}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
A final note about the expression for '''Loan Balance''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
Although '''Period '''is an index, you have used it here as a variable in a mathematical expression. This is possible because '''Period '''is a list of numerical values. It would not have been possible to use '''Car type '''or '''Finance option '''in a mathematical formula since they are lists of labels (although they could be used in logical or conditional statements). In general, you can think of an index as a one-dimensional array that uses its own values as an index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
By the principles of array abstraction, you should expect '''Loan Balance '''to be a two-dimensional array indexed by '''Car type '''(an index of '''Car price''') and '''Period'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.22-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|'''Load Balance''' is a two-dimensional array indexed by '''Car type''' and '''Period'''|pt=50,151}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
&amp;lt;tip&amp;gt;&lt;br /&gt;
The Future Value function [[Fv]] is a convenient way to calculate loan balances and annuity values without using formulas. Arguments in order are: Interest rate per period, Future period, Payments (negative for payouts), Initial value. For example, '''Loan Balance''' could be defined as: &amp;lt;code&amp;gt;[[Fv]](1%, Period, -Car_price*2%, Car_price*90%)&amp;lt;/code&amp;gt;&lt;br /&gt;
See [[Financial functions]] in the [[Analytica User Guide]].&lt;br /&gt;
&amp;lt;/tip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reduce an array using subscripts== &amp;lt;!--T:129--&amp;gt;&lt;br /&gt;
Sometimes you may want to reference part of an array variable without using all of its available indexes. [[Subscript]]s allow you to reference a [[slice]] of an array, effectively eliminating one or more dimensions. The [[subscript]] specifies indexes and their desired values for the slice. It is enclosed in square brackets placed immediately after the identifier for the array. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
The subscript has reduced a two-dimensional array to a one-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:131--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Final_period_balance := Loan_balance[Period = 24]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:132--&amp;gt;&lt;br /&gt;
This refers only to the '''Loan Balance '''values that correspond to Period 24. Recall that '''Loan Balance '''is a two-dimensional array indexed by '''Period '''and '''Car Type'''. The subscripted reference above will eliminate the '''Period '''dimension and return a one-dimensional array indexed only by '''Car_type'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.23-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|The subscript has reduced a two-dimensional array to a one-dimensional array.|pt=100,151}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
It is possible to eliminate multiple dimensions by including multiple indexes in the [[subscript]], separated by commas. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Final_period_balance := Loan_balance[Period = 24, Car_type = 'SUV']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
The result of this expression will be a single value corresponding to the loan balance at Period 24 for the SUV: 24.11K&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
An Index value can also be selected according to its position in the index rather than the actual value. To make a positional reference, place the &amp;quot;at&amp;quot; symbol (cat) in front of the index identifier. For example, 'SUV' is second in the order of values for the '''Car type '''index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
The following [[subscript]] references are equivalent: &lt;br /&gt;
:&amp;lt;code&amp;gt;Loan_balance[Car_type = 'SUV']&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Loan_balance[@Car_type = 2]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
The verbal terminology for this reference would be: &amp;quot;'''Loan_balance '''[[slice]]d at position of '''Car_type '''equal to 2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Complete cash flows== &amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
Now you can add a variable to represent the amount of ownership equity you will have after 24 months. Of course this will depend on the finance option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
Assume that the value of every car depreciates by 35% over two years.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
* Cash purchasers’ equity will be: '''Car_price  (1 - 35%)'''&lt;br /&gt;
* Lease holders’ equity will be zero&lt;br /&gt;
* Loaners’ equity will be the difference between car value and the loan balance at Period 24: '''Car_price  (1 - 35%) - Loan_balance&amp;lt;nowiki&amp;gt;[Period =&amp;lt;/nowiki&amp;gt; 24]'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
The '''Equity '''variable has only two dimensions: '''Car type '''and '''Finance option'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
It refers to a single slice of the '''Period '''index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
You can define the '''Equity '''variable as a table indexed by '''Finance option'''. Each of the expressions above can be entered into the appropriate cell in the edit table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Equity := Table(Finance_option)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;(Car_price*(1 - 35%), 0, (Car_price*(1 - 35%) - Loan_balance[Period = 24]))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
Alternatively, you can use [[If-Then-Else|conditional]] and [[Logical Operators|logical]] statements as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Equity := If Finance_option = 'Lease' then 0 else&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Car_price*(1 - 35%) - (Finance_option = 'Loan')*Loan_balance[Period = 24]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
Once again, consider how many dimensions your new variable will have. At first you might be tempted to list the indexes as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
:'''Finance option '''(Specified as a table index or used in a conditional expression)&lt;br /&gt;
:'''Car type '''(Index of the input variables '''Car price '''and '''Loan balance''')&lt;br /&gt;
:'''Period '''(Index of the input variable '''Loan balance''')&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
But '''Loan balance '''is not an input to this expression; only a [[slice]] of it is used. The slice is arrayed only by '''Car type'''. Therefore, the Equity variable will be indexed by '''Finance option '''and '''Car type '''but not by '''Period'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.24-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|The '''Equity '''variable has only two dimensions: '''Car type '''and '''Finance option'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
It refers to a single slice of the '''Period '''index.|pt=50,151}}}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Combine dissimilar arrays== &amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
Now that you have established payments and ownership equity, you can combine them into a single cash flow variable. '''Payments '''will be represented as negative cash flows. '''Equity '''will be represented as a positive cash flow on the last period.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
Create a new variable titled '''Cash flow '''and enter the following definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Cash_flow := If Period = 24 then Equity - Payments else -Payments&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
In this expression you have combined arrays with different numbers of dimensions:&lt;br /&gt;
:'''Payments '''is indexed by '''Car type''', '''Finance option '''and '''Period. &lt;br /&gt;
:Equity '''is indexed only by '''Car type '''and '''Finance option'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
There is no ambiguity here since '''(Equity - Payments) '''applies to a [[slice]] along the '''Period''' index. The slice is called out in the conditional statement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
Notice that '''Equity '''and '''Payments[Period = 24] '''have the same dimensions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
There are other situations where you may want to use a scalar variable (not an array) as an input to an array. Similarly, you may want use an array as an input to another array that has more dimensions. In this situation Analytica will repeat the values of the smaller array for each [[slice]] along the new dimensions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
For example, suppose you want to incorporate monthly fuel cost into the '''Cash flow '''variable. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
Here again you are combining two dissimilar arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
:'''Cash flow '''is indexed by '''Car type''', '''Finance option '''and '''Period'''&lt;br /&gt;
:'''Fuel cost '''is indexed only by '''Car type'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
Create a new variable titled '''Cash flow with fuel '''and define it as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Cash_flow_with_fuel :=&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;If Period = 0 then Cash_flow else Cash_flow - Fuel_cost/12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
In this example, '''Fuel cost '''is applied to multiple slices along new dimensions:&lt;br /&gt;
* All '''Period '''values except Period 0&lt;br /&gt;
* All three '''Finance option '''categories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
Select '''Cash_flow_with_fuel '''and click the Results button ([[File:Chapter_4.54-updated.png]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
You will notice &amp;quot;Totals&amp;quot; check boxes next to the row and column index pop-up menus. Checking the box next to '''Period '''will allow you to see totals along that index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.25-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|&lt;br /&gt;
#Pivot the table as shown. &amp;lt;br /&amp;gt;&lt;br /&gt;
#Check the &amp;quot;totals&amp;quot; box next to the row index menu '''Period''' index.|pt=220,101}}}}&lt;br /&gt;
&lt;br /&gt;
==Array-Reducing Functions== &amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
A function that reduces one or more indexes of an array is referred to as an [[Array-reducing functions|array reducing function]]. The output of an array reducing function will have fewer dimensions than the input array. For example, the following expression will determine the sum of cash flows over all periods:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable Total_cash_flow := Sum(Cash_flow_with_fuel, Period)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
The input array is indexed by '''Car type''', '''Finance option '''and '''Period'''. The output will be a two- dimensional array indexed by '''Car type '''and '''Finance option'''. In this example the '''Period '''dimension has been reduced.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Chapter_5.26-updated.png]]|{{&lt;br /&gt;
CalloutAnnotation|The '''Period''' index has ben reduced by the Sum() function.|pt=20,131}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
* The first argument of the [[Sum]]() function is the identifier of the variable to be operated on.&lt;br /&gt;
* This is followed by a list of indexes separated by commas. These are the indexes over which the function will operate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
In this example you have taken a sum over a single index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
Similar examples of [[array-reducing functions]] include [[Max]](), [[Min]](), [[Product]]() and [[Average]]().&lt;br /&gt;
&lt;br /&gt;
==Net Present Value (NPV) analysis== &amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
If someone offered you a choice of receiving $100 today or receiving $100 two years from now, which would you choose? If you choose to receive it immediately, you can invest in a low risk bond with an annual return of, say, 6%. In two years the investment will be worth about $112. Clearly these two alternatives do not have equal value. Conversely, you would probably prefer to pay an obligation later rather than sooner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
''Net present value ''([[NPV]]) analysis is a way to compare various scenarios that involve inflows and outflows of money at different time periods. It converts a stream of cash flows to an equivalent scenario where all money is exchanged in a single transaction at the present time. The interest rate that can be achieved in a low risk investment is referred to as the ''discount rate''. For example, given a discount rate of 6%, the NPV of $112 paid two years in the future would be $100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
By taking a simple sum of cash flows as in the example above, you have ignored the time value of money. A Net Present Value analysis is more useful in this case. The [[NPV]]() function in Analytica makes this easy. It is another example of an array reducing function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
Assume the discount rate is 0.5% per month. Create an objective node titled '''Cash flow NPV'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
(Objective nodes are represented by the hexagon shape on the node palette.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
Apply the following definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Objective Cash_flow_NPV := NPV(0.5%, Cash_flow_with_fuel, Period)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
* The first argument of the [[NPV]] function is the discount rate per period.&lt;br /&gt;
* The second argument is the identifier for the variable containing cash flows.&lt;br /&gt;
* The third argument is the index containing period values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
The analysis is complete!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
:[[File:Chapter 5.27-updated.png]]&lt;br /&gt;
&lt;br /&gt;
==Summary== &amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
In this chapter you have:&lt;br /&gt;
* Learned [[Expression Syntax|Expression syntax]]&lt;br /&gt;
* [[Creating an index|Created and defined index ]]variables&lt;br /&gt;
* Created array variables as tables dimensioned along established indexes&lt;br /&gt;
* Expanded arrays by adding new indexes&lt;br /&gt;
* Expanded indexes by adding new index values&lt;br /&gt;
* Created examples that demonstrate the basic principle of [[Array Abstraction|array abstraction]]: '''The result of an expression is arrayed by the ''union set ''of dimensions from all input variables, and the definition of the expression itself.'''&lt;br /&gt;
* Used conditional and logical statements within an expression&lt;br /&gt;
* Established local values in the definition field&lt;br /&gt;
* Analyzed a multi-dimensional result by pivoting indexes&lt;br /&gt;
* Reduced array variables using [[subscript]]s&lt;br /&gt;
* Applied [[array-reducing functions]] to arrays&lt;br /&gt;
&lt;br /&gt;
==See Also== &amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
* [[Array]]&lt;br /&gt;
* [[Table]]&lt;br /&gt;
* [[Creating Arrays (Tables)]]&lt;br /&gt;
* [[Intelligent Arrays]]&lt;br /&gt;
* [[Arrays and Indexes]]&lt;br /&gt;
* [[Indexes and arrays: An introduction]]&lt;br /&gt;
* [[Creating an index]]&lt;br /&gt;
* [[Functions that create indexes]]&lt;br /&gt;
* [[Array-reducing functions]]&lt;br /&gt;
* [[Array functions]]&lt;br /&gt;
* [[Array Manipulation Examples and Challenge Problems]]&lt;br /&gt;
* [[Array Function Example Variables]]&lt;br /&gt;
* [[Multidimensional array]]s&lt;br /&gt;
* [[Expression Syntax]]&lt;br /&gt;
* [[Expressions]]&lt;br /&gt;
* [[The Expression popup menu]]&lt;br /&gt;
* [[Class]]&lt;br /&gt;
* [[Classes of variables and other objects]]&lt;br /&gt;
* [[Local Values]]&lt;br /&gt;
* [[Subscript]]&lt;br /&gt;
* [[Subscript and slice of a subarray]]&lt;br /&gt;
* [[Identifier]]&lt;br /&gt;
* [[Modeling Depreciation]]&lt;br /&gt;
* [[NPV]]&lt;br /&gt;
* [[Choice menus and Checkboxes in an edit table]]&lt;br /&gt;
* [[Dynamic Simulation]]&lt;br /&gt;
* [[Tutorial videos]]&lt;br /&gt;
* [https://www.youtube.com/watch?v=_8ZaXnEwhoE Intelligent Array Abstraction] (explanatory video on YouTube)&lt;br /&gt;
* [https://webinars.analytica.com/Docs/2008-01-11-Intro-to-arrays.mp4 Intro-to-arrays (Part 1).mp4] (an explanatory video about Analytica arrays and indexes (part 1); requires Windows Media player)  &lt;br /&gt;
* [https://webinars.analytica.com/Docs/2008-01-17-Intro-to-arrays2.mp4 Intro-to-arrays (Part 2).mp4] (an explanatory video about Analytica arrays and indexes (part 2); requires Windows Media player)  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
&amp;lt;footer&amp;gt;Tutorial: Create a model/ {{PAGENAME}} / Tutorial: Uncertainty&amp;lt;/footer&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64235</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64235"/>
		<updated>2026-08-11T22:49:13Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22418 -- document /WindowSize and /WindowXY, new in 7.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=As of [[Analytica 7.2]], an option may also be prefixed with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, and an option value may be introduced by an equal sign, &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, in place of the colon. So &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-nosplash&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--nosplash&amp;lt;/code&amp;gt; are all the same option, and &amp;lt;code&amp;gt;/mcp:8080&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--mcp=8080&amp;lt;/code&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-debugging-port:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on &amp;lt;code&amp;gt;127.0.0.1:«port»&amp;lt;/code&amp;gt;, so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt; page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; function. The Chromium spelling &amp;lt;code&amp;gt;--remote-debugging-port=«port»&amp;lt;/code&amp;gt; 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).&lt;br /&gt;
*: After launch, the process reports the outcome in &amp;lt;code&amp;gt;%LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json&amp;lt;/code&amp;gt;, where «pid» is the process id of the launched Analytica.exe. On success this contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;listening&amp;quot;&amp;lt;/code&amp;gt; and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: While remote debugging is enabled, each page in a CEF window exposes the JavaScript global &amp;lt;code&amp;gt;window.anaCefWindow&amp;lt;/code&amp;gt; with fields &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, identifying which window a DevTools target belongs to. The &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt; matches the handle of the corresponding &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-allow-origins:«origins»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) A comma-separated list of origins (or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;) 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, &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt;) send no Origin header and connect without this option. The Chromium spelling &amp;lt;code&amp;gt;--remote-allow-origins=«origins»&amp;lt;/code&amp;gt; is also accepted.&lt;br /&gt;
}}&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/lib:''filename''&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Loads the Analytica library in ''filename'' into the &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /lib:&amp;quot;W:\Analytica\Libraries\Multivariate Distributions.ana&amp;quot; MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
*: A relative ''filename'' is looked for first in the directory that the process was launched from, then in the directories on the &amp;lt;code&amp;gt;AddLibraryDir&amp;lt;/code&amp;gt; library search path, then in the Analytica installation folder, and finally in the preferences folder. Path substitutions such as &amp;lt;code&amp;gt;%appdata%&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%installdir%&amp;lt;/code&amp;gt; are expanded.&lt;br /&gt;
*: Each library loaded this way is its own namespace. Since &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;: (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]].&lt;br /&gt;
*: 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 &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;.&lt;br /&gt;
*: Some built-in defaults are deliberately conservative so that an unattended run cannot damage the model it is testing. In particular, &amp;quot;Save changes?&amp;quot; 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.&lt;br /&gt;
*: 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]]'''.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /lib:BenchmarkDriver.ana MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/AutomationTrace:''filename''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
*: Used together with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, this records what automation answered. Used '''without''' &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/WindowSize:«width»,«height»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Sets the size of the main application window, in screen pixels.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /WindowSize:1000,600&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/WindowXY:«x»,«y»&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /WindowSize:1000,600 /WindowXY:-1000,100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Either option can be used without the other. The one you leave out keeps the value that was saved when Analytica last exited.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;GetWindowRect&amp;lt;/code&amp;gt; sees a few extra pixels on each side, while &amp;lt;code&amp;gt;DwmGetWindowAttribute&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;DWMWA_EXTENDED_FRAME_BOUNDS&amp;lt;/code&amp;gt; reports exactly the size that was requested.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
== Command line options for libraries ==&lt;br /&gt;
&lt;br /&gt;
''new in [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
An option that begins with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, 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:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe --AssistaURL:&amp;lt;nowiki&amp;gt;&amp;quot;https://aaia.analytica.com/staging&amp;quot;&amp;lt;/nowiki&amp;gt; --OpenAssista MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A library reads them with [[GetProcessInfo]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--AssistaURL&amp;quot;) &amp;amp;rarr; 'https://aaia.analytica.com/staging'&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--OpenAssista&amp;quot;) &amp;amp;rarr; True&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--NotGiven&amp;quot;) &amp;amp;rarr; Null&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;) &amp;amp;rarr; ['--AssistaURL', '--OpenAssista']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;, and an option that is not on the command line at all reads as &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
&lt;br /&gt;
Because Analytica accepts any unrecognized &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; option silently, a misspelled one is simply ignored rather than reported. &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;)&amp;lt;/code&amp;gt; returns the list of &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that actually arrived, which is how a driver or library can check that it was passed what it expected.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:AssistaURL&amp;quot;)&amp;lt;/code&amp;gt; finds it as well.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line&amp;quot;)&amp;lt;/code&amp;gt; reports.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Timer&amp;diff=64234</id>
		<title>Timer</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Timer&amp;diff=64234"/>
		<updated>2026-08-11T15:06:54Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''New to [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
'''''Experimental''''' -- An experimental function is subject to change. To use, your model must import from the namespace &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;, or use a fully qualified name, &amp;lt;code&amp;gt;SysLib_Experimental::Timer&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Struct Timer( expr, secondsFromNow'', fireIfReleased'' ) ==&lt;br /&gt;
&lt;br /&gt;
Schedules «expr» to be evaluated at an idle moment about «secondsFromNow» seconds from now -- never in the middle of a computation, a model load, or a modal dialog. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Timer(expr, 0)&amp;lt;/code&amp;gt; means &amp;quot;as soon as the current work finishes&amp;quot;. Returns a timer instance. &lt;br /&gt;
&lt;br /&gt;
Read &amp;lt;code&amp;gt;t-&amp;gt;secondsFromNow&amp;lt;/code&amp;gt; for the time remaining (Null once it has fired), assign to it to re-arm, and assign Null or a negative number to cancel. &lt;br /&gt;
&lt;br /&gt;
Releasing the instance cancels the timer unless you pass &amp;lt;code&amp;gt;fireIfReleased:True&amp;lt;/code&amp;gt;, which lets it fire once even when nothing holds onto it. Timers fire only in the Analytica desktop application.&lt;br /&gt;
&lt;br /&gt;
== Experimental -- using Namespace import ==&lt;br /&gt;
&lt;br /&gt;
To use an experimental function, your model should [[NamespaceImports|import from]] the &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt; [[Namespace]]. If this is your only namespace import, you can set this from typescript using:&lt;br /&gt;
 NamespaceImports MyModel: SysLib_Experimental&lt;br /&gt;
&lt;br /&gt;
You can alternatively use a fully qualified name, &amp;lt;code&amp;gt;SysLib_Experimental::Timer(...)&amp;lt;/code&amp;gt;. The downside of doing so is that if the function later becomes non-experimental, then it will be removed from that namespace.&lt;br /&gt;
&lt;br /&gt;
== To fire at a specific time ==&lt;br /&gt;
&lt;br /&gt;
 [[Timer]]( DoIt(), 86400 * (t - [[Today]](true) ) )&lt;br /&gt;
&lt;br /&gt;
Where 86400 is the number of seconds in a day.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Timer&amp;diff=64233</id>
		<title>Timer</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Timer&amp;diff=64233"/>
		<updated>2026-08-11T15:05:13Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Created page with &amp;quot;''New to Analytica 7.2''  '''''Experimental''''' -- To use, your model must import from the namespace &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;, or use a fully qualified name, &amp;lt;cod...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''New to [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
'''''Experimental''''' -- To use, your model must import from the namespace &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;, or use a fully qualified name, &amp;lt;code&amp;gt;SysLib_Experimental::Timer&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Struct Timer( expr, secondsFromNow'', fireIfReleased'' ) ==&lt;br /&gt;
&lt;br /&gt;
Schedules «expr» to be evaluated at an idle moment about «secondsFromNow» seconds from now -- never in the middle of a computation, a model load, or a modal dialog. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Timer(expr, 0)&amp;lt;/code&amp;gt; means &amp;quot;as soon as the current work finishes&amp;quot;. Returns a timer instance. &lt;br /&gt;
&lt;br /&gt;
Read &amp;lt;code&amp;gt;t-&amp;gt;secondsFromNow&amp;lt;/code&amp;gt; for the time remaining (Null once it has fired), assign to it to re-arm, and assign Null or a negative number to cancel. &lt;br /&gt;
&lt;br /&gt;
Releasing the instance cancels the timer unless you pass &amp;lt;code&amp;gt;fireIfReleased:True&amp;lt;/code&amp;gt;, which lets it fire once even when nothing holds onto it. Timers fire only in the Analytica desktop application.&lt;br /&gt;
&lt;br /&gt;
== Experimental -- using Namespace import ==&lt;br /&gt;
&lt;br /&gt;
To use an experimental function, your model should [[NamespaceImports|import from]] the &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt; [[Namespace]]. If this is your only namespace import, you can set this from typescript using:&lt;br /&gt;
 NamespaceImports MyModel: SysLib_Experimental&lt;br /&gt;
&lt;br /&gt;
== To fire at a specific time ==&lt;br /&gt;
&lt;br /&gt;
 [[Timer]]( DoIt(), 86400 * (t - [[Today]](true) ) )&lt;br /&gt;
&lt;br /&gt;
Where 86400 is the number of seconds in a day.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=GetProcessInfo&amp;diff=64220</id>
		<title>GetProcessInfo</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=GetProcessInfo&amp;diff=64220"/>
		<updated>2026-08-10T20:22:26Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Remove a stray leading space introduced by the previous edit (action=raw round-trip)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[Category:System Functions]]&lt;br /&gt;
[[Category: Memory management]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
[[GetProcessInfo]] can give you information about the current Analytica or [[ADE]] process, such as user name, computer, name, memory in use, number of processors available, number of objects in the model, and a whole lot more. from the Windows operating system,&lt;br /&gt;
&lt;br /&gt;
== Types of information  ==&lt;br /&gt;
&lt;br /&gt;
[[GetProcessInfo]] returns information about the current Analytica or [[ADE]] process from the Windows operating system, according to which of these texts you pass as the «item» parameter:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Process ID&amp;quot;&amp;lt;/code&amp;gt; -- returns the Process ID, or Pid, for the current process.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Thread ID&amp;quot;&amp;lt;/code&amp;gt; -- returns the Id of the Analytica/ADE thread.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Priority&amp;quot;&amp;lt;/code&amp;gt; -- returns the priority of the Analytica/ADE thread.  The following values are possible (defined by the Windows operating system):&lt;br /&gt;
::*&amp;lt;code&amp;gt;-15&amp;lt;/code&amp;gt; : Idle only&lt;br /&gt;
::*&amp;lt;code&amp;gt;-2&amp;lt;/code&amp;gt; : lowest priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; : below normal&lt;br /&gt;
::*&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; : normal priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; : Above normal&lt;br /&gt;
::*&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; : Highest priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;: Critical priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;31&amp;lt;/code&amp;gt;: Real-time priority&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Computer Name&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;User Name&amp;quot;&amp;lt;/code&amp;gt;: Windows login name&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;User Identity&amp;quot;&amp;lt;/code&amp;gt;: User name in ACP, or Windows login name in DTA.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Windows Version&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Windows SP&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Windows Build&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Abort Event Object&amp;quot;&amp;lt;/code&amp;gt; { ADE only }.  Name of global Event object for ADE project that can be used to send ADE a break signal to abort the current computation.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;ENV:''«name»''&amp;quot;&amp;lt;/code&amp;gt;: Retrieves the value for the environment variable «name»&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Environment Variables&amp;quot;&amp;lt;/code&amp;gt;: List of all Environment variables&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Command Line&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Command line:''«option»''&amp;quot;&amp;lt;/code&amp;gt;: The value of a single option from the command line. See the example below.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Command line parameters&amp;quot;&amp;lt;/code&amp;gt;: A list of the &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that appeared on the command line.}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Analytica Path&amp;quot;&amp;lt;/code&amp;gt;: Full file path to the ''Analytica.exe, Ade.exe'', or ''Ade.dll'' file being run.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Size&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Max&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Min&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Flags&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt; &amp;quot;Working Set Peak&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Private Bytes&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total RAM&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Free RAM&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total Virtual&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Max Address Space&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Memory Load&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total Free Memory&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Page Fault Count&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Avail Virtual&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Processor #&amp;quot;&amp;lt;/code&amp;gt;: On a multi-core computer, the processor currently running the current evaluation.  This changes with time.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Affinity Mask&amp;quot;&amp;lt;/code&amp;gt;: A list of which processors the operating system will allow Analytica's evaluation to run on.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Num Processors&amp;quot;&amp;lt;/code&amp;gt;: The number of processors the Analytica process is allowed to run on. &lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Num Sys Processors&amp;quot;&amp;lt;/code&amp;gt;: The total number of processors on this computer in the current processor group. Always &amp;lt;=64.{{Release|6.0||&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Num cores&amp;quot;&amp;lt;/code&amp;gt;: The total number of processors on this computer in all [https://docs.microsoft.com/en-us/windows/win32/procthread/processor-groups processor groups]. (Typically the same as &amp;lt;code&amp;gt;&amp;quot;Num Sys Processors&amp;quot;&amp;lt;/code&amp;gt; on computers with 64 cores or less, but can be greater than 64 on very high-end servers).}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;User Objects&amp;quot;&amp;lt;/code&amp;gt;: Number of objects in use (variable nodes, local indexes, etc) by a model&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total Objects&amp;quot;&amp;lt;/code&amp;gt;: Number of objects in use including both user objects and built-in system objects.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Free Objects&amp;quot;&amp;lt;/code&amp;gt;: Number of free &amp;quot;slots&amp;quot; still available for additional objects.{{Release|1=7.1|2=|3=&lt;br /&gt;
: &amp;lt;code&amp;gt;'UI Language'&amp;lt;/code&amp;gt;: Returns the language used for the Analytica user interface, &amp;quot;en&amp;quot;=English, &amp;quot;es&amp;quot;=Spanish, etc. }}{{Release|6.5||&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Application Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, top, left, as 4 return values, describing the screen coordinates of the desktop Analytica application window. Returns Null in ADE. &lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Desk Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x,y, as 4 return values, describing the rectangle within the desktop application where MDI windows can be. This rectangle starts below the toolbar, and does not include application boundaries.}}{{Release|1=7.0|2=|3=&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Python Environments&amp;quot;&amp;lt;/code&amp;gt;: returns a list of all discovered Python/conda environment paths&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Python Installations&amp;quot;&amp;lt;/code&amp;gt;: returns just the base Python installations&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Screenshot&amp;quot;&amp;lt;/code&amp;gt;: Returns an image of the Analytica desktop application window (at the time the function call is evaluated).}}{{Release|1=7.1|2=|3=&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Current Monitor Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x, y, as 4 return values, describing the screen coordinates of the monitor that the Analytica application window is currently on. Returns Null in ADE.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Current Monitor Work Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x, y, as 4 return values, describing the work area (excluding taskbar) of the monitor that the Analytica application window is currently on. Returns Null in ADE.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Number of Monitors&amp;quot;&amp;lt;/code&amp;gt;: The number of monitors connected to the system.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Monitor ''N'' Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x, y, as 4 return values, describing the screen coordinates of the ''N''th monitor (1-based). Replace ''N'' with any integer from 1 to the value of &amp;lt;code&amp;gt;&amp;quot;Number of Monitors&amp;quot;&amp;lt;/code&amp;gt;. For example, &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Monitor 2 Rect&amp;quot;)&amp;lt;/code&amp;gt; returns the rectangle of the 2nd monitor.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Monitor ''N'' Work Rect&amp;quot;&amp;lt;/code&amp;gt;: Like &amp;lt;code&amp;gt;&amp;quot;Monitor ''N'' Rect&amp;quot;&amp;lt;/code&amp;gt; but returns the work area (excluding taskbar) of the ''N''th monitor. For example, &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Monitor 1 Work Rect&amp;quot;)&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Process ID ===&lt;br /&gt;
Knowing the Process ID makes it possible to differentiate between multiple instances of Analytica or [[ADE]] in the Windows Task Manager.  &lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Process ID&amp;quot;) &amp;amp;rarr; 4117&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reading the command line ===&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command Line&amp;quot;) &amp;amp;rarr; '&amp;quot;C:\Program Files\Lumina\Analytica.exe&amp;quot; &amp;quot;C:\My Models\Costs.ana&amp;quot;'&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Analytica Command Line]] for a list of valid command line parameters recognized by Analytica.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
=== Reading a command line option ===&lt;br /&gt;
''new in [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:''«option»''&amp;quot;)&amp;lt;/code&amp;gt; returns the value of one option from the command line, so that you do not have to parse the whole command line yourself. Any option that begins with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, and that Analytica does not itself recognize, is accepted without an ''Unrecognized command line parameter'' warning, so that a library can define command line options of its own. After launching:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe --AssistaURL:&amp;lt;nowiki&amp;gt;&amp;quot;https://aaia.analytica.com/staging&amp;quot;&amp;lt;/nowiki&amp;gt; --OpenAssista MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
these read as:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--AssistaURL&amp;quot;) &amp;amp;rarr; 'https://aaia.analytica.com/staging'&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--OpenAssista&amp;quot;) &amp;amp;rarr; True&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--NotGiven&amp;quot;) &amp;amp;rarr; Null&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;) &amp;amp;rarr; ['--AssistaURL', '--OpenAssista']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value is the text following the option's colon or equal sign. An option present with no value returns &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;, and an option that is not on the command line returns &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;, so a library can distinguish ''not given'' from ''given with no value'' and from ''given an empty text''. A value is always returned as text, even when it looks like a number, so use [[ParseNumber]] when you want a number. When an option is repeated, the last occurrence is reported. The option name is not case-sensitive, and its leading &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;) can be omitted when you read it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;)&amp;lt;/code&amp;gt; returns the list of &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that were actually present. Since a misspelled &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; option is silently ignored rather than reported, this is the way for a launcher or library to confirm that it was passed what it expected.&lt;br /&gt;
&lt;br /&gt;
See [[Analytica Command Line]] for the options that Analytica itself recognizes.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Reading Environment Variables ===&lt;br /&gt;
Obtain a list of all environment variables:&lt;br /&gt;
:&amp;lt;code&amp;gt;Index EnvVarName := GetProcessInfo(&amp;quot;Environment Variables&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Env:&amp;quot;&amp;amp;EnvVarName)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Getting PID from ADE (C#) ===&lt;br /&gt;
:&amp;lt;code&amp;gt;CAEngine ade = new CAEngine();&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;CAObject V = ade.CreateObject(&amp;quot;V&amp;quot;, &amp;quot;variable&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;V.SetAttribute(&amp;quot;definition&amp;quot;, &amp;quot;GetProcessInfo(\&amp;quot;Process ID\&amp;quot;)&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;string pInfoResult = V.Result().ToString();&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Aborting an in-progress evaluation in ADE ===&lt;br /&gt;
To abort a computation in [[ADE]], your program must obtain a HANDLE to the ''abort event object''.  In order to obtain this, you need to obtain the name of this object from ADE.  You get this by calling &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Abort Event Object&amp;quot;)&amp;lt;/code&amp;gt;.  You then use the Windows Platform SDK routine OpenEvent to get the handle to this object.  When you want to abort an in-process computation, you set this event.  Generally your application that uses ADE will need to be multi-threaded, so that one thread calls ADE, the other thread detects the signal to abort the computation (the signal might be a user pressing ''Ctrl+Break'', for example).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
C++ example:&lt;br /&gt;
&lt;br /&gt;
    /* From first application thread, which uses ADE: */&lt;br /&gt;
    #include &amp;lt;windows.h&amp;gt;&lt;br /&gt;
    #import &amp;quot;ADE.exe&amp;quot;&lt;br /&gt;
    using namespace ADE4;&lt;br /&gt;
    ...&lt;br /&gt;
    GLOBAL HEVENT hAbort;&lt;br /&gt;
    ...&lt;br /&gt;
    void main() &lt;br /&gt;
    {&lt;br /&gt;
        ...&lt;br /&gt;
        CAEngine* pAde = new CAEngine();&lt;br /&gt;
        pAde-&amp;gt;SendCommand(&amp;quot;GetProcessInfo('Abort Event Object')&amp;quot;);&lt;br /&gt;
        _bstr_t abortObjName = pAde-&amp;gt;get_OutputBuffer();&lt;br /&gt;
        hAbort = OpenEvent(EVENT_MODIFY_STATE,/*bInherit*/FALSE,abortObjName);&lt;br /&gt;
        ...&lt;br /&gt;
        CreateThread(..., MonitorForBreak,... );&lt;br /&gt;
        CTable* pResult = pAde-&amp;gt;Get(&amp;quot;X&amp;quot;)-&amp;gt;ResultTable();  /* Initiate a very long computation */&lt;br /&gt;
        if (pAde-&amp;gt;get_ErrorCode() == 78) {&lt;br /&gt;
             /* The computation was aborted before completion */&lt;br /&gt;
             ...&lt;br /&gt;
        }&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    DWORD WINAPI MonitorForBreak( LPVOID )&lt;br /&gt;
    {&lt;br /&gt;
         /* This routine detects a signal to break the computation.  Maybe it is a user-keypress,&lt;br /&gt;
          * or other UI interaction. */&lt;br /&gt;
         if (DetectUserWantsToAbort()) {&lt;br /&gt;
             SetEvent(hAbort);                   /* Causes the abort */&lt;br /&gt;
         }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Memory Information ===&lt;br /&gt;
The Analytica process that evaluates your model may end up using a lot of memory.  The operating system keeps some of that memory in RAM, and swaps some of it out to virtual memory.  Accessing RAM is fast, while accessing virtual memory is much slower.  Windows makes various tradeoffs with what other programs are running on your computer to decide how much of the Analytica process to keep in RAM.  The amount of RAM to devote to Analytica is called its ''working set''.  When the working set is much smaller that the available RAM, other applications on your computer will respond well (since they can use that RAM), but Analytica may run slowly.  If the working set is close to the amount of available RAM, then Analytica gets to make more use of fast RAM, but other applications, and the Windows UI, may get very slow, since they will then need to switch in and out of memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Working Set Max&amp;quot;)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Working set Min&amp;quot;)&amp;lt;/code&amp;gt; return the minimum and maximum working set size, in bytes, currently imposed by Windows on the Analytica process.  &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Working Set Flags&amp;quot;)&amp;lt;/code&amp;gt; returns an integer containing flags, indicating whether Windows is allowed to alter these limits as the process uses more or less memory.  The flags are the following numbers added together:&lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; = Analytica is guaranteed at least the minimum working set.&lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; = Windows may reduce Analytica's working set below the minimum value when memory demands are high&lt;br /&gt;
* &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; = Windows will not allocate more than the indicated working set max.&lt;br /&gt;
* &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt; = Windows may give Analytica more than the &amp;lt;code&amp;gt;Working Set Max&amp;lt;/code&amp;gt; when memory demands from other applications is low.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;quot;Avail Virtual&amp;quot;&amp;lt;/code&amp;gt; option returns the number that Windows reports as the theoretical maximum amount of memory available to all processes running on the operating system, including both RAM and page file space.  However, the number isn't very meaningful or reliable, as Windows often reports a number that far exceeds the amount of available hard disk space (for example, in Windows x64, a number of 8.8 TeraBytes is reported), and in 32-bit processes on Windows x64, the huge number seems to be wrap at 4GB, resulting in a nonesense (and often very small) number.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=6.5|2=|3=&lt;br /&gt;
== Application window coordinates == &lt;br /&gt;
''new in [[Analytica 6.5]]''&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] (width, height, left, top) := [[GetProcessInfo]]( 'Application Rect');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gets the rectangle, in screen coordinates, of the desktop application.  From ADE, or ACP when there is no dual desktop UI running, returns Null.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]](width, height) := [[GetProcessInfo]]('Desk Rect');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gets the size of the desk, the rectangle within the application where diagram windows, object window, result windows, the outliner, Assista window, etc. reside. This desk rectangle starts below the toolbar. You can also get the location:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]](width, height, x, y) := [[GetProcessInfo]]('Desk Rect');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The x,y location coordinate is relative to the application window.&lt;br /&gt;
}}&lt;br /&gt;
==History==&lt;br /&gt;
This function was introduced in [[What's new in Analytica 4.0?|Analytica 4.0]].&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Working Set Size]]&lt;br /&gt;
* [[Memory usage and management]]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64219</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64219"/>
		<updated>2026-08-10T20:22:26Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Remove a stray leading space introduced by the previous edit (action=raw round-trip)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=As of [[Analytica 7.2]], an option may also be prefixed with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, and an option value may be introduced by an equal sign, &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, in place of the colon. So &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-nosplash&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--nosplash&amp;lt;/code&amp;gt; are all the same option, and &amp;lt;code&amp;gt;/mcp:8080&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--mcp=8080&amp;lt;/code&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-debugging-port:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on &amp;lt;code&amp;gt;127.0.0.1:«port»&amp;lt;/code&amp;gt;, so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt; page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; function. The Chromium spelling &amp;lt;code&amp;gt;--remote-debugging-port=«port»&amp;lt;/code&amp;gt; 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).&lt;br /&gt;
*: After launch, the process reports the outcome in &amp;lt;code&amp;gt;%LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json&amp;lt;/code&amp;gt;, where «pid» is the process id of the launched Analytica.exe. On success this contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;listening&amp;quot;&amp;lt;/code&amp;gt; and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: While remote debugging is enabled, each page in a CEF window exposes the JavaScript global &amp;lt;code&amp;gt;window.anaCefWindow&amp;lt;/code&amp;gt; with fields &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, identifying which window a DevTools target belongs to. The &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt; matches the handle of the corresponding &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-allow-origins:«origins»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) A comma-separated list of origins (or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;) 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, &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt;) send no Origin header and connect without this option. The Chromium spelling &amp;lt;code&amp;gt;--remote-allow-origins=«origins»&amp;lt;/code&amp;gt; is also accepted.&lt;br /&gt;
}}&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/lib:''filename''&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Loads the Analytica library in ''filename'' into the &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /lib:&amp;quot;W:\Analytica\Libraries\Multivariate Distributions.ana&amp;quot; MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
*: A relative ''filename'' is looked for first in the directory that the process was launched from, then in the directories on the &amp;lt;code&amp;gt;AddLibraryDir&amp;lt;/code&amp;gt; library search path, then in the Analytica installation folder, and finally in the preferences folder. Path substitutions such as &amp;lt;code&amp;gt;%appdata%&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%installdir%&amp;lt;/code&amp;gt; are expanded.&lt;br /&gt;
*: Each library loaded this way is its own namespace. Since &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;: (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]].&lt;br /&gt;
*: 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 &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;.&lt;br /&gt;
*: Some built-in defaults are deliberately conservative so that an unattended run cannot damage the model it is testing. In particular, &amp;quot;Save changes?&amp;quot; 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.&lt;br /&gt;
*: 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]]'''.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /lib:BenchmarkDriver.ana MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/AutomationTrace:''filename''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
*: Used together with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, this records what automation answered. Used '''without''' &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
== Command line options for libraries ==&lt;br /&gt;
&lt;br /&gt;
''new in [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
An option that begins with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, 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:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe --AssistaURL:&amp;lt;nowiki&amp;gt;&amp;quot;https://aaia.analytica.com/staging&amp;quot;&amp;lt;/nowiki&amp;gt; --OpenAssista MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A library reads them with [[GetProcessInfo]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--AssistaURL&amp;quot;) &amp;amp;rarr; 'https://aaia.analytica.com/staging'&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--OpenAssista&amp;quot;) &amp;amp;rarr; True&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--NotGiven&amp;quot;) &amp;amp;rarr; Null&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;) &amp;amp;rarr; ['--AssistaURL', '--OpenAssista']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;, and an option that is not on the command line at all reads as &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
&lt;br /&gt;
Because Analytica accepts any unrecognized &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; option silently, a misspelled one is simply ignored rather than reported. &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;)&amp;lt;/code&amp;gt; returns the list of &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that actually arrived, which is how a driver or library can check that it was passed what it expected.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:AssistaURL&amp;quot;)&amp;lt;/code&amp;gt; finds it as well.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line&amp;quot;)&amp;lt;/code&amp;gt; reports.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=GetProcessInfo&amp;diff=64218</id>
		<title>GetProcessInfo</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=GetProcessInfo&amp;diff=64218"/>
		<updated>2026-08-10T20:19:00Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22408: document Command line:--option and Command line parameters (7.2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  [[Category:System Functions]]&lt;br /&gt;
[[Category: Memory management]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
[[GetProcessInfo]] can give you information about the current Analytica or [[ADE]] process, such as user name, computer, name, memory in use, number of processors available, number of objects in the model, and a whole lot more. from the Windows operating system,&lt;br /&gt;
&lt;br /&gt;
== Types of information  ==&lt;br /&gt;
&lt;br /&gt;
[[GetProcessInfo]] returns information about the current Analytica or [[ADE]] process from the Windows operating system, according to which of these texts you pass as the «item» parameter:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Process ID&amp;quot;&amp;lt;/code&amp;gt; -- returns the Process ID, or Pid, for the current process.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Thread ID&amp;quot;&amp;lt;/code&amp;gt; -- returns the Id of the Analytica/ADE thread.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Priority&amp;quot;&amp;lt;/code&amp;gt; -- returns the priority of the Analytica/ADE thread.  The following values are possible (defined by the Windows operating system):&lt;br /&gt;
::*&amp;lt;code&amp;gt;-15&amp;lt;/code&amp;gt; : Idle only&lt;br /&gt;
::*&amp;lt;code&amp;gt;-2&amp;lt;/code&amp;gt; : lowest priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; : below normal&lt;br /&gt;
::*&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; : normal priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; : Above normal&lt;br /&gt;
::*&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; : Highest priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;: Critical priority&lt;br /&gt;
::*&amp;lt;code&amp;gt;31&amp;lt;/code&amp;gt;: Real-time priority&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Computer Name&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;User Name&amp;quot;&amp;lt;/code&amp;gt;: Windows login name&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;User Identity&amp;quot;&amp;lt;/code&amp;gt;: User name in ACP, or Windows login name in DTA.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Windows Version&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Windows SP&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Windows Build&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Abort Event Object&amp;quot;&amp;lt;/code&amp;gt; { ADE only }.  Name of global Event object for ADE project that can be used to send ADE a break signal to abort the current computation.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;ENV:''«name»''&amp;quot;&amp;lt;/code&amp;gt;: Retrieves the value for the environment variable «name»&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Environment Variables&amp;quot;&amp;lt;/code&amp;gt;: List of all Environment variables&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Command Line&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Command line:''«option»''&amp;quot;&amp;lt;/code&amp;gt;: The value of a single option from the command line. See the example below.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Command line parameters&amp;quot;&amp;lt;/code&amp;gt;: A list of the &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that appeared on the command line.}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Analytica Path&amp;quot;&amp;lt;/code&amp;gt;: Full file path to the ''Analytica.exe, Ade.exe'', or ''Ade.dll'' file being run.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Size&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Max&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Min&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Working Set Flags&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt; &amp;quot;Working Set Peak&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Private Bytes&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total RAM&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Free RAM&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total Virtual&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Max Address Space&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Memory Load&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total Free Memory&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Page Fault Count&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Avail Virtual&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Processor #&amp;quot;&amp;lt;/code&amp;gt;: On a multi-core computer, the processor currently running the current evaluation.  This changes with time.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Affinity Mask&amp;quot;&amp;lt;/code&amp;gt;: A list of which processors the operating system will allow Analytica's evaluation to run on.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Num Processors&amp;quot;&amp;lt;/code&amp;gt;: The number of processors the Analytica process is allowed to run on. &lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Num Sys Processors&amp;quot;&amp;lt;/code&amp;gt;: The total number of processors on this computer in the current processor group. Always &amp;lt;=64.{{Release|6.0||&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Num cores&amp;quot;&amp;lt;/code&amp;gt;: The total number of processors on this computer in all [https://docs.microsoft.com/en-us/windows/win32/procthread/processor-groups processor groups]. (Typically the same as &amp;lt;code&amp;gt;&amp;quot;Num Sys Processors&amp;quot;&amp;lt;/code&amp;gt; on computers with 64 cores or less, but can be greater than 64 on very high-end servers).}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;User Objects&amp;quot;&amp;lt;/code&amp;gt;: Number of objects in use (variable nodes, local indexes, etc) by a model&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Total Objects&amp;quot;&amp;lt;/code&amp;gt;: Number of objects in use including both user objects and built-in system objects.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;Free Objects&amp;quot;&amp;lt;/code&amp;gt;: Number of free &amp;quot;slots&amp;quot; still available for additional objects.{{Release|1=7.1|2=|3=&lt;br /&gt;
: &amp;lt;code&amp;gt;'UI Language'&amp;lt;/code&amp;gt;: Returns the language used for the Analytica user interface, &amp;quot;en&amp;quot;=English, &amp;quot;es&amp;quot;=Spanish, etc. }}{{Release|6.5||&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Application Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, top, left, as 4 return values, describing the screen coordinates of the desktop Analytica application window. Returns Null in ADE. &lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Desk Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x,y, as 4 return values, describing the rectangle within the desktop application where MDI windows can be. This rectangle starts below the toolbar, and does not include application boundaries.}}{{Release|1=7.0|2=|3=&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Python Environments&amp;quot;&amp;lt;/code&amp;gt;: returns a list of all discovered Python/conda environment paths&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Python Installations&amp;quot;&amp;lt;/code&amp;gt;: returns just the base Python installations&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Screenshot&amp;quot;&amp;lt;/code&amp;gt;: Returns an image of the Analytica desktop application window (at the time the function call is evaluated).}}{{Release|1=7.1|2=|3=&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Current Monitor Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x, y, as 4 return values, describing the screen coordinates of the monitor that the Analytica application window is currently on. Returns Null in ADE.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Current Monitor Work Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x, y, as 4 return values, describing the work area (excluding taskbar) of the monitor that the Analytica application window is currently on. Returns Null in ADE.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Number of Monitors&amp;quot;&amp;lt;/code&amp;gt;: The number of monitors connected to the system.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Monitor ''N'' Rect&amp;quot;&amp;lt;/code&amp;gt;: Returns width, height, x, y, as 4 return values, describing the screen coordinates of the ''N''th monitor (1-based). Replace ''N'' with any integer from 1 to the value of &amp;lt;code&amp;gt;&amp;quot;Number of Monitors&amp;quot;&amp;lt;/code&amp;gt;. For example, &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Monitor 2 Rect&amp;quot;)&amp;lt;/code&amp;gt; returns the rectangle of the 2nd monitor.&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;quot;Monitor ''N'' Work Rect&amp;quot;&amp;lt;/code&amp;gt;: Like &amp;lt;code&amp;gt;&amp;quot;Monitor ''N'' Rect&amp;quot;&amp;lt;/code&amp;gt; but returns the work area (excluding taskbar) of the ''N''th monitor. For example, &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Monitor 1 Work Rect&amp;quot;)&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Process ID ===&lt;br /&gt;
Knowing the Process ID makes it possible to differentiate between multiple instances of Analytica or [[ADE]] in the Windows Task Manager.  &lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Process ID&amp;quot;) &amp;amp;rarr; 4117&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reading the command line ===&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command Line&amp;quot;) &amp;amp;rarr; '&amp;quot;C:\Program Files\Lumina\Analytica.exe&amp;quot; &amp;quot;C:\My Models\Costs.ana&amp;quot;'&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Analytica Command Line]] for a list of valid command line parameters recognized by Analytica.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
=== Reading a command line option ===&lt;br /&gt;
''new in [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:''«option»''&amp;quot;)&amp;lt;/code&amp;gt; returns the value of one option from the command line, so that you do not have to parse the whole command line yourself. Any option that begins with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, and that Analytica does not itself recognize, is accepted without an ''Unrecognized command line parameter'' warning, so that a library can define command line options of its own. After launching:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe --AssistaURL:&amp;lt;nowiki&amp;gt;&amp;quot;https://aaia.analytica.com/staging&amp;quot;&amp;lt;/nowiki&amp;gt; --OpenAssista MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
these read as:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--AssistaURL&amp;quot;) &amp;amp;rarr; 'https://aaia.analytica.com/staging'&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--OpenAssista&amp;quot;) &amp;amp;rarr; True&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--NotGiven&amp;quot;) &amp;amp;rarr; Null&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;) &amp;amp;rarr; ['--AssistaURL', '--OpenAssista']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value is the text following the option's colon or equal sign. An option present with no value returns &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;, and an option that is not on the command line returns &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;, so a library can distinguish ''not given'' from ''given with no value'' and from ''given an empty text''. A value is always returned as text, even when it looks like a number, so use [[ParseNumber]] when you want a number. When an option is repeated, the last occurrence is reported. The option name is not case-sensitive, and its leading &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;) can be omitted when you read it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;)&amp;lt;/code&amp;gt; returns the list of &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that were actually present. Since a misspelled &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; option is silently ignored rather than reported, this is the way for a launcher or library to confirm that it was passed what it expected.&lt;br /&gt;
&lt;br /&gt;
See [[Analytica Command Line]] for the options that Analytica itself recognizes.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Reading Environment Variables ===&lt;br /&gt;
Obtain a list of all environment variables:&lt;br /&gt;
:&amp;lt;code&amp;gt;Index EnvVarName := GetProcessInfo(&amp;quot;Environment Variables&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Env:&amp;quot;&amp;amp;EnvVarName)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Getting PID from ADE (C#) ===&lt;br /&gt;
:&amp;lt;code&amp;gt;CAEngine ade = new CAEngine();&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;CAObject V = ade.CreateObject(&amp;quot;V&amp;quot;, &amp;quot;variable&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;V.SetAttribute(&amp;quot;definition&amp;quot;, &amp;quot;GetProcessInfo(\&amp;quot;Process ID\&amp;quot;)&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;string pInfoResult = V.Result().ToString();&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Aborting an in-progress evaluation in ADE ===&lt;br /&gt;
To abort a computation in [[ADE]], your program must obtain a HANDLE to the ''abort event object''.  In order to obtain this, you need to obtain the name of this object from ADE.  You get this by calling &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Abort Event Object&amp;quot;)&amp;lt;/code&amp;gt;.  You then use the Windows Platform SDK routine OpenEvent to get the handle to this object.  When you want to abort an in-process computation, you set this event.  Generally your application that uses ADE will need to be multi-threaded, so that one thread calls ADE, the other thread detects the signal to abort the computation (the signal might be a user pressing ''Ctrl+Break'', for example).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background:white; border:white; margin-left: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
C++ example:&lt;br /&gt;
&lt;br /&gt;
    /* From first application thread, which uses ADE: */&lt;br /&gt;
    #include &amp;lt;windows.h&amp;gt;&lt;br /&gt;
    #import &amp;quot;ADE.exe&amp;quot;&lt;br /&gt;
    using namespace ADE4;&lt;br /&gt;
    ...&lt;br /&gt;
    GLOBAL HEVENT hAbort;&lt;br /&gt;
    ...&lt;br /&gt;
    void main() &lt;br /&gt;
    {&lt;br /&gt;
        ...&lt;br /&gt;
        CAEngine* pAde = new CAEngine();&lt;br /&gt;
        pAde-&amp;gt;SendCommand(&amp;quot;GetProcessInfo('Abort Event Object')&amp;quot;);&lt;br /&gt;
        _bstr_t abortObjName = pAde-&amp;gt;get_OutputBuffer();&lt;br /&gt;
        hAbort = OpenEvent(EVENT_MODIFY_STATE,/*bInherit*/FALSE,abortObjName);&lt;br /&gt;
        ...&lt;br /&gt;
        CreateThread(..., MonitorForBreak,... );&lt;br /&gt;
        CTable* pResult = pAde-&amp;gt;Get(&amp;quot;X&amp;quot;)-&amp;gt;ResultTable();  /* Initiate a very long computation */&lt;br /&gt;
        if (pAde-&amp;gt;get_ErrorCode() == 78) {&lt;br /&gt;
             /* The computation was aborted before completion */&lt;br /&gt;
             ...&lt;br /&gt;
        }&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    DWORD WINAPI MonitorForBreak( LPVOID )&lt;br /&gt;
    {&lt;br /&gt;
         /* This routine detects a signal to break the computation.  Maybe it is a user-keypress,&lt;br /&gt;
          * or other UI interaction. */&lt;br /&gt;
         if (DetectUserWantsToAbort()) {&lt;br /&gt;
             SetEvent(hAbort);                   /* Causes the abort */&lt;br /&gt;
         }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Memory Information ===&lt;br /&gt;
The Analytica process that evaluates your model may end up using a lot of memory.  The operating system keeps some of that memory in RAM, and swaps some of it out to virtual memory.  Accessing RAM is fast, while accessing virtual memory is much slower.  Windows makes various tradeoffs with what other programs are running on your computer to decide how much of the Analytica process to keep in RAM.  The amount of RAM to devote to Analytica is called its ''working set''.  When the working set is much smaller that the available RAM, other applications on your computer will respond well (since they can use that RAM), but Analytica may run slowly.  If the working set is close to the amount of available RAM, then Analytica gets to make more use of fast RAM, but other applications, and the Windows UI, may get very slow, since they will then need to switch in and out of memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Working Set Max&amp;quot;)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Working set Min&amp;quot;)&amp;lt;/code&amp;gt; return the minimum and maximum working set size, in bytes, currently imposed by Windows on the Analytica process.  &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Working Set Flags&amp;quot;)&amp;lt;/code&amp;gt; returns an integer containing flags, indicating whether Windows is allowed to alter these limits as the process uses more or less memory.  The flags are the following numbers added together:&lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; = Analytica is guaranteed at least the minimum working set.&lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; = Windows may reduce Analytica's working set below the minimum value when memory demands are high&lt;br /&gt;
* &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; = Windows will not allocate more than the indicated working set max.&lt;br /&gt;
* &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt; = Windows may give Analytica more than the &amp;lt;code&amp;gt;Working Set Max&amp;lt;/code&amp;gt; when memory demands from other applications is low.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;quot;Avail Virtual&amp;quot;&amp;lt;/code&amp;gt; option returns the number that Windows reports as the theoretical maximum amount of memory available to all processes running on the operating system, including both RAM and page file space.  However, the number isn't very meaningful or reliable, as Windows often reports a number that far exceeds the amount of available hard disk space (for example, in Windows x64, a number of 8.8 TeraBytes is reported), and in 32-bit processes on Windows x64, the huge number seems to be wrap at 4GB, resulting in a nonesense (and often very small) number.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=6.5|2=|3=&lt;br /&gt;
== Application window coordinates == &lt;br /&gt;
''new in [[Analytica 6.5]]''&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] (width, height, left, top) := [[GetProcessInfo]]( 'Application Rect');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gets the rectangle, in screen coordinates, of the desktop application.  From ADE, or ACP when there is no dual desktop UI running, returns Null.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]](width, height) := [[GetProcessInfo]]('Desk Rect');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gets the size of the desk, the rectangle within the application where diagram windows, object window, result windows, the outliner, Assista window, etc. reside. This desk rectangle starts below the toolbar. You can also get the location:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]](width, height, x, y) := [[GetProcessInfo]]('Desk Rect');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The x,y location coordinate is relative to the application window.&lt;br /&gt;
}}&lt;br /&gt;
==History==&lt;br /&gt;
This function was introduced in [[What's new in Analytica 4.0?|Analytica 4.0]].&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Working Set Size]]&lt;br /&gt;
* [[Memory usage and management]]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64217</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64217"/>
		<updated>2026-08-10T20:11:38Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22408: document the -- prefix and library command line options (7.2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  [[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=As of [[Analytica 7.2]], an option may also be prefixed with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, and an option value may be introduced by an equal sign, &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, in place of the colon. So &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-nosplash&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--nosplash&amp;lt;/code&amp;gt; are all the same option, and &amp;lt;code&amp;gt;/mcp:8080&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--mcp=8080&amp;lt;/code&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-debugging-port:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on &amp;lt;code&amp;gt;127.0.0.1:«port»&amp;lt;/code&amp;gt;, so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt; page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; function. The Chromium spelling &amp;lt;code&amp;gt;--remote-debugging-port=«port»&amp;lt;/code&amp;gt; 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).&lt;br /&gt;
*: After launch, the process reports the outcome in &amp;lt;code&amp;gt;%LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json&amp;lt;/code&amp;gt;, where «pid» is the process id of the launched Analytica.exe. On success this contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;listening&amp;quot;&amp;lt;/code&amp;gt; and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: While remote debugging is enabled, each page in a CEF window exposes the JavaScript global &amp;lt;code&amp;gt;window.anaCefWindow&amp;lt;/code&amp;gt; with fields &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, identifying which window a DevTools target belongs to. The &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt; matches the handle of the corresponding &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-allow-origins:«origins»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) A comma-separated list of origins (or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;) 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, &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt;) send no Origin header and connect without this option. The Chromium spelling &amp;lt;code&amp;gt;--remote-allow-origins=«origins»&amp;lt;/code&amp;gt; is also accepted.&lt;br /&gt;
}}&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/lib:''filename''&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Loads the Analytica library in ''filename'' into the &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /lib:&amp;quot;W:\Analytica\Libraries\Multivariate Distributions.ana&amp;quot; MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
*: A relative ''filename'' is looked for first in the directory that the process was launched from, then in the directories on the &amp;lt;code&amp;gt;AddLibraryDir&amp;lt;/code&amp;gt; library search path, then in the Analytica installation folder, and finally in the preferences folder. Path substitutions such as &amp;lt;code&amp;gt;%appdata%&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%installdir%&amp;lt;/code&amp;gt; are expanded.&lt;br /&gt;
*: Each library loaded this way is its own namespace. Since &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;: (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]].&lt;br /&gt;
*: 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 &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;.&lt;br /&gt;
*: Some built-in defaults are deliberately conservative so that an unattended run cannot damage the model it is testing. In particular, &amp;quot;Save changes?&amp;quot; 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.&lt;br /&gt;
*: 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]]'''.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /lib:BenchmarkDriver.ana MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/AutomationTrace:''filename''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
*: Used together with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, this records what automation answered. Used '''without''' &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
== Command line options for libraries ==&lt;br /&gt;
&lt;br /&gt;
''new in [[Analytica 7.2]]''&lt;br /&gt;
&lt;br /&gt;
An option that begins with a double minus, &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;, 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:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe --AssistaURL:&amp;lt;nowiki&amp;gt;&amp;quot;https://aaia.analytica.com/staging&amp;quot;&amp;lt;/nowiki&amp;gt; --OpenAssista MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A library reads them with [[GetProcessInfo]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--AssistaURL&amp;quot;) &amp;amp;rarr; 'https://aaia.analytica.com/staging'&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--OpenAssista&amp;quot;) &amp;amp;rarr; True&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:--NotGiven&amp;quot;) &amp;amp;rarr; Null&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;) &amp;amp;rarr; ['--AssistaURL', '--OpenAssista']&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;, and an option that is not on the command line at all reads as &amp;lt;code&amp;gt;Null&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
&lt;br /&gt;
Because Analytica accepts any unrecognized &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; option silently, a misspelled one is simply ignored rather than reported. &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line parameters&amp;quot;)&amp;lt;/code&amp;gt; returns the list of &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; options that actually arrived, which is how a driver or library can check that it was passed what it expected.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line:AssistaURL&amp;quot;)&amp;lt;/code&amp;gt; finds it as well.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;GetProcessInfo(&amp;quot;Command line&amp;quot;)&amp;lt;/code&amp;gt; reports.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=MCP_server_in_Analytica&amp;diff=64215</id>
		<title>MCP server in Analytica</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=MCP_server_in_Analytica&amp;diff=64215"/>
		<updated>2026-08-07T19:02:31Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22409: note that /Automation keeps modal dialogs from blocking an agent session; link to the Automation guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''New in [[Analytica 7.0]]''&lt;br /&gt;
&lt;br /&gt;
::''The feature described here is '''''experimental''''' and for the time being intended for Lumina-internal use. As an experimental feature, it is subject to change.''&lt;br /&gt;
&lt;br /&gt;
== Implementing an MCP server ==&lt;br /&gt;
A [https://modelcontextprotocol.io/docs/getting-started/intro Model Context Protocol (MCP)] server exposes tools that can be used by an AI agent such as Claude Code and Gemini CLI. It is possible to implement an MCP server directly in an Analytica model using specially tagged [[UDF]]s to implement each tool. It is easy to do so, and can enable AI agents to use or control your Analytica model.&lt;br /&gt;
&lt;br /&gt;
At present, this feature has been created and is being used (or use being explored) internally at Lumina in several ways, including:&lt;br /&gt;
* For automation of Quality Assurance testing.&lt;br /&gt;
* For end-to-end Assista evaluation (especially when Assista takes actions during its response).&lt;br /&gt;
* To enable AI coding tools to more actively control Analytica when developing code, debugging, reproducing UI bugs, etc.&lt;br /&gt;
* To interactively use desktop Analytica in coordination with Claude Code, especially on some cases where Claude has access to tools that Assista does not.&lt;br /&gt;
&lt;br /&gt;
The current feature implementation has distinct limitations, and is likely to change as we gain more internal experience with coordinating AI agents and desktop Analytica.&lt;br /&gt;
&lt;br /&gt;
== Creating an MCP server ==&lt;br /&gt;
To put desktop Analytica into an MCP-serving mode, you need to launch it with the command line parameter:&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /mcp:«port»&amp;lt;/code&amp;gt;&lt;br /&gt;
such as&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /mcp:6541&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To implement a tool that an AI agent can use, create a [[User-Defined Function]] with a description that guides a language model as to when and how to use the tool, and then include the following text somewhere within the description: &amp;lt;code&amp;gt;{@mcpTool}&amp;lt;/code&amp;gt;. We usually place this at the very beginning or very end of the description. This tag labels the UDF as an MCP tool. &lt;br /&gt;
&lt;br /&gt;
When you declare parameters, you ''must'' declare the data type of each parameter as either &amp;lt;code&amp;gt;Number&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;atom&amp;lt;/code&amp;gt; qualifier is also recommended but not required. Parameters can be optional and can include default values. At this time, no parameter can  be declared as an array, index, object (or other non-evaluated eval mode), or repeated parameter. These may be relaxed later as the implementation becomes more complete.&lt;br /&gt;
&lt;br /&gt;
If your UDF makes use of parameter qualifiers that are not yet supported, it will not be included in the tool/list result.&lt;br /&gt;
&lt;br /&gt;
== Configuring the client ==&lt;br /&gt;
To configure the client to use your server, your Analytica process must already be running with your UDFs existing.&lt;br /&gt;
&lt;br /&gt;
Configure the client using a Transport type of &amp;lt;code&amp;gt;&amp;quot;Streamable HTTP&amp;quot;&amp;lt;/code&amp;gt; and a URL of &amp;lt;code&amp;gt;&amp;quot;http://localhost:6541/mcp&amp;quot;&amp;lt;/code&amp;gt;, where the port number matches the port you used for the &amp;lt;code&amp;gt;/mcp:6541&amp;lt;/code&amp;gt; parameter when you launched Analytica.exe.&lt;br /&gt;
&lt;br /&gt;
A convenient testing client is the '''MCP Inspector''' which can be run in an installation-free mode. You do have to already have Node.js installed, and then from a command line just run:&lt;br /&gt;
:&amp;lt;code&amp;gt;npx @modelcontextprotocol/inspector&amp;lt;/code&amp;gt;&lt;br /&gt;
The testing client UI opens in a browser. After you connect, you should see your exposed UDFs after pressing '''List tools'''.&lt;br /&gt;
&lt;br /&gt;
== Keeping dialogs from blocking the agent ==&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
A modal dialog is invisible to an AI agent: if Analytica poses one while serving a tool call, the call simply never returns and the agent cannot tell a blocked process from a slow one. Launch Analytica with the &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt; option alongside &amp;lt;code&amp;gt;/mcp:&amp;lt;/code&amp;gt; so that every blocking dialog is answered automatically and the session keeps running:&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /Automation /mcp:6541 MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
A model or library can also register a handler with [[RegisterAutomationModalHandler]] to decide the answers itself, and to record each dialog so that an &amp;lt;code&amp;gt;{@mcpTool}&amp;lt;/code&amp;gt; UDF can report back to the agent what Analytica asked while a tool call ran. See [[Analytica Command Line/Automation]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
There are currently many limitations. These contribute to the experimental status of the feature. These may be progressively relaxed in the future.&lt;br /&gt;
* Not namespace aware - make sure your tools are in scope from the main model and names not ambiguous.&lt;br /&gt;
* Only a subset of [[Function Parameter Qualifiers]] currently supported:&lt;br /&gt;
** Only Number and Text parameters &lt;br /&gt;
** Array parameters, index parameters, and other evaluation models other than Context are not supported.&lt;br /&gt;
** Repeated parameters not supported.&lt;br /&gt;
* No array abstraction on calls.&lt;br /&gt;
* Can only be used by AI agents running on localhost.&lt;br /&gt;
* Does not proactively push notification to clients when changes to the &amp;lt;code&amp;gt;tools/list&amp;lt;/code&amp;gt; occur.  (But you can interactively debug and refine your tools, you clients just need to re-read the tool list. Claude Code needs to be restarted to have in reread).&lt;br /&gt;
* There is no authentication on the connection. Hence, once you have your server running, and process running on localhost could potentially connect and call your tools.&lt;br /&gt;
* If a UDF with the &amp;lt;code&amp;gt;{@mcpTool}&amp;lt;/code&amp;gt; tag uses parameter qualifiers that aren't yet supported, it is quietly excluded from the tool list, but it does not report this to you, nor does it report what qualifier is not supported.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=RegisterAutomationModalHandler&amp;diff=64214</id>
		<title>RegisterAutomationModalHandler</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=RegisterAutomationModalHandler&amp;diff=64214"/>
		<updated>2026-08-07T19:02:14Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22409: new function reference page for RegisterAutomationModalHandler (new to 7.2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:User-interface functions]]&lt;br /&gt;
[[Category:Doc Status D]] &amp;lt;!-- For Lumina use, do not change --&amp;gt;&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== RegisterAutomationModalHandler( handler ) ==&lt;br /&gt;
&lt;br /&gt;
''New to [[Analytica 7.2]].''&lt;br /&gt;
&lt;br /&gt;
Registers «handler» as the function that answers modal dialogs while Analytica is running in ''automation mode'' — that is, while the process was launched with the [[Analytica Command Line|command line]] option &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;. Returns the previously registered handler, or [[Null]] if there was none.&lt;br /&gt;
&lt;br /&gt;
In automation mode, every modal dialog that would otherwise block is answered automatically instead of being shown. When a handler is registered, it is called with a description of each dialog and its return value supplies the answer. When no handler is registered, or when the handler returns [[Null]], a built-in default answer is used.&lt;br /&gt;
&lt;br /&gt;
The function may be called at any time, and the registration succeeds whether or not the process is in automation mode. The handler is only ''consulted'' in automation mode, so it is harmless to leave the call in a model that people also use interactively.&lt;br /&gt;
&lt;br /&gt;
For a guide to using this — including the full table of built-in defaults, worked examples, and how to package a handler as a driver library for benchmarks or for an AI agent — see '''[[Analytica Command Line/Automation]]'''.&lt;br /&gt;
&lt;br /&gt;
=== The «handler» parameter ===&lt;br /&gt;
&lt;br /&gt;
«handler» is required, and must be a callable that accepts one parameter:&lt;br /&gt;
* a [[Handle]] to a [[User-Defined Function]],&lt;br /&gt;
* a local (lambda) function, or&lt;br /&gt;
* a Python callable.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[RegisterAutomationModalHandler]]( [[Handle]](My_dialog_handler) )&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[RegisterAutomationModalHandler]]( Function(s) ::= If s-&amp;gt;kind = 'SaveChanges' Then 'No' Else [[Null]] )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An error is reported if «handler» is not callable.&lt;br /&gt;
&lt;br /&gt;
There is no separate &amp;quot;unregister&amp;quot; form. A handler that returns [[Null]] for every dialog behaves identically to having no handler at all — the built-in defaults apply — so registering such a handler stands the previous one down. Because the previous handler is returned, a library can also chain to it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Variable Prior_handler := RegisterAutomationModalHandler( Handle(My_handler) )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The «s» parameter of the handler ===&lt;br /&gt;
&lt;br /&gt;
The handler receives one &amp;lt;code&amp;gt;AutomationDialogStruct&amp;lt;/code&amp;gt; value describing the dialog. Read its fields with the &amp;lt;code&amp;gt;-&amp;gt;&amp;lt;/code&amp;gt; operator, e.g. &amp;lt;code&amp;gt;s-&amp;gt;kind&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; || Text || The dialog family. One of &amp;lt;code&amp;gt;'MsgBox'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Ask'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AskText'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AskNumber'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AskChoice'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'FileOpen'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'FileSave'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Warning'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Redefine'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'SaveChanges'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Comment'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'LinkedModuleChanged'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Win32Dialog'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'MacAppDialog'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Alert'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'CmdLineWarning'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || Text or [[Null]] || A stable identity for the particular dialog when one is known, such as &amp;lt;code&amp;gt;'SaveQuitting'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'CheckFailure'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'ContinueReading'&amp;lt;/code&amp;gt;, or the internal name of a template dialog&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;caption&amp;lt;/code&amp;gt; || Text or [[Null]] || The dialog's title bar text&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;body&amp;lt;/code&amp;gt; || Text or [[Null]] || The dialog's message text&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt; || List of Text, or [[Null]] || The button names offered, e.g. &amp;lt;code&amp;gt;['Yes','No','Cancel']&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;defaultAnswer&amp;lt;/code&amp;gt; || Text || What the built-in default would answer if the handler returns [[Null]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;obj&amp;lt;/code&amp;gt; || [[Handle]] or [[Null]] || The object the dialog concerns, when there is one&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;att&amp;lt;/code&amp;gt; || Text or [[Null]] || The attribute concerned, when relevant&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;seq&amp;lt;/code&amp;gt; || Number || This dialog's sequence number, matching the &amp;lt;code&amp;gt;seq&amp;lt;/code&amp;gt; field in the &amp;lt;code&amp;gt;/AutomationTrace:&amp;lt;/code&amp;gt; log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The field set is fixed for [[Analytica 7.2]] and will only grow by addition, so a handler that reads these fields will keep working.&lt;br /&gt;
&lt;br /&gt;
=== The handler's return value ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Return value !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| [[Null]] || Use the built-in default answer for this dialog&lt;br /&gt;
|-&lt;br /&gt;
| Text || For a button dialog: the name of the button to press — &amp;lt;code&amp;gt;'Yes'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'No'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'OK'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Cancel'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Ignore'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Retry'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Abort'&amp;lt;/code&amp;gt;. For &amp;lt;code&amp;gt;'AskText'&amp;lt;/code&amp;gt;: the text to enter. For &amp;lt;code&amp;gt;'FileOpen'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'FileSave'&amp;lt;/code&amp;gt;: the full path of the file to use, which is treated exactly as if the user had selected it&lt;br /&gt;
|-&lt;br /&gt;
| Number || For &amp;lt;code&amp;gt;'AskNumber'&amp;lt;/code&amp;gt;: the value entered. For &amp;lt;code&amp;gt;'AskChoice'&amp;lt;/code&amp;gt;: the 1-based index of the option chosen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Answering &amp;lt;code&amp;gt;'Cancel'&amp;lt;/code&amp;gt; has exactly the same effect as a user pressing Cancel, including aborting the computation in progress where that is what Cancel normally does.&lt;br /&gt;
&lt;br /&gt;
If the return value is not one of the above — a button name that the dialog does not offer, or the wrong data type for the dialog — the built-in default is used and the event is recorded in the trace log as &amp;lt;code&amp;gt;handler-error-fallback&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Rules the handler runs under ===&lt;br /&gt;
&lt;br /&gt;
* '''Main thread only.''' A dialog raised on a worker thread (during parallel evaluation, for example) is answered with the built-in default without calling the handler. Such events are recorded as &amp;lt;code&amp;gt;offthread-default&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''Not re-entrant.''' A dialog raised ''while'' the handler is running takes the built-in default rather than calling the handler again, and is recorded as &amp;lt;code&amp;gt;reentrant-default&amp;lt;/code&amp;gt;. Note that [[WriteTextFile]] can itself raise a dialog, so pass &amp;lt;code&amp;gt;warn: False&amp;lt;/code&amp;gt; when logging from a handler.&lt;br /&gt;
* '''Errors are contained.''' If the handler raises an error, the built-in default is used, the event is recorded as &amp;lt;code&amp;gt;handler-error-fallback&amp;lt;/code&amp;gt;, and evaluation continues. The handler is not called a second time and no dialog is shown about the failure.&lt;br /&gt;
* '''Cannot change the model.''' The handler runs with model dirtying and autosave suppressed, so observing a dialog cannot mark the model as changed. Do not use a handler to modify the model.&lt;br /&gt;
* '''Error state is preserved.''' Most dialogs occur while an error or warning is pending. That state is saved before the handler is called and restored afterwards.&lt;br /&gt;
* '''Timed.''' The handler's wall-clock time is recorded in the trace log as &amp;lt;code&amp;gt;handlerMs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Answer one specific question and default everything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Function Qa_handler( s : atom ) :=&lt;br /&gt;
   If s-&amp;gt;id = 'CheckFailure' Then 'No'&lt;br /&gt;
   Else If s-&amp;gt;kind = 'FileOpen' Then 'C:\Scenarios\input1.csv'&lt;br /&gt;
   Else Null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[RegisterAutomationModalHandler]]( [[Handle]](Qa_handler) )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Record every dialog without changing any answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Function Watch_handler( s : atom ) :=&lt;br /&gt;
   ( WriteTextFile( 'dialogs.log',&lt;br /&gt;
                    s-&amp;gt;seq &amp;amp; Chr(9) &amp;amp; s-&amp;gt;kind &amp;amp; Chr(9) &amp;amp; s-&amp;gt;defaultAnswer &amp;amp; Chr(13) &amp;amp; Chr(10),&lt;br /&gt;
                    append: True, warn: False );&lt;br /&gt;
     Null )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* The handler is a property of the process, not of the model. It survives closing one model and opening another, which is what makes it useful in a library loaded with &amp;lt;code&amp;gt;/lib:&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the [[UDF]] a registered handle refers to is deleted (for instance because its model was closed), the handler is treated as unregistered and the built-in defaults resume.&lt;br /&gt;
* This function is hidden from the function list (it has a low Intellisense level); type its name to use it.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
* '''[[Analytica Command Line/Automation]]'''&lt;br /&gt;
* [[Analytica Command Line]]&lt;br /&gt;
* [[MCP server in Analytica]]&lt;br /&gt;
* [[Running a model in a command line workflow]]&lt;br /&gt;
* [[MsgBox]]&lt;br /&gt;
* [[AskMsgText]]&lt;br /&gt;
* [[AskMsgNumber]]&lt;br /&gt;
* [[AskMsgChoice]]&lt;br /&gt;
* [[Handle]]&lt;br /&gt;
* [[User-Defined Function]]&lt;br /&gt;
* [[WriteTextFile]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line/Automation&amp;diff=64213</id>
		<title>Analytica Command Line/Automation</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line/Automation&amp;diff=64213"/>
		<updated>2026-08-07T18:58:08Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22409: new user guide for /Automation mode - defaults, writing a RegisterAutomationModalHandler handler, the trace log, and driver/agent/QA uses&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
''New in [[Analytica 7.2]].'' See also the parent page, [[Analytica Command Line]].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Why automation mode exists ==&lt;br /&gt;
&lt;br /&gt;
A dialog box is fine when a person is sitting in front of Analytica. It is fatal when nobody is. A single unexpected &amp;quot;Save changes?&amp;quot; or &amp;quot;This variable failed its Check&amp;quot; dialog will stop an overnight benchmark, a QA sweep, or an AI agent's session dead, and you often will not find out until much later that nothing after that point ran.&lt;br /&gt;
&lt;br /&gt;
Launching with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt; answers those dialogs for you:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /Automation MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every modal dialog that would block gets an answer — either a sensible built-in default, or an answer computed by a handler function you register with [[RegisterAutomationModalHandler]]. The run keeps going.&lt;br /&gt;
&lt;br /&gt;
Three things are worth being clear about up front:&lt;br /&gt;
&lt;br /&gt;
* '''It is not a headless mode.''' The main window, diagrams, result windows, HTML dialogs, and Assista all work exactly as usual. You can watch the run happen, and you can take over with the mouse at any point. If you want Analytica without a user interface, that is a different thing entirely.&lt;br /&gt;
* '''It changes nothing unless you ask for it.''' Without the flag, every dialog behaves exactly as it always has. Automation mode is a property of the process, set once from the command line.&lt;br /&gt;
* '''The defaults are chosen to protect the model under test,''' not to make progress at all costs. Where &amp;quot;keep going&amp;quot; and &amp;quot;do not touch anything&amp;quot; conflict, automation picks &amp;quot;do not touch anything&amp;quot; — see [[#What the built-in defaults do]].&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Just run it ===&lt;br /&gt;
&lt;br /&gt;
Start with no handler at all. The built-in defaults handle a surprising amount on their own:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /Automation /eval:Run_batch &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your model already runs unattended except for the occasional dialog, this may be all you need.&lt;br /&gt;
&lt;br /&gt;
=== See which dialogs your scenario actually poses ===&lt;br /&gt;
&lt;br /&gt;
Before writing any handler, find out what you are dealing with. Add a trace file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every dialog is appended to &amp;lt;code&amp;gt;run1.jsonl&amp;lt;/code&amp;gt; as one JSON object per line, recording what it said and how it was answered. See [[#The trace log]].&lt;br /&gt;
&lt;br /&gt;
You can also run the trace ''without'' &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /AutomationTrace:C:\Temp\baseline.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is '''observe mode'''. Dialogs appear and block normally, exactly as for any other user, and the log records what ''you'' chose. It is the easiest way to walk a scenario by hand once and get a complete inventory of its dialogs, along with the answers a human considered correct — which is a good starting specification for the handler you are about to write.&lt;br /&gt;
&lt;br /&gt;
== What the built-in defaults do ==&lt;br /&gt;
&lt;br /&gt;
With no handler registered, dialogs are answered as follows.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Dialog !! Automatic answer !! Why&lt;br /&gt;
|-&lt;br /&gt;
| Message boxes ([[MsgBox]] and internal ones) || The default button — the one '''Enter''' would press || Matches what a user pressing through quickly would get&lt;br /&gt;
|-&lt;br /&gt;
| [[AskMsgText]] || The «default» text || The value the model already proposed&lt;br /&gt;
|-&lt;br /&gt;
| [[AskMsgNumber]] || The «default» number ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AskMsgChoice]] || The «default» option ||&lt;br /&gt;
|-&lt;br /&gt;
| '''Save changes?''' on close or quit || '''No''' — discard || An unattended run must never overwrite the model it is testing&lt;br /&gt;
|-&lt;br /&gt;
| Evaluation warnings (Check failures, bad values) || Ignore ''this one'' || See the note below&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Stop evaluating and edit the definition?&amp;quot; || '''No''' || The error is already recorded; opening an editor mid-run helps nobody&lt;br /&gt;
|-&lt;br /&gt;
| File open / file save prompts || Fail, as if cancelled || Guessing a filename is worse than failing. A handler can supply a real path&lt;br /&gt;
|-&lt;br /&gt;
| Other template-based dialogs || Cancel, ''without running the dialog'' || Cancelling a dialog that never opened has no side effects&lt;br /&gt;
|-&lt;br /&gt;
| Externally-changed linked module || Later (keep what is in memory) ||&lt;br /&gt;
|-&lt;br /&gt;
| Legal agreement, license prompts || Accepted || So a fresh machine does not hang at startup&lt;br /&gt;
|-&lt;br /&gt;
| Unrecognized command-line option || Continue || Never &amp;lt;code&amp;gt;exit(-1)&amp;lt;/code&amp;gt; in the middle of a batch&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Two of these deserve emphasis.&lt;br /&gt;
&lt;br /&gt;
'''Save changes is answered No.''' This is deliberately the opposite of what Analytica's existing headless/server path does, which silently saves. A benchmark that mutates its fixture model between runs is not measuring what you think it is measuring, and a QA run that rewrites the model under test destroys the evidence. If your automation genuinely wants to save, make that explicit — have your handler answer &amp;lt;code&amp;gt;'Yes'&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;'SaveChanges'&amp;lt;/code&amp;gt; dialog, so the intent is visible in the trace.&lt;br /&gt;
&lt;br /&gt;
'''Warnings are ignored once, not switched off.''' Pressing &amp;quot;Ignore Warnings&amp;quot; interactively silences warnings for the rest of the session. Automation deliberately does not do that: each warning is cleared individually, so the tenth warning is still reported to your handler and still written to the trace. You get a complete record instead of a log that goes quiet after the first problem.&lt;br /&gt;
&lt;br /&gt;
Dialogs raised on a worker thread (during parallel evaluation, for instance) always take the built-in default and are recorded with &amp;lt;code&amp;gt;&amp;quot;source&amp;quot;:&amp;quot;offthread-default&amp;quot;&amp;lt;/code&amp;gt;. Your handler is only consulted on the main thread.&lt;br /&gt;
&lt;br /&gt;
== Writing an automation handler ==&lt;br /&gt;
&lt;br /&gt;
When the defaults are not enough — when the answer depends on ''which'' dialog it is, or when you want to record something, or ask a person or an orchestrator — register a handler:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[RegisterAutomationModalHandler]]( ''handler'' )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The handler is any callable: a handle to a [[UDF]], a local (lambda) function, or a Python callable. It takes one parameter, receives a struct describing the dialog, and returns the answer. It may be registered at any time, but it is only consulted when the process is running with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, so it is harmless to leave the registration in a model that people also use interactively.&lt;br /&gt;
&lt;br /&gt;
The simplest useful handler answers nothing and just watches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Function Log_dialogs( s : atom ) :=&lt;br /&gt;
    ( WriteTextFile( 'dialogs.log',&lt;br /&gt;
                     s-&amp;gt;seq &amp;amp; '  ' &amp;amp; s-&amp;gt;kind &amp;amp; '  ' &amp;amp; s-&amp;gt;caption &amp;amp; Chr(13) &amp;amp; Chr(10),&lt;br /&gt;
                     append: True, warn: False );&lt;br /&gt;
      Null )              { Null means: use the built-in default }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[RegisterAutomationModalHandler]]( [[Handle]](Log_dialogs) )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What the handler receives ===&lt;br /&gt;
&lt;br /&gt;
The parameter is an &amp;lt;code&amp;gt;AutomationDialogStruct&amp;lt;/code&amp;gt; with these fields, read with the &amp;lt;code&amp;gt;-&amp;gt;&amp;lt;/code&amp;gt; operator:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; || The family of dialog: &amp;lt;code&amp;gt;'MsgBox'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Ask'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AskText'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AskNumber'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'AskChoice'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'FileOpen'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'FileSave'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Warning'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Redefine'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'SaveChanges'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'LinkedModuleChanged'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Win32Dialog'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'MacAppDialog'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Alert'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Comment'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'CmdLineWarning'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || A stable identity for the specific dialog when one is known, such as &amp;lt;code&amp;gt;'SaveQuitting'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'CheckFailure'&amp;lt;/code&amp;gt;, or the internal name of a template dialog. [[Null]] otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;caption&amp;lt;/code&amp;gt; || The title bar text&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;body&amp;lt;/code&amp;gt; || The message text&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt; || A list of the button names offered, such as &amp;lt;code&amp;gt;['Yes','No','Cancel']&amp;lt;/code&amp;gt;. [[Null]] when the dialog is not a button dialog&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;defaultAnswer&amp;lt;/code&amp;gt; || What the built-in default would answer, as text. Useful for logging, and for &amp;quot;default unless I say otherwise&amp;quot; logic&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;obj&amp;lt;/code&amp;gt; || A [[Handle]] to the object the dialog is about, when there is one. [[Null]] otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;att&amp;lt;/code&amp;gt; || The attribute involved, as text, when relevant&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;seq&amp;lt;/code&amp;gt; || The sequence number of this dialog, matching the &amp;lt;code&amp;gt;seq&amp;lt;/code&amp;gt; in the trace log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== What the handler returns ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Return !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| [[Null]] || Use the built-in default. This is the right answer most of the time&lt;br /&gt;
|-&lt;br /&gt;
| Text || For a button dialog, the name of the button to press: &amp;lt;code&amp;gt;'Yes'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'No'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'OK'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Cancel'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Ignore'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Retry'&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;'Abort'&amp;lt;/code&amp;gt;. For &amp;lt;code&amp;gt;'AskText'&amp;lt;/code&amp;gt;, the text to enter. For &amp;lt;code&amp;gt;'FileOpen'&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;'FileSave'&amp;lt;/code&amp;gt;, the full path of the file to use&lt;br /&gt;
|-&lt;br /&gt;
| Number || For &amp;lt;code&amp;gt;'AskNumber'&amp;lt;/code&amp;gt;, the value. For &amp;lt;code&amp;gt;'AskChoice'&amp;lt;/code&amp;gt;, the 1-based index of the option to choose&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Answering a file dialog with a path is often the single highest-value thing a handler does: instead of the prompt failing, the run proceeds with exactly the file your driver wants, chosen at the moment it is asked for.&lt;br /&gt;
&lt;br /&gt;
A handler that returns [[Null]] for everything behaves exactly like no handler at all, which is how you stand a handler down without unregistering it.&lt;br /&gt;
&lt;br /&gt;
=== A worked example ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Function Bench_handler( s : atom ) :=&lt;br /&gt;
  Var body := If IsNull(s-&amp;gt;body) Then '' Else s-&amp;gt;body;&lt;br /&gt;
  ( { 1. Record everything, whatever we decide below. }&lt;br /&gt;
    WriteTextFile( 'bench-dialogs.log',&lt;br /&gt;
                   s-&amp;gt;seq &amp;amp; Chr(9) &amp;amp; s-&amp;gt;kind &amp;amp; Chr(9) &amp;amp; s-&amp;gt;defaultAnswer &amp;amp; Chr(9) &amp;amp; body &amp;amp; Chr(13) &amp;amp; Chr(10),&lt;br /&gt;
                   append: True, warn: False );&lt;br /&gt;
&lt;br /&gt;
    { 2. Feed the scenario the input file it is about to ask for. }&lt;br /&gt;
    If s-&amp;gt;kind = 'FileOpen' Then Bench_input_path&lt;br /&gt;
&lt;br /&gt;
    { 3. This scenario is supposed to reach the end; a Check failure means it did not. }&lt;br /&gt;
    Else If s-&amp;gt;kind = 'Warning' Or s-&amp;gt;id = 'CheckFailure' Then&lt;br /&gt;
       ( WriteTextFile( 'bench-failures.log', 'FAILED: ' &amp;amp; body &amp;amp; Chr(13) &amp;amp; Chr(10),&lt;br /&gt;
                        append: True, warn: False );&lt;br /&gt;
         Null )&lt;br /&gt;
&lt;br /&gt;
    { 4. Everything else: whatever the built-in default is. }&lt;br /&gt;
    Else Null )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rules the handler runs under ===&lt;br /&gt;
&lt;br /&gt;
* '''Main thread only.''' Dialogs raised on worker threads take the built-in default (traced as &amp;lt;code&amp;gt;offthread-default&amp;lt;/code&amp;gt;).&lt;br /&gt;
* '''No re-entry.''' If your handler itself causes a dialog — and a [[WriteTextFile]] easily can — that inner dialog takes the built-in default rather than calling your handler again. It is recorded as &amp;lt;code&amp;gt;reentrant-default&amp;lt;/code&amp;gt;, so you can see it happened.&lt;br /&gt;
* '''Errors are contained.''' If your handler raises an error, the built-in default is used, the trace records &amp;lt;code&amp;gt;handler-error-fallback&amp;lt;/code&amp;gt;, and the run continues. A broken handler degrades to the defaults; it does not stop the run and never pops up a dialog of its own about the failure.&lt;br /&gt;
* '''It cannot dirty the model.''' The handler runs with model-dirtying and autosave suppressed, so merely observing a dialog cannot mark the model changed. Note this means a handler is not the place to modify the model.&lt;br /&gt;
* '''The error state is preserved.''' Most of these dialogs occur while an error or warning is pending. That state is saved before your handler runs and restored afterwards, so your handler sees a clean slate and does not disturb the error being reported.&lt;br /&gt;
* '''It is timed.''' The wall-clock time your handler takes is recorded in the trace as &amp;lt;code&amp;gt;handlerMs&amp;lt;/code&amp;gt;, so you can see how much your instrumentation perturbs a benchmark.&lt;br /&gt;
&lt;br /&gt;
== The trace log ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/AutomationTrace:''filename''&amp;lt;/code&amp;gt; writes [https://jsonlines.org JSON Lines] — one self-contained JSON object per line, appended, each written in a single operation so that concurrent processes never interleave a record.&lt;br /&gt;
&lt;br /&gt;
A run starts with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&amp;quot;ev&amp;quot;:&amp;quot;start&amp;quot;,&amp;quot;pid&amp;quot;:66668,&amp;quot;exe&amp;quot;:&amp;quot;...\\Analytica.exe&amp;quot;,&amp;quot;ver&amp;quot;:&amp;quot;7.2.0.318&amp;quot;,&amp;quot;cmdLine&amp;quot;:&amp;quot;...&amp;quot;,&amp;quot;automation&amp;quot;:true,&amp;quot;t&amp;quot;:&amp;quot;2026-08-07T11:29:47.694&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then one record per dialog:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&amp;quot;ev&amp;quot;:&amp;quot;dialog&amp;quot;,&amp;quot;seq&amp;quot;:5,&amp;quot;t&amp;quot;:&amp;quot;2026-08-07T11:29:48.108&amp;quot;,&amp;quot;thread&amp;quot;:80872,&amp;quot;kind&amp;quot;:&amp;quot;MsgBox&amp;quot;,&lt;br /&gt;
 &amp;quot;caption&amp;quot;:&amp;quot;Overwrite?&amp;quot;,&amp;quot;body&amp;quot;:&amp;quot;...&amp;quot;,&amp;quot;buttons&amp;quot;:[&amp;quot;Yes&amp;quot;,&amp;quot;No&amp;quot;],&lt;br /&gt;
 &amp;quot;response&amp;quot;:&amp;quot;No&amp;quot;,&amp;quot;source&amp;quot;:&amp;quot;handler&amp;quot;,&amp;quot;handlerMs&amp;quot;:0.939}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The field to look at first is &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;, which says where the answer came from:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; || The built-in default answered&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;handler&amp;lt;/code&amp;gt; || Your registered handler answered&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;handler-error-fallback&amp;lt;/code&amp;gt; || Your handler raised an error; the default was used and the run continued&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;reentrant-default&amp;lt;/code&amp;gt; || The dialog was raised while your handler was running, so the default was used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;offthread-default&amp;lt;/code&amp;gt; || The dialog was raised off the main thread, so the handler was not consulted&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;shown&amp;lt;/code&amp;gt; || Observe mode: the dialog was actually displayed and this is what the user chose&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Registering a handler also writes a &amp;lt;code&amp;gt;{&amp;quot;ev&amp;quot;:&amp;quot;handlerInstalled&amp;quot;, ...}&amp;lt;/code&amp;gt; record, so you can confirm from the log alone that your library really did get loaded and registered.&lt;br /&gt;
&lt;br /&gt;
Body text is truncated at 4 KB, with &amp;lt;code&amp;gt;&amp;quot;bodyTruncated&amp;quot;:true&amp;lt;/code&amp;gt; added when that happens.&lt;br /&gt;
&lt;br /&gt;
Because the file is appended rather than truncated, a driver can create it, start tailing it, and then launch Analytica — no polling for the file to appear, and no race at startup.&lt;br /&gt;
&lt;br /&gt;
=== Reading the trace back in Analytica ===&lt;br /&gt;
&lt;br /&gt;
The log is ordinary text, so a model can read its own trace:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Var lines := [[SplitText]]( [[ReadTextFile]]('run1.jsonl'), Chr(10) );&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[ParseJSON]]( lines[@Line = 2] )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is handy for a QA model that runs scenarios and then asserts on which dialogs appeared.&lt;br /&gt;
&lt;br /&gt;
== Putting it in a library ==&lt;br /&gt;
&lt;br /&gt;
You will usually want the handler in a library rather than in the model under test, so that the model stays exactly as shipped and the automation is bolted on from outside. Load it with &amp;lt;code&amp;gt;/lib:&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /lib:BenchmarkDriver.ana /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Libraries named with &amp;lt;code&amp;gt;/lib:&amp;lt;/code&amp;gt; load before the model, into &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt;, and stay loaded as models are closed and opened. So a driver library can register its handler once at startup and keep answering dialogs across many models in one session. See the &amp;lt;code&amp;gt;/lib:&amp;lt;/code&amp;gt; entry on [[Analytica Command Line]].&lt;br /&gt;
&lt;br /&gt;
To have the library register itself as it loads, put the [[RegisterAutomationModalHandler]] call in a button in the library and mark that button to evaluate proactively, or call it from the driver's entry point before it opens the first model.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
=== A benchmark driver ===&lt;br /&gt;
&lt;br /&gt;
Everything that makes benchmarks unreliable — a stray dialog stalling one run, a fixture model quietly rewritten between runs, a scenario that silently stops halfway — is what this mode is for.&lt;br /&gt;
&lt;br /&gt;
* Launch each run with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt; and a per-run &amp;lt;code&amp;gt;/AutomationTrace:&amp;lt;/code&amp;gt; file.&lt;br /&gt;
* Let the built-in Save-changes default protect your fixture models. Verify it by checking that the &amp;lt;code&amp;gt;.ana&amp;lt;/code&amp;gt; file's timestamp is unchanged after the run.&lt;br /&gt;
* Have the handler answer &amp;lt;code&amp;gt;FileOpen&amp;lt;/code&amp;gt; with the scenario's input file, so the same model can be run against many datasets without editing it.&lt;br /&gt;
* Treat the trace as part of the result. A run whose trace contains a &amp;lt;code&amp;gt;Warning&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CheckFailure&amp;lt;/code&amp;gt; record did not really succeed, even if it finished.&lt;br /&gt;
* Watch &amp;lt;code&amp;gt;handlerMs&amp;lt;/code&amp;gt; to confirm your instrumentation is not itself distorting the timings.&lt;br /&gt;
&lt;br /&gt;
=== An AI agent, such as Claude Code ===&lt;br /&gt;
&lt;br /&gt;
An agent driving Analytica has the same problem as a benchmark, only worse: it cannot see a modal dialog, and a blocked Analytica just looks like one that stopped responding.&lt;br /&gt;
&lt;br /&gt;
Combine automation mode with the [[MCP server in Analytica]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Analytica.exe /Automation /mcp:6541 /AutomationTrace:C:\Temp\agent.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the agent's tool calls cannot deadlock behind a dialog. Some things worth doing in the handler in this setup:&lt;br /&gt;
&lt;br /&gt;
* '''Make dialogs visible to the agent.''' Write each dialog to a file, or into a model variable, that you expose through an &amp;lt;code&amp;gt;{@mcpTool}&amp;lt;/code&amp;gt; UDF. The agent can then ask &amp;quot;what did Analytica ask me while that ran?&amp;quot; and get a real answer instead of guessing why a call returned nothing.&lt;br /&gt;
* '''Answer according to what the agent is trying to do.''' A handler can read a model variable that the agent set through another tool, and use it to decide — for instance, permitting a save only while an &amp;quot;allow writes&amp;quot; flag is on.&lt;br /&gt;
* '''Ask the orchestrator.''' &amp;lt;code&amp;gt;[[RunConsoleProcess]]&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;block: True&amp;lt;/code&amp;gt; lets the handler call out to a broker process and wait for its answer, so a genuinely ambiguous dialog can be escalated to the agent, or to a person, instead of being defaulted. Keep the timeout on the broker's side.&lt;br /&gt;
* '''Talk to a browser-based driver.''' If the agent is already attached through &amp;lt;code&amp;gt;/remote-debugging-port:&amp;lt;/code&amp;gt;, the handler can call &amp;lt;code&amp;gt;ExecuteJavaScript&amp;lt;/code&amp;gt; on a &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object to signal what just happened. This is fire-and-forget and does not block the run.&lt;br /&gt;
&lt;br /&gt;
=== Automated QA ===&lt;br /&gt;
&lt;br /&gt;
* Drive a scenario with &amp;lt;code&amp;gt;/eval:&amp;lt;/code&amp;gt; to press a button, and let automation answer whatever the button's script raises.&lt;br /&gt;
* Use observe mode first to capture what the dialogs ''should'' be, then assert against that inventory in later runs. A new record appearing in the trace, or an expected one disappearing, is exactly the kind of regression that is otherwise easy to miss.&lt;br /&gt;
* Have the handler answer the specific dialog the test is about with a specific button, and leave everything else on the defaults. That keeps each test's intent obvious.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
* Not every dialog in Analytica is intercepted yet. A number of older dialogs, mostly in OLE linking and a few utility dialogs, are still shown and still block. If you hit one, the trace will show nothing at that point while the process sits there — comparing the trace against a run that finished is the quickest way to spot it. Please report any you find.&lt;br /&gt;
* The handler is only consulted on the main thread. Dialogs from worker threads take the defaults.&lt;br /&gt;
* A handler cannot modify the model; it runs with dirtying suppressed.&lt;br /&gt;
* Automation mode applies to desktop Analytica. The server (ACP) already answers dialogs through its own web mechanism, and ignores &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;/AutomationTrace:&amp;lt;/code&amp;gt; log does work in either.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
* [[Analytica Command Line]]&lt;br /&gt;
* [[RegisterAutomationModalHandler]]&lt;br /&gt;
* [[MCP server in Analytica]]&lt;br /&gt;
* [[Running a model in a command line workflow]]&lt;br /&gt;
* [[MsgBox]]&lt;br /&gt;
* [[AskMsgText]]&lt;br /&gt;
* [[AskMsgNumber]]&lt;br /&gt;
* [[AskMsgChoice]]&lt;br /&gt;
* [[WriteTextFile]]&lt;br /&gt;
* [[RunConsoleProcess]]&lt;br /&gt;
* [[Libraries]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64211</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64211"/>
		<updated>2026-08-07T18:46:50Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22409: document /Automation and /AutomationTrace: (7.2), linking to the new Automation subpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-debugging-port:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on &amp;lt;code&amp;gt;127.0.0.1:«port»&amp;lt;/code&amp;gt;, so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt; page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; function. The Chromium spelling &amp;lt;code&amp;gt;--remote-debugging-port=«port»&amp;lt;/code&amp;gt; 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).&lt;br /&gt;
*: After launch, the process reports the outcome in &amp;lt;code&amp;gt;%LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json&amp;lt;/code&amp;gt;, where «pid» is the process id of the launched Analytica.exe. On success this contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;listening&amp;quot;&amp;lt;/code&amp;gt; and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: While remote debugging is enabled, each page in a CEF window exposes the JavaScript global &amp;lt;code&amp;gt;window.anaCefWindow&amp;lt;/code&amp;gt; with fields &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, identifying which window a DevTools target belongs to. The &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt; matches the handle of the corresponding &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-allow-origins:«origins»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) A comma-separated list of origins (or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;) 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, &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt;) send no Origin header and connect without this option. The Chromium spelling &amp;lt;code&amp;gt;--remote-allow-origins=«origins»&amp;lt;/code&amp;gt; is also accepted.&lt;br /&gt;
}}&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/lib:''filename''&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Loads the Analytica library in ''filename'' into the &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /lib:&amp;quot;W:\Analytica\Libraries\Multivariate Distributions.ana&amp;quot; MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
*: A relative ''filename'' is looked for first in the directory that the process was launched from, then in the directories on the &amp;lt;code&amp;gt;AddLibraryDir&amp;lt;/code&amp;gt; library search path, then in the Analytica installation folder, and finally in the preferences folder. Path substitutions such as &amp;lt;code&amp;gt;%appdata%&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%installdir%&amp;lt;/code&amp;gt; are expanded.&lt;br /&gt;
*: Each library loaded this way is its own namespace. Since &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;: (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]].&lt;br /&gt;
*: 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 &amp;lt;code&amp;gt;/nosplash&amp;lt;/code&amp;gt;.&lt;br /&gt;
*: Some built-in defaults are deliberately conservative so that an unattended run cannot damage the model it is testing. In particular, &amp;quot;Save changes?&amp;quot; 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.&lt;br /&gt;
*: 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]]'''.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /lib:BenchmarkDriver.ana MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/AutomationTrace:''filename''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
*: Used together with &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, this records what automation answered. Used '''without''' &amp;lt;code&amp;gt;/Automation&amp;lt;/code&amp;gt;, 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /Automation /AutomationTrace:C:\Temp\run1.jsonl MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Beta_Tester_Page&amp;diff=64210</id>
		<title>Beta Tester Page</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Beta_Tester_Page&amp;diff=64210"/>
		<updated>2026-08-07T14:16:30Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* How to start beta-testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  [[Category: Beta testing]]&lt;br /&gt;
{{#svarset:betarelease|7.1}}&lt;br /&gt;
{{#svarset:prevrelease|7.0}}&lt;br /&gt;
&lt;br /&gt;
We invite you to be a beta tester of [[Analytica {{#svarget:betarelease}}]] if you have Analytica {{#svarget:prevrelease}} installed on your computer with an active subscription. (Sorry, not [[Analytica Free Edition]] and not a legacy permanent license). A floating license subscription works.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 20px;color:blue;&amp;quot;&amp;gt;We are no longer in beta testing.&amp;lt;/span&amp;gt;&lt;br /&gt;
The beta testing period for [[Analytica {{#svarget:prevrelease}}]] has ended and [[Analytica {{#svarget:betarelease}}]] is now the current release!  Please visit the [https://analytica.com/support-2/analytica-downloads/ Analytica Downloads] page to get the latest installer.--&amp;gt;&lt;br /&gt;
&amp;lt;!--The beta testing period for [[Analytica {{#svarget:betarelease}}]] will start very soon. Please check this page for updates.&lt;br /&gt;
&lt;br /&gt;
When the next release goes into beta testing, this page will be updated.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why become a beta tester? ==&lt;br /&gt;
* Test drive the upcoming release {{#svarget:betarelease}} and start using its [[Analytica {{#svarget:betarelease}}|new features]] immediately.&lt;br /&gt;
* Participate in webinars on tips and guides on new features.&lt;br /&gt;
* Help improve the final release. &lt;br /&gt;
* Check that your models work in the new release. Find any issues while they can still be fixed, ensuring a seamless transition for you and your model users when this release becomes official.&lt;br /&gt;
== As a beta tester, we request that you ==&lt;br /&gt;
* Read [[What's new in Analytica {{#svarget:betarelease}}?]] for an overview of the new features.&lt;br /&gt;
* Sign up as a beta tester by filling in the form when you run the installer.&lt;br /&gt;
* Try out the new Analytica enhancements of interest to you.&lt;br /&gt;
* [[Beta_Tester_Page/Submitting_a_Bug_Report|Submit a bug report]]  if you find an issue&lt;br /&gt;
* Keep up-to-date with the latest beta build.  Analytica will show you an alert whenever there is a new build ready to install, about every 2 weeks.  We may also send you email reminders.   See [[Analytica {{#svarget:betarelease}} beta Release Notes| release notes]] for changes and bug fixes in each beta release.&lt;br /&gt;
* We encourage you to retain Analytica {{#svarget:prevrelease}} when you install Analytica {{#svarget:betarelease}}  beta. That lets you compare their behavior if you suspect a new bug.&lt;br /&gt;
&lt;br /&gt;
== How to start beta-testing ==&lt;br /&gt;
Download the installer for the latest beta build, release number 7.1.11.323, from:&lt;br /&gt;
* [https://downloads.analytica.com/ANA7.1/AnaSetup7_1_11_323.exe Analytica {{#svarget:betarelease}} installer]&lt;br /&gt;
* [https://downloads.analytica.com/ANA7.1/AnaSetup7_1_11_323.exe ADE  {{#svarget:betarelease}} installer]&lt;br /&gt;
These beta builds use your existing {{#svarget:prevrelease}} subscription license that is already on your computer. A separate beta license is not required.&lt;br /&gt;
&lt;br /&gt;
The installers for the current non-beta release can be downloaded directly from the [https://analytica.com/support-2/analytica-downloads/ Analytica Downloads] page.&lt;br /&gt;
&lt;br /&gt;
== Improve Analytica docs ==&lt;br /&gt;
&lt;br /&gt;
During the alpha and beta testing period, we are still updating these Analytica Docs to reflect new features. [[What's new in Analytica {{#svarget:betarelease}}?]] is the most complete listing of new features, and is also a work in progress. As we approach final release date, this information will be more complete.&lt;br /&gt;
&lt;br /&gt;
As an Analytica user, you are invited to contribute to the docs! Since it's on a wiki (using Mediawiki software, just like Wikipedia), you can add or edit any content.  If you find something unclear, incomplete, or just wrong, feel free to fix it yourself. Or add comments, asking someone else to.  And you are welcome to add tips or interesting examples.&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
If you find an issue, please let us know about it at &amp;lt;code&amp;gt;support@lumina.com&amp;lt;/code&amp;gt;. Please see [[/Submitting a Bug Report|Submitting a bug report]] for instructions on reporting bugs.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We list only the most important issues here (ones that might impact your ability to use it, or which are likely to be found and reported multiple times). We maintain a comprehensive bug base in-house, which is not accessible outside of Lumina.&lt;br /&gt;
&lt;br /&gt;
== FAQs: Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
See [[Analytica User FAQs]] for frequently asked questions not specific to {{#svarget:betarelease}} or to beta testing.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64205</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64205"/>
		<updated>2026-08-06T18:34:12Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 21888 - document the /lib: command-line option (7.2, internal options section)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-debugging-port:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on &amp;lt;code&amp;gt;127.0.0.1:«port»&amp;lt;/code&amp;gt;, so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt; page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; function. The Chromium spelling &amp;lt;code&amp;gt;--remote-debugging-port=«port»&amp;lt;/code&amp;gt; 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).&lt;br /&gt;
*: After launch, the process reports the outcome in &amp;lt;code&amp;gt;%LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json&amp;lt;/code&amp;gt;, where «pid» is the process id of the launched Analytica.exe. On success this contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;listening&amp;quot;&amp;lt;/code&amp;gt; and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: While remote debugging is enabled, each page in a CEF window exposes the JavaScript global &amp;lt;code&amp;gt;window.anaCefWindow&amp;lt;/code&amp;gt; with fields &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, identifying which window a DevTools target belongs to. The &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt; matches the handle of the corresponding &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-allow-origins:«origins»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) A comma-separated list of origins (or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;) 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, &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt;) send no Origin header and connect without this option. The Chromium spelling &amp;lt;code&amp;gt;--remote-allow-origins=«origins»&amp;lt;/code&amp;gt; is also accepted.&lt;br /&gt;
}}&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/lib:''filename''&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Loads the Analytica library in ''filename'' into the &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /lib:&amp;quot;W:\Analytica\Libraries\Multivariate Distributions.ana&amp;quot; MyModel.ana&amp;lt;/code&amp;gt;&lt;br /&gt;
*: A relative ''filename'' is looked for first in the directory that the process was launched from, then in the directories on the &amp;lt;code&amp;gt;AddLibraryDir&amp;lt;/code&amp;gt; library search path, then in the Analytica installation folder, and finally in the preferences folder. Path substitutions such as &amp;lt;code&amp;gt;%appdata%&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%installdir%&amp;lt;/code&amp;gt; are expanded.&lt;br /&gt;
*: Each library loaded this way is its own namespace. Since &amp;lt;code&amp;gt;SysLib_Customizations&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
*: 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.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64204</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64204"/>
		<updated>2026-08-06T17:56:27Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Misc. User Interface */ -- Outline window&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI. (these are saved on your local computer, not on our server).&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** '''Create images and node icons''' in your model.&lt;br /&gt;
** '''Read from URLs''' that you explicitly point it to (or drag into the chat)&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
** '''Take you through a tutorial''' of how to use Analytica.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The [[Outline window]] is now docked on the left.&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
* When your model uses a [[Modules_and_Libraries#Filed_Module|filed module]] or [[Modules_and_Libraries#Filed_Module|filed library]], and the source file changes, it auto-detects the change, informs you, and gives you an opportunity to update (reload) to the new version.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64203</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64203"/>
		<updated>2026-08-06T17:54:02Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Misc. User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI. (these are saved on your local computer, not on our server).&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** '''Create images and node icons''' in your model.&lt;br /&gt;
** '''Read from URLs''' that you explicitly point it to (or drag into the chat)&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
** '''Take you through a tutorial''' of how to use Analytica.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
* When your model uses a [[Modules_and_Libraries#Filed_Module|filed module]] or [[Modules_and_Libraries#Filed_Module|filed library]], and the source file changes, it auto-detects the change, informs you, and gives you an opportunity to update (reload) to the new version.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64202</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64202"/>
		<updated>2026-08-06T17:53:33Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Misc. User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI. (these are saved on your local computer, not on our server).&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** '''Create images and node icons''' in your model.&lt;br /&gt;
** '''Read from URLs''' that you explicitly point it to (or drag into the chat)&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
** '''Take you through a tutorial''' of how to use Analytica.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
* When your model uses a [[Modules_and_Libraries#Filed_Module|filed module]] or [[filed library|Modules_and_Libraries#Filed_Module]], and the source file changes, it auto-detects the change, informs you, and gives you an opportunity to update (reload) to the new version.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64201</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64201"/>
		<updated>2026-08-06T17:52:44Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Misc. User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI. (these are saved on your local computer, not on our server).&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** '''Create images and node icons''' in your model.&lt;br /&gt;
** '''Read from URLs''' that you explicitly point it to (or drag into the chat)&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
** '''Take you through a tutorial''' of how to use Analytica.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
* When your model uses a filed module or filed library, and the source file changes, it auto-detects the change, informs you, and gives you an opportunity to update (reload) to the new version.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64200</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64200"/>
		<updated>2026-08-06T17:48:38Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Assista */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI. (these are saved on your local computer, not on our server).&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** '''Create images and node icons''' in your model.&lt;br /&gt;
** '''Read from URLs''' that you explicitly point it to (or drag into the chat)&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
** '''Take you through a tutorial''' of how to use Analytica.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64199</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64199"/>
		<updated>2026-08-06T17:44:40Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Assista */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
** '''Take you through a tutorial''' of how to use Analytica.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.2%3F&amp;diff=64198</id>
		<title>What's new in Analytica 7.2?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.2%3F&amp;diff=64198"/>
		<updated>2026-08-06T15:13:09Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Created page with &amp;quot;Analytica 7.2 is currently under development, and will be a future release of Analytica. The current official release is Analytica 7.0, which Analytica 7.1 currently i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Analytica 7.2 is currently under development, and will be a future release of Analytica. The current official release is [[Analytica 7.0]], which [[Analytica 7.1]] currently in late [[Beta Tester Page|beta testing]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.2.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_7.2&amp;diff=64197</id>
		<title>Analytica 7.2</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_7.2&amp;diff=64197"/>
		<updated>2026-08-06T15:11:54Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Redirected page to What's new in Analytica 7.2?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[What's new in Analytica 7.2?]]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64196</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64196"/>
		<updated>2026-08-06T15:09:50Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: ER 22407: document /remote-debugging-port and /remote-allow-origins (shown for 7.2+ only)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.2|2=|3=&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-debugging-port:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) Exposes the Chrome DevTools protocol (remote debugging) endpoint of Analytica's embedded Chromium (CEF) browser windows on &amp;lt;code&amp;gt;127.0.0.1:«port»&amp;lt;/code&amp;gt;, so that an external tool — a benchmark driver, Claude Code, Puppeteer, or Chrome's &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt; page — can inspect and drive HTML-based windows such as the Assista chat window, HTML dialogs, and windows created with the &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; function. The Chromium spelling &amp;lt;code&amp;gt;--remote-debugging-port=«port»&amp;lt;/code&amp;gt; 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).&lt;br /&gt;
*: After launch, the process reports the outcome in &amp;lt;code&amp;gt;%LOCALAPPDATA%\Lumina\Analytica\CEF\«pid»\RemoteDebug.json&amp;lt;/code&amp;gt;, where «pid» is the process id of the launched Analytica.exe. On success this contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;listening&amp;quot;&amp;lt;/code&amp;gt; and the actual port; when the requested port is already in use by another process, or CEF fails to initialize, it contains &amp;lt;code&amp;gt;&amp;quot;status&amp;quot;:&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
*: While remote debugging is enabled, each page in a CEF window exposes the JavaScript global &amp;lt;code&amp;gt;window.anaCefWindow&amp;lt;/code&amp;gt; with fields &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;kind&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, identifying which window a DevTools target belongs to. The &amp;lt;code&amp;gt;handle&amp;lt;/code&amp;gt; matches the handle of the corresponding &amp;lt;code&amp;gt;CefWindow&amp;lt;/code&amp;gt; object in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/remote-allow-origins:«origins»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.2]]) A comma-separated list of origins (or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;) 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, &amp;lt;code&amp;gt;chrome://inspect&amp;lt;/code&amp;gt;) send no Origin header and connect without this option. The Chromium spelling &amp;lt;code&amp;gt;--remote-allow-origins=«origins»&amp;lt;/code&amp;gt; is also accepted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64195</id>
		<title>Analytica Command Line</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Analytica_Command_Line&amp;diff=64195"/>
		<updated>2026-08-06T15:05:46Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Added the release bar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:File Commands]]&lt;br /&gt;
[[Category:Analytica User Guide]]&lt;br /&gt;
&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
The desktop Analytica.exe process is launched with a command line having the format:&lt;br /&gt;
&lt;br /&gt;
 Analytica.exe [options] [filename]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
Each option can be prefixed either with a forward slash, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, or with a minus, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;. 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. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlmDiag:''filename''&amp;lt;/code&amp;gt;: 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 support@lumina.com 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. &lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /rlmDiag:&amp;quot;c:\Temp\rlmDiag.log&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/roam:''days''&amp;lt;/code&amp;gt;: Specifies the number of days to roam a floating license.  Or, if ''days'' is -1, it releases a roamed license. See [[License Roaming]].&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /roam:7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lic:''licenseName''&amp;lt;/code&amp;gt;: 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 &amp;lt;code&amp;gt;C:\ProgramData\Lumina\Licenses&amp;lt;/code&amp;gt; folder).&lt;br /&gt;
*:Example: &amp;lt;code&amp;gt;Analytica.exe /lic:analytica_optimizer_761_2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/rlm:''server''&amp;lt;/code&amp;gt;: Specifies the server name (or port@serverName) that is running a Reprise License Manager with the desired centrally managed (e.g., floating) license.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/eval:''expression''&amp;lt;/code&amp;gt;: (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. The parameter is ignored if ''filename'' is not specified on the command line.  See [[Running a model in a command line workflow]].&lt;br /&gt;
&lt;br /&gt;
*: Example usage: &amp;lt;code&amp;gt;Analytica.exe /eval:&amp;quot;Claimant=\&amp;quot;JDoe\&amp;quot;;Run_Batch;Exit&amp;quot; &amp;quot;Claim analysis.ana&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*: In this example, &amp;lt;code&amp;gt;Claimant&amp;lt;/code&amp;gt; is the identifier of an input variable in the model and &amp;lt;code&amp;gt;Run_batch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Exit&amp;lt;/code&amp;gt; are names of a buttons in the model.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/comment:''text''&amp;lt;/code&amp;gt;: (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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/NoSplash&amp;lt;/code&amp;gt;: (new to [[Analytica 6.0]]) Don't show the splash screen at startup (which normally displays for 3 seconds). &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/mcp:«port»&amp;lt;/code&amp;gt;: (new to [[Analytica 7.0]]) Enable Analytica as [[MCP server in Analytica|an MCP server]] (a protocol that allows A.I. language models to call functions in your model). [[UDF]]s that contain &amp;lt;code&amp;gt;@mcpTool&amp;lt;/code&amp;gt; in their description are exposed as functions that the external A.I. client can call.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/lang:«code»&amp;lt;/code&amp;gt; (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 &amp;lt;code&amp;gt;'en'&amp;lt;/code&amp;gt; (for English), &amp;lt;code&amp;gt;'es'&amp;lt;/code&amp;gt; (for Spanish), etc. The language is only used when the resource files exist for that language in &lt;br /&gt;
*:&amp;lt;code&amp;gt;«Analytica install folder»\Resources\«code»\&amp;lt;/code&amp;gt;&lt;br /&gt;
*: The command line overrides the registry setting &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; (if present) in the hive&lt;br /&gt;
*:&amp;lt;code&amp;gt;HKCU\Software\Lumina Decision Systems\Analytica&amp;lt;/code&amp;gt;&lt;br /&gt;
*:As of [[Analytica 7.1]], non-English UI options is an experimental feature and not complete. &lt;br /&gt;
&lt;br /&gt;
The remaining options exist for internal purposes and aren't generally used by end-users:&lt;br /&gt;
* &amp;lt;code&amp;gt;/embedding&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/solverDevLic&amp;lt;/code&amp;gt;: This parameter is sometimes used by Analytica developers, but not generally by end-users. It indicates that the licenses from [https://solver.com Frontline Systems] found in the &amp;lt;code&amp;gt;Solver.lic&amp;lt;/code&amp;gt; file are developer licenses rather than runtime licenses. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/forcerelease&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;/config:''filename''&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
&lt;br /&gt;
== Accessing the Command line from a model ==&lt;br /&gt;
&lt;br /&gt;
The expression &amp;lt;code&amp;gt;[[GetProcessInfo]]('Command line')&amp;lt;/code&amp;gt; returns the command line used to launch the process.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Template:ReleaseBar&amp;diff=64194</id>
		<title>Template:ReleaseBar</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Template:ReleaseBar&amp;diff=64194"/>
		<updated>2026-08-06T15:05:13Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Added 7.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#svarset:anarelease|{{#urlget:anarelease|{{#svarget:anarelease|7.0}}}}}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#svarset:show_full|&lt;br /&gt;
  {{#ifexpr: {{#isReleaseBetween:1.0|{{#svarget:anarelease}}|5.9}} |1|}}&lt;br /&gt;
}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#switch:{{#svarget:anarelease}}&lt;br /&gt;
| 4.6 =&lt;br /&gt;
| 5.0 =&lt;br /&gt;
| 5.1 =&lt;br /&gt;
| 5.2 =&lt;br /&gt;
| 5.3 =&lt;br /&gt;
| 5.4 =&lt;br /&gt;
| 6.0 =&lt;br /&gt;
| 6.1 =&lt;br /&gt;
| 6.2 =&lt;br /&gt;
| 6.3 =&lt;br /&gt;
| 6.4 =&lt;br /&gt;
| 6.5 =&lt;br /&gt;
| 6.6 =&lt;br /&gt;
| 7.0 =&lt;br /&gt;
| 7.1 =&lt;br /&gt;
| 7.2 =&lt;br /&gt;
| #default = {{#svarset:anarelease|7.0}}&lt;br /&gt;
}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{|class=&amp;quot;release-table&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
!  Release:&lt;br /&gt;
| &lt;br /&gt;
{{#if: {{#svarget:show_full}}&lt;br /&gt;
| &amp;lt;!-- SHOW COMPLETE LIST --&amp;gt;&lt;br /&gt;
{{ReleaseBarItem|4.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.5|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.2|{{#svarget:anarelease}}}}&lt;br /&gt;
| &amp;lt;!-- COLLAPSED VIEW --&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-rbar&amp;quot; style=&amp;quot;cursor:pointer;&amp;quot;&amp;gt;…&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;mw-customcollapsible-rbar&amp;quot;&lt;br /&gt;
        class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
        style=&amp;quot;display:inline;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;•&amp;amp;nbsp;{{ReleaseBarItem|4.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|5.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;/span&amp;gt;&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.2|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.3|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.4|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.5|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|6.6|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.0|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.1|{{#svarget:anarelease}}}}&amp;amp;nbsp;•&amp;amp;nbsp;&lt;br /&gt;
{{ReleaseBarItem|7.2|{{#svarget:anarelease}}}}&lt;br /&gt;
}}&lt;br /&gt;
|}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#svarset:anamajor|{{#expr:floor{{#svarget:anarelease|7.0}}}}}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To display a release bar at the top of a page, insert the following at the top:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{ReleaseBar}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You must have a Release Bar visible for a &amp;lt;nowiki&amp;gt;{{Release|startVer|endVer|content}}&amp;lt;/nowiki&amp;gt; macro to work properly within the page.&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Assista_-_Analytica_AI_Assistant&amp;diff=64193</id>
		<title>Assista - Analytica AI Assistant</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Assista_-_Analytica_AI_Assistant&amp;diff=64193"/>
		<updated>2026-08-05T21:20:45Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ''New in [[Analytica 6.5]]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[image:assistaLogo.png|alt=|frameless|449x449px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Assista'' is the Analytica AI assistant -- a co-pilot that uses Artificial Intelligence to help you use Analytica and build models.  You interact with Assista via a chat window. It provides help using plain English (and other natural languages). It can see your model and what variable or module you are looking at. It can can perform some tasks in the Analytica UI and make changes or additions to your model. It can also explain Analytica functions and suggest links to Analytica docs.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--The current release is Analytica 6.4. [https://docs.analytica.com/index.php/What%27s_new_in_Analytica_6.5%3F Analytica 6.5] is currently in [[Beta Tester Page|Beta Testing]].  If have have an active subscription license, we invite you to download it now from the [[Beta Tester Page]]. Alternatively, you can try it using the Free edition with 6.5 beta.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are a few examples of questions and requests it can handle:&lt;br /&gt;
* Describe this model  -- ''explains what this model does''&lt;br /&gt;
* How do you change the background color?&lt;br /&gt;
* Change the background to white  -- ''sometimes it can act on the model itself''&lt;br /&gt;
* Show a graph of overall company profits -- ''finds a relevant variable and displays its graph''&lt;br /&gt;
* How is revenue determined? -- ''explains the definition for this variable''&lt;br /&gt;
* Write and fill in its description  -- &amp;quot;it describes the calculation for the currently displayed variable''&lt;br /&gt;
* I don't like that description. I want the description to explain what the definition means -- ''it adds a more useful description''&lt;br /&gt;
* Write a function for Geometric Average-- ''Shows a function to do this, and asks if you want to  create the function in the current module''&lt;br /&gt;
* Yes -- ''Adds the function into your model, including its Description''&lt;br /&gt;
* How do I use the Aggregate function -- ''Describes it with links to Analytica docs pages''&lt;br /&gt;
&lt;br /&gt;
'''Demos:'''&lt;br /&gt;
* See [https://downloads.analytica.com/Videos/AI_Series/AAIA_alpha_demo.mp4 a short demo of Assista responding to these prompts]&lt;br /&gt;
* Watch a demo given at Risk Awareness Year 2024 (RAW2024), &amp;lt;!--[https://2024.riskawarenessweek.com/talks/building-risk-awareness-with-ai-assistants An AI assistant collaboration to develop risk management models]--&amp;gt;[https://youtu.be/H_-Fix4V2o4 An AI assistant collaboration to develop risk management models], 10-Oct-2024.&lt;br /&gt;
* Watch a presentation from SDP 2025, &amp;quot;[https://youtu.be/zxqrTWyUWPk Advancing model-driven decision making through AI assistance], 23-March-2025, Vancouver, BC.&lt;br /&gt;
&lt;br /&gt;
== Inaccuracies ==&lt;br /&gt;
&lt;br /&gt;
Like other AI systems, it makes mistakes and sometimes gives wrong information. Its command of Analytica syntax and functions is not perfect.  But if it leads you astray today, don't give up on it!  We continue to improve it -- in part based on your questions.  Over time, it will become more capable of helping you with all stages of model building and interpreting results.&lt;br /&gt;
&lt;br /&gt;
== Privacy (or lack of) ==&lt;br /&gt;
&lt;br /&gt;
When you use Assista, your questions and some model information are sent to Lumina's servers as well as to OpenAI's servers (also, we may on occasion include Anthropic's, Google's, Cerebras's or SambaNova's LLM servers). We use this information to see how well it's working to improve Assista. We at Lumina take privacy seriously. We will make our best effort to protect this information from any access or use other than to operate and improve Assista. &lt;br /&gt;
&lt;br /&gt;
If you don't use Assista, it sends no information, so you need not worry about this when simply using Analytica.&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&lt;br /&gt;
What can Assista help you with? This section identifies some areas, but these do not fully cover its full scope.&lt;br /&gt;
&lt;br /&gt;
Please ask it for whatever help you need, even if it doesn't match stuff shown here! It may surprise you, but even if it fails, your questions may inform Assista's engineers about what types of capabilities would be useful to focus on.&lt;br /&gt;
&lt;br /&gt;
Assista relies heavily on the documentation attributes (Title, Description, Units) in your model, and on the arrows that you have drawn between variables (even if they aren't yet defined). Keep those populated both for your own benefit, but also to increase the quality of the assistance. You can even ask it to write those descriptions for you.&lt;br /&gt;
&lt;br /&gt;
=== Using Analytica's UI ===&lt;br /&gt;
&lt;br /&gt;
::''How do you ... in Analytica?''&lt;br /&gt;
&lt;br /&gt;
Ask it for the steps required to do something using the Analytica's UI. &lt;br /&gt;
&lt;br /&gt;
Inaccuracies in its steps sometimes occur. But improving this accuracy is our first area of focus.&lt;br /&gt;
&lt;br /&gt;
=== Navigating the Docs ===&lt;br /&gt;
&lt;br /&gt;
The Analytica Docs are extensive. Assista can help you find what you need, even if you don't know the name of a feature or function. It shows &amp;quot;see also&amp;quot; links to relevant Docs pages.&lt;br /&gt;
&lt;br /&gt;
Ask it for a list of functions of a specified type, for example. Or where you can find more information on something.&lt;br /&gt;
&lt;br /&gt;
This general area is our second focus priority. &lt;br /&gt;
&lt;br /&gt;
=== Actions on the model ===&lt;br /&gt;
&lt;br /&gt;
In addition to explaining how to do something in Analytica GUI, Assista can sometimes do it for you!  Some examples:&lt;br /&gt;
&lt;br /&gt;
* Open the graph of X     { or edit table, result table, object window, etc.)&lt;br /&gt;
* Change the color of X to blue&lt;br /&gt;
* Write this description&lt;br /&gt;
* Write this definition.&lt;br /&gt;
* Add a variable to calculate X.&lt;br /&gt;
* ... and more&lt;br /&gt;
&lt;br /&gt;
=== Explaining Analytica concepts ===&lt;br /&gt;
&lt;br /&gt;
Ask it to teach you more about Analytica concepts.&lt;br /&gt;
&lt;br /&gt;
=== Formulating a model ===&lt;br /&gt;
&lt;br /&gt;
Structuring your complex, messy, real world problem as an influence diagram and model that captures the essential elements is a challenging task for human model builders. This is also one of the most exciting use cases for this new technology, especially in a collaborative analyst-assistant partnership. Try experimenting with this. We have found it is often quite helpful -- and sometimes not. &lt;br /&gt;
&lt;br /&gt;
=== Interpreting results ===&lt;br /&gt;
&lt;br /&gt;
How do you interpret results, tables and graphs? How should you act based on the insights? &lt;br /&gt;
&lt;br /&gt;
For now, Assista can't help much.  One reason is that it doesn't yet look directly at the raw numbers or graph images in your results (or edit tables), even though it can see your graphing dimensions (axes, keys) and table pivots.&lt;br /&gt;
&lt;br /&gt;
=== Custom user skills ===&lt;br /&gt;
''New to [[Analytica 7.1]]''&lt;br /&gt;
&lt;br /&gt;
It is possible to configure your own [[Assista_-_Analytica_AI_Assistant/Custom user skills for Assista|custom user skills for Assista]] as a way to expand her abilities or knowledge.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
This list of ideas is by no means complete. If you could use some help while using Analytica, just try asking, even if it doesn't fall into any of these categories. It may give a useful response -- or at least, you may inspire us to extend its capabilities in new directions.&lt;br /&gt;
&lt;br /&gt;
== Disabling Assista ==&lt;br /&gt;
&lt;br /&gt;
If you never open the Assista window, no data is ever sent to the Assista server or to any LLM provider.&lt;br /&gt;
&lt;br /&gt;
(new in [[Analytica 7.1]]) If your company has strict policies that require you to completely disable (i.e., never install) anything that might allow you access to A.I., then you can install Analytica without Assista by running the Analytica installer with the following command-line switch:&lt;br /&gt;
:&amp;lt;code&amp;gt;AnaSetup.exe /NoAssista&amp;lt;/code&amp;gt;&lt;br /&gt;
If you ever want to re-enable it, then re-run the installer without the &amp;lt;code&amp;gt;/NoAssista&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=sC2xMmwy5DE An 8 minute rapid-fire tour (video) showing many of Assista's capabilities.]&lt;br /&gt;
&amp;lt;!-- * [https://downloads.analytica.com/Videos/AI_Series/AAIA_alpha_demo.mp4 A 7 minute (unpolished) demo video]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Assista_-_Analytica_AI_Assistant&amp;diff=64192</id>
		<title>Assista - Analytica AI Assistant</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Assista_-_Analytica_AI_Assistant&amp;diff=64192"/>
		<updated>2026-08-05T21:17:56Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* How Assista works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ''New in [[Analytica 6.5]]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[image:assistaLogo.png|alt=|frameless|449x449px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Assista'' is the Analytica AI assistant -- a co-pilot that uses Artificial Intelligence to help you use Analytica and build models.  You interact with Assista via a chat window. It provides help using plain English (and other natural languages). It can see your model and what variable or module you are looking at. It can can perform some tasks in the Analytica UI and make changes or additions to your model. It can also explain Analytica functions and suggest links to Analytica docs.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--The current release is Analytica 6.4. [https://docs.analytica.com/index.php/What%27s_new_in_Analytica_6.5%3F Analytica 6.5] is currently in [[Beta Tester Page|Beta Testing]].  If have have an active subscription license, we invite you to download it now from the [[Beta Tester Page]]. Alternatively, you can try it using the Free edition with 6.5 beta.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are a few examples of questions and requests it can handle:&lt;br /&gt;
* Describe this model  -- ''explains what this model does''&lt;br /&gt;
* How do you change the background color?&lt;br /&gt;
* Change the background to white  -- ''sometimes it can act on the model itself''&lt;br /&gt;
* Show a graph of overall company profits -- ''finds a relevant variable and displays its graph''&lt;br /&gt;
* How is revenue determined? -- ''explains the definition for this variable''&lt;br /&gt;
* Write and fill in its description  -- &amp;quot;it describes the calculation for the currently displayed variable''&lt;br /&gt;
* I don't like that description. I want the description to explain what the definition means -- ''it adds a more useful description''&lt;br /&gt;
* Write a function for Geometric Average-- ''Shows a function to do this, and asks if you want to  create the function in the current module''&lt;br /&gt;
* Yes -- ''Adds the function into your model, including its Description''&lt;br /&gt;
* How do I use the Aggregate function -- ''Describes it with links to Analytica docs pages''&lt;br /&gt;
&lt;br /&gt;
'''Demos:'''&lt;br /&gt;
* See [https://downloads.analytica.com/Videos/AI_Series/AAIA_alpha_demo.mp4 a short demo of Assista responding to these prompts]&lt;br /&gt;
* Watch a demo given at Risk Awareness Year 2024 (RAW2024), &amp;lt;!--[https://2024.riskawarenessweek.com/talks/building-risk-awareness-with-ai-assistants An AI assistant collaboration to develop risk management models]--&amp;gt;[https://youtu.be/H_-Fix4V2o4 An AI assistant collaboration to develop risk management models], 10-Oct-2024.&lt;br /&gt;
* Watch a presentation from SDP 2025, &amp;quot;[https://youtu.be/zxqrTWyUWPk Advancing model-driven decision making through AI assistance], 23-March-2025, Vancouver, BC.&lt;br /&gt;
&lt;br /&gt;
== Inaccuracies ==&lt;br /&gt;
&lt;br /&gt;
Like other AI systems, it makes mistakes and sometimes gives wrong information. Its command of Analytica syntax and functions is not perfect.  But if it leads you astray today, don't give up on it!  We continue to improve it -- in part based on your questions.  Over time, it will become more capable of helping you with all stages of model building and interpreting results.&lt;br /&gt;
&lt;br /&gt;
== Privacy (or lack of) ==&lt;br /&gt;
&lt;br /&gt;
When you use Assista, your questions and some model information are sent to Lumina's servers as well as to OpenAI's servers (also, we may on occasion include Anthropic's, Google's, Cerebras's or SambaNova's LLM servers). We use this information to see how well it's working to improve Assista. We at Lumina take privacy seriously. We will make our best effort to protect this information from any access or use other than to operate and improve Assista. &lt;br /&gt;
&lt;br /&gt;
If you don't use Assista, it sends no information, so you need not worry about this when simply using Analytica.&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&lt;br /&gt;
What can Assista help you with? This section identifies some areas, but these do not fully cover its full scope.&lt;br /&gt;
&lt;br /&gt;
Please ask it for whatever help you need, even if it doesn't match stuff shown here! It may surprise you, but even if it fails, your questions may inform Assista's engineers about what types of capabilities would be useful to focus on.&lt;br /&gt;
&lt;br /&gt;
Assista relies heavily on the documentation attributes (Title, Description, Units) in your model, and on the arrows that you have drawn between variables (even if they aren't yet defined). Keep those populated both for your own benefit, but also to increase the quality of the assistance. You can even ask it to write those descriptions for you.&lt;br /&gt;
&lt;br /&gt;
=== Using Analytica's UI ===&lt;br /&gt;
&lt;br /&gt;
::''How do you ... in Analytica?''&lt;br /&gt;
&lt;br /&gt;
Ask it for the steps required to do something using the Analytica's UI. &lt;br /&gt;
&lt;br /&gt;
Inaccuracies in its steps sometimes occur. But improving this accuracy is our first area of focus.&lt;br /&gt;
&lt;br /&gt;
=== Navigating the Docs ===&lt;br /&gt;
&lt;br /&gt;
The Analytica Docs are extensive. Assista can help you find what you need, even if you don't know the name of a feature or function. It shows &amp;quot;see also&amp;quot; links to relevant Docs pages.&lt;br /&gt;
&lt;br /&gt;
Ask it for a list of functions of a specified type, for example. Or where you can find more information on something.&lt;br /&gt;
&lt;br /&gt;
This general area is our second focus priority. &lt;br /&gt;
&lt;br /&gt;
=== Actions on the model ===&lt;br /&gt;
&lt;br /&gt;
In addition to explaining how to do something in Analytica GUI, Assista can sometimes do it for you!  Some examples:&lt;br /&gt;
&lt;br /&gt;
* Open the graph of X     { or edit table, result table, object window, etc.)&lt;br /&gt;
* Change the color of X to blue&lt;br /&gt;
* Write this description&lt;br /&gt;
* Write this definition.&lt;br /&gt;
* Add a variable to calculate X.&lt;br /&gt;
* ... and more&lt;br /&gt;
&lt;br /&gt;
=== Explaining Analytica concepts ===&lt;br /&gt;
&lt;br /&gt;
Ask it to teach you more about Analytica concepts.&lt;br /&gt;
&lt;br /&gt;
=== Formulating a model ===&lt;br /&gt;
&lt;br /&gt;
Structuring your complex, messy, real world problem as an influence diagram and model that captures the essential elements is a challenging task for human model builders. This is also one of the most exciting use cases for this new technology, especially in a collaborative analyst-assistant partnership. Try experimenting with this. We have found it is often quite helpful -- and sometimes not. &lt;br /&gt;
&lt;br /&gt;
=== Interpreting results ===&lt;br /&gt;
&lt;br /&gt;
How do you interpret results, tables and graphs? How should you act based on the insights? &lt;br /&gt;
&lt;br /&gt;
For now, Assista can't help much.  One reason is that it doesn't yet look directly at the raw numbers or graph images in your results (or edit tables), even though it can see your graphing dimensions (axes, keys) and table pivots.&lt;br /&gt;
&lt;br /&gt;
=== Custom user skills ===&lt;br /&gt;
''New to [[Analytica 7.1]]''&lt;br /&gt;
&lt;br /&gt;
It is possible to configure your own [[Assista_-_Analytica_AI_Assistant/Custom user skills for Assista|custom user skills for Assista]] as a way to expand her abilities or knowledge.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
This list of ideas is by no means complete. If you could use some help while using Analytica, just try asking, even if it doesn't fall into any of these categories. It may give a useful response -- or at least, you may inspire us to extend its capabilities in new directions.&lt;br /&gt;
&lt;br /&gt;
== Disabling Assista ==&lt;br /&gt;
&lt;br /&gt;
If you never open the Assista window, no data is ever sent to the Assista server or to any LLM provider.&lt;br /&gt;
&lt;br /&gt;
(new in [[Analytica 7.1]]) If your company has strict policies that require you to completely disable (i.e., never install) anything that might allow you access to A.I., then you can install Analytica without Assista by running the Analytica installer with the following command-line switch:&lt;br /&gt;
:&amp;lt;code&amp;gt;AnaSetup.exe /NoAssista&amp;lt;/code&amp;gt;&lt;br /&gt;
If you ever want to re-enable it, then re-run the installer without the &amp;lt;code&amp;gt;/NoAssista&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://downloads.analytica.com/Videos/AI_Series/AAIA_alpha_demo.mp4 A 7 minute (unpolished) demo video]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64188</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64188"/>
		<updated>2026-08-04T15:48:43Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in late-stage [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Beta_Tester_Page&amp;diff=64178</id>
		<title>Beta Tester Page</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Beta_Tester_Page&amp;diff=64178"/>
		<updated>2026-08-01T15:08:53Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* How to start beta-testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  [[Category: Beta testing]]&lt;br /&gt;
{{#svarset:betarelease|7.1}}&lt;br /&gt;
{{#svarset:prevrelease|7.0}}&lt;br /&gt;
&lt;br /&gt;
We invite you to be a beta tester of [[Analytica {{#svarget:betarelease}}]] if you have Analytica {{#svarget:prevrelease}} installed on your computer with an active subscription. (Sorry, not [[Analytica Free Edition]] and not a legacy permanent license). A floating license subscription works.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 20px;color:blue;&amp;quot;&amp;gt;We are no longer in beta testing.&amp;lt;/span&amp;gt;&lt;br /&gt;
The beta testing period for [[Analytica {{#svarget:prevrelease}}]] has ended and [[Analytica {{#svarget:betarelease}}]] is now the current release!  Please visit the [https://analytica.com/support-2/analytica-downloads/ Analytica Downloads] page to get the latest installer.--&amp;gt;&lt;br /&gt;
&amp;lt;!--The beta testing period for [[Analytica {{#svarget:betarelease}}]] will start very soon. Please check this page for updates.&lt;br /&gt;
&lt;br /&gt;
When the next release goes into beta testing, this page will be updated.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why become a beta tester? ==&lt;br /&gt;
* Test drive the upcoming release {{#svarget:betarelease}} and start using its [[Analytica {{#svarget:betarelease}}|new features]] immediately.&lt;br /&gt;
* Participate in webinars on tips and guides on new features.&lt;br /&gt;
* Help improve the final release. &lt;br /&gt;
* Check that your models work in the new release. Find any issues while they can still be fixed, ensuring a seamless transition for you and your model users when this release becomes official.&lt;br /&gt;
== As a beta tester, we request that you ==&lt;br /&gt;
* Read [[What's new in Analytica {{#svarget:betarelease}}?]] for an overview of the new features.&lt;br /&gt;
* Sign up as a beta tester by filling in the form when you run the installer.&lt;br /&gt;
* Try out the new Analytica enhancements of interest to you.&lt;br /&gt;
* [[Beta_Tester_Page/Submitting_a_Bug_Report|Submit a bug report]]  if you find an issue&lt;br /&gt;
* Keep up-to-date with the latest beta build.  Analytica will show you an alert whenever there is a new build ready to install, about every 2 weeks.  We may also send you email reminders.   See [[Analytica {{#svarget:betarelease}} beta Release Notes| release notes]] for changes and bug fixes in each beta release.&lt;br /&gt;
* We encourage you to retain Analytica {{#svarget:prevrelease}} when you install Analytica {{#svarget:betarelease}}  beta. That lets you compare their behavior if you suspect a new bug.&lt;br /&gt;
&lt;br /&gt;
== How to start beta-testing ==&lt;br /&gt;
Download the installer for the latest beta build, release number 7.1.9.321, from:&lt;br /&gt;
* [https://downloads.analytica.com/ANA7.1/AnaSetup7_1_9_321.exe Analytica {{#svarget:betarelease}} installer]&lt;br /&gt;
* [https://downloads.analytica.com/ANA7.1/AnaSetup7_1_9_321.exe ADE  {{#svarget:betarelease}} installer]&lt;br /&gt;
These beta builds use your existing {{#svarget:prevrelease}} subscription license that is already on your computer. A separate beta license is not required.&lt;br /&gt;
&lt;br /&gt;
The installers for the current non-beta release can be downloaded directly from the [https://analytica.com/support-2/analytica-downloads/ Analytica Downloads] page.&lt;br /&gt;
&lt;br /&gt;
== Improve Analytica docs ==&lt;br /&gt;
&lt;br /&gt;
During the alpha and beta testing period, we are still updating these Analytica Docs to reflect new features. [[What's new in Analytica {{#svarget:betarelease}}?]] is the most complete listing of new features, and is also a work in progress. As we approach final release date, this information will be more complete.&lt;br /&gt;
&lt;br /&gt;
As an Analytica user, you are invited to contribute to the docs! Since it's on a wiki (using Mediawiki software, just like Wikipedia), you can add or edit any content.  If you find something unclear, incomplete, or just wrong, feel free to fix it yourself. Or add comments, asking someone else to.  And you are welcome to add tips or interesting examples.&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
If you find an issue, please let us know about it at &amp;lt;code&amp;gt;support@lumina.com&amp;lt;/code&amp;gt;. Please see [[/Submitting a Bug Report|Submitting a bug report]] for instructions on reporting bugs.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We list only the most important issues here (ones that might impact your ability to use it, or which are likely to be found and reported multiple times). We maintain a comprehensive bug base in-house, which is not accessible outside of Lumina.&lt;br /&gt;
&lt;br /&gt;
== FAQs: Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
See [[Analytica User FAQs]] for frequently asked questions not specific to {{#svarget:betarelease}} or to beta testing.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Beta_Tester_Page&amp;diff=64177</id>
		<title>Beta Tester Page</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Beta_Tester_Page&amp;diff=64177"/>
		<updated>2026-08-01T15:08:43Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* How to start beta-testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  [[Category: Beta testing]]&lt;br /&gt;
{{#svarset:betarelease|7.1}}&lt;br /&gt;
{{#svarset:prevrelease|7.0}}&lt;br /&gt;
&lt;br /&gt;
We invite you to be a beta tester of [[Analytica {{#svarget:betarelease}}]] if you have Analytica {{#svarget:prevrelease}} installed on your computer with an active subscription. (Sorry, not [[Analytica Free Edition]] and not a legacy permanent license). A floating license subscription works.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 20px;color:blue;&amp;quot;&amp;gt;We are no longer in beta testing.&amp;lt;/span&amp;gt;&lt;br /&gt;
The beta testing period for [[Analytica {{#svarget:prevrelease}}]] has ended and [[Analytica {{#svarget:betarelease}}]] is now the current release!  Please visit the [https://analytica.com/support-2/analytica-downloads/ Analytica Downloads] page to get the latest installer.--&amp;gt;&lt;br /&gt;
&amp;lt;!--The beta testing period for [[Analytica {{#svarget:betarelease}}]] will start very soon. Please check this page for updates.&lt;br /&gt;
&lt;br /&gt;
When the next release goes into beta testing, this page will be updated.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why become a beta tester? ==&lt;br /&gt;
* Test drive the upcoming release {{#svarget:betarelease}} and start using its [[Analytica {{#svarget:betarelease}}|new features]] immediately.&lt;br /&gt;
* Participate in webinars on tips and guides on new features.&lt;br /&gt;
* Help improve the final release. &lt;br /&gt;
* Check that your models work in the new release. Find any issues while they can still be fixed, ensuring a seamless transition for you and your model users when this release becomes official.&lt;br /&gt;
== As a beta tester, we request that you ==&lt;br /&gt;
* Read [[What's new in Analytica {{#svarget:betarelease}}?]] for an overview of the new features.&lt;br /&gt;
* Sign up as a beta tester by filling in the form when you run the installer.&lt;br /&gt;
* Try out the new Analytica enhancements of interest to you.&lt;br /&gt;
* [[Beta_Tester_Page/Submitting_a_Bug_Report|Submit a bug report]]  if you find an issue&lt;br /&gt;
* Keep up-to-date with the latest beta build.  Analytica will show you an alert whenever there is a new build ready to install, about every 2 weeks.  We may also send you email reminders.   See [[Analytica {{#svarget:betarelease}} beta Release Notes| release notes]] for changes and bug fixes in each beta release.&lt;br /&gt;
* We encourage you to retain Analytica {{#svarget:prevrelease}} when you install Analytica {{#svarget:betarelease}}  beta. That lets you compare their behavior if you suspect a new bug.&lt;br /&gt;
&lt;br /&gt;
== How to start beta-testing ==&lt;br /&gt;
Download the installer for the latest beta build, release number 7.1..321, from:&lt;br /&gt;
* [https://downloads.analytica.com/ANA7.1/AnaSetup7_1_9_321.exe Analytica {{#svarget:betarelease}} installer]&lt;br /&gt;
* [https://downloads.analytica.com/ANA7.1/AnaSetup7_1_9_321.exe ADE  {{#svarget:betarelease}} installer]&lt;br /&gt;
These beta builds use your existing {{#svarget:prevrelease}} subscription license that is already on your computer. A separate beta license is not required.&lt;br /&gt;
&lt;br /&gt;
The installers for the current non-beta release can be downloaded directly from the [https://analytica.com/support-2/analytica-downloads/ Analytica Downloads] page.&lt;br /&gt;
&lt;br /&gt;
== Improve Analytica docs ==&lt;br /&gt;
&lt;br /&gt;
During the alpha and beta testing period, we are still updating these Analytica Docs to reflect new features. [[What's new in Analytica {{#svarget:betarelease}}?]] is the most complete listing of new features, and is also a work in progress. As we approach final release date, this information will be more complete.&lt;br /&gt;
&lt;br /&gt;
As an Analytica user, you are invited to contribute to the docs! Since it's on a wiki (using Mediawiki software, just like Wikipedia), you can add or edit any content.  If you find something unclear, incomplete, or just wrong, feel free to fix it yourself. Or add comments, asking someone else to.  And you are welcome to add tips or interesting examples.&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
If you find an issue, please let us know about it at &amp;lt;code&amp;gt;support@lumina.com&amp;lt;/code&amp;gt;. Please see [[/Submitting a Bug Report|Submitting a bug report]] for instructions on reporting bugs.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We list only the most important issues here (ones that might impact your ability to use it, or which are likely to be found and reported multiple times). We maintain a comprehensive bug base in-house, which is not accessible outside of Lumina.&lt;br /&gt;
&lt;br /&gt;
== FAQs: Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
See [[Analytica User FAQs]] for frequently asked questions not specific to {{#svarget:betarelease}} or to beta testing.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64161</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64161"/>
		<updated>2026-07-30T14:29:01Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Built-in functions */ Evaluate's new parameters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag to throw a parsing error instead of returning [[Null]] when the call to [[Evaluate]] is not inside a [[Try|Try...catch]].&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Evaluate&amp;diff=64160</id>
		<title>Evaluate</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Evaluate&amp;diff=64160"/>
		<updated>2026-07-30T14:25:02Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Document the throwParsingErrors parameter, new to 7.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Evaluation Functions]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
Evaluate(t) is a powerful, but rarely needed function. If t is text, it parses it as an Analytica expression and evaluates it. If t is a handle to a variable, it evaluates and returns its value.&lt;br /&gt;
== Evaluate(t) ==&lt;br /&gt;
&lt;br /&gt;
If parameter «t» is a [[Text values|text value]],  [[Evaluate]](«t») tries to parse «t» as an Analytica [[expression]] (as in the [[definition]] of a Variable), evaluates it, and returns the resulting [[value]]. For example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Evaluate('10 * 10') &amp;amp;rarr; 100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If parameter «t» is a [[Handle]] to a variable, [[Evaluate]](«t») evaluates the variable and returns its value:&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 100&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](A)) &amp;amp;rarr; 100&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You can also use it to evaluate a function passed as an object or handle:&lt;br /&gt;
:&amp;lt;code&amp;gt;Function Add(a, b)  :=  a+b&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](Add), 2, 10) &amp;amp;rarr; 12&amp;lt;/code&amp;gt;&lt;br /&gt;
This can be useful when you  want to define a function that takes a function as a parameter and applies the function in its body. &lt;br /&gt;
See [[#Using Evaluate on a Function]] below.&lt;br /&gt;
&lt;br /&gt;
== Handling errors ==&lt;br /&gt;
As of [[Analytica 6.6]], when an error occurs during the parsing or evaluation of «t» ''and'' the call to [[Evaluate]] appears within a [[Try]], evaluation transfers to the «catch» expression of the [[Try]] without presenting any error message dialog to the user. But this isn't true when the only surrounding (possibly nested) [[Try]]s have «errorNum» filters that do not match the occurring error.&lt;br /&gt;
&lt;br /&gt;
If error is not caught by a [[Try]], then a parsing error silently returns [[Null]] and an evaluation error appears to the user like any other evaluation error, typically terminating the computation.&lt;br /&gt;
&lt;br /&gt;
In [[Analytica 6.5]] and earlier, parsing errors are not caught by a surrounding [[Try]] -- they return Null as if there were no surrounding [[Try]].&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
=== Throwing parsing errors ===&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
Set the optional «throwParsingErrors» parameter to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to make [[Evaluate]] throw a parsing error instead of silently returning [[Null]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( 'Sqrt((' ) &amp;amp;rarr; [[Null]]&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( 'Sqrt((', throwParsingErrors: true ) &amp;amp;rarr;&amp;lt;/code&amp;gt; ''reports the syntax error''&lt;br /&gt;
&lt;br /&gt;
This is useful when the text being evaluated is typed by a user or constructed by code (such as an AI agent), where a silent [[Null]] hides the fact that the text did not parse. Since the error is thrown like any other evaluation error, a surrounding [[Try]] catches it.&lt;br /&gt;
&lt;br /&gt;
The parameter makes no difference when the call to [[Evaluate]] already appears within a [[Try]] that catches the error, since a parsing error is thrown in that case anyway (see above).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Capturing console output ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
To capture the text of everything printed to the console while «t» is evaluated, such as the output of any [[ConsolePrint]]() calls, pass a function that accepts one parameter to the optional «reportOutput» parameter. After the evaluation completes, your function is called with the captured console text:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] consoleText;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] result {{eq}} [[Evaluate]]('ConsolePrint(2 + 2)', reportOutput: (Function(out) ::= (consoleText := out)));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; is the value of the evaluated expression (here &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;), and &amp;lt;code&amp;gt;consoleText&amp;lt;/code&amp;gt; receives the captured console output (here the text &amp;lt;code&amp;gt;&amp;quot;4&amp;quot;&amp;lt;/code&amp;gt; followed by a newline). You can pass any function that accepts one parameter to «reportOutput» -- a local function as shown, or a handle to a user-defined function. Capturing the output does not prevent it from also appearing in the typescript window as it normally does.&lt;br /&gt;
&lt;br /&gt;
«reportOutput» receives only output produced ''during'' this evaluation. If «t» refers to a variable whose value is already cached, the variable is not recomputed, so it produces no console output and the reported text is empty.&lt;br /&gt;
&lt;br /&gt;
If the expression «t» returns multiple values using the &amp;lt;code&amp;gt;_(..)&amp;lt;/code&amp;gt; operator, [[Evaluate]] passes these through to its own caller, so you can capture them in the usual way:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] (a, b) {{eq}} [[Evaluate]](&amp;quot;_(1, 2)&amp;quot;) Do b &amp;amp;rarr; 2&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Limiting evaluation time ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
The optional «maxSeconds» parameter sets an approximate limit, in seconds, on how long the evaluation of «t» may run. «maxSeconds» may be fractional, so &amp;lt;code&amp;gt;maxSeconds: 0.1&amp;lt;/code&amp;gt; limits evaluation to roughly 100&amp;amp;nbsp;milliseconds. The default of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means no time limit.&lt;br /&gt;
&lt;br /&gt;
If the evaluation does not complete within «maxSeconds», it is aborted and [[Evaluate]] throws an error reading ''&amp;quot;Evaluate reached the maximum time limit of N seconds without completing.&amp;quot;'' Because this is an ordinary evaluation error, you can catch it with a surrounding [[Try]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Try]]( [[Evaluate]]('Sum(Sqrt(1..100M))', maxSeconds: 0.5), catch: 'Timed out' )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The timing is approximate -- evaluation stops the next time it checks for interruption -- so the limit adds no measurable overhead to normal evaluation. This makes «maxSeconds» well suited to probing how far a long-running evaluation gets within a time budget, rather than to enforcing a precise deadline.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Controlling warnings ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
Normally, a warning that occurs while «t» is being evaluated is shown to the user, just as it would be during any other evaluation. The optional «ignoreAtFirstWarning» parameter, when &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, silently does what pressing the ''Ignore warnings'' button would do when the first warning occurs: no warning dialog is shown, evaluation continues, and any further warnings during the same call are ignored entirely (so that, for example, a warning that occurs in every cell of a million-cell array does not repeat a million times).&lt;br /&gt;
&lt;br /&gt;
The text of the first warning still goes to the console output, so by also capturing the console output with «reportOutput» (see [[#Capturing console output|Capturing console output]] above) the calling code receives the warning text as feedback:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] warnText;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] result {{eq}} [[Evaluate]]('Sqrt(-1)', ignoreAtFirstWarning: true, reportOutput: (Function(out) ::= (warnText := out)));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;warnText&amp;lt;/code&amp;gt; contains the text ''&amp;quot;Warning: Square root of a negative number.&amp;quot;'' No dialog interrupts the user.&lt;br /&gt;
&lt;br /&gt;
The suppression applies only for the duration of the [[Evaluate]] call -- the previous warning setting is restored when [[Evaluate]] returns, so the user still sees warnings from later evaluations unless they had already silenced them. This parameter is particularly useful when code (such as an AI agent) calls [[Evaluate]] and wants feedback about warnings without showing dialogs to the user.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Limitations of Evaluate(t) ==&lt;br /&gt;
&lt;br /&gt;
There are some subtleties and limitations to Evaluate(«t») when «t» is a text value.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=|2=6.5|3=If text «t» contains a  [[syntax]] error, [[Evaluate]](«t») gives no error message, and returns [[Null]].}}&lt;br /&gt;
&lt;br /&gt;
The context inside the  Evaluate parameter is global, not local. So:&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 100&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable B := ([[Local]] A := 0; [[Evaluate]]('A + 1'))&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B &amp;amp;rarr; 101&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Variable &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; inside &amp;lt;code&amp;gt;Evaluate('A + 1')&amp;lt;/code&amp;gt; refers to the global &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, not the local &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; defined in &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;. More generally:&lt;br /&gt;
&lt;br /&gt;
* [[Evaluate]](t) creates its own context for [[Parsed Expressions|parsing]] «t» (at evaluation time), which is not the context of the expression in which the [[Evaluate]](t) appears  -- e.g., the definition of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; above.&lt;br /&gt;
* So, text «t» cannot refer to [[Local Values|local value]]s, [[index]]es, or [[function parameters]] defined in the context in which the [[Evaluate]](t) function appears.&lt;br /&gt;
* Text «t» may itself define local values and indexes, and refer to them, but these will not be available outside «t».&lt;br /&gt;
* If the text value of «t» refers to a global variable —e.g., &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; in the definition of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; above—these do not appear as Inputs of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;. &lt;br /&gt;
* More generally, Analytica cannot track the dependency of any variable name that appears inside the text. So, for example, any change to &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; will not cause automatic re-evaluation of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;:&lt;br /&gt;
:&amp;lt;code&amp;gt;A := 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B := A + 1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;C := Evaluate('A + 1')&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;A := 5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; changes, Analytica will automatically ensure that &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; is updated, but it has no way of knowing &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; should also be recomputed.&lt;br /&gt;
&lt;br /&gt;
The parameter «t» may itself be an expression that creates a text value to be evaluated by [[Evaluate]]. This text expression appears in the definition of &amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; and is not subject to the above limitations, so, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable V :=([[Local]] x:= ’10’; [[Evaluate]](x &amp;amp; x))&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;V &amp;amp;rarr; 1010&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When to Use ==&lt;br /&gt;
&lt;br /&gt;
The cases in which you should use [[Evaluate]] are rare.  You should be reluctant to use it due to the caveats listed in the previous section. Typical cases when it is useful include:&lt;br /&gt;
* Parsing simple expressions.&lt;br /&gt;
* (advanced) Use in [[Meta-Inference]] algorithms where you are manipulating handles to objects in your model.&lt;br /&gt;
* (rare) Cases where you really do wish to by-pass dependency maintenance.  You want it to compute something the first time the result is requested after the model is first loaded, but not update when parent values are changes.&lt;br /&gt;
&lt;br /&gt;
== Non-text Parameters ==&lt;br /&gt;
&lt;br /&gt;
A non-text value can also be passed to [[Evaluate]], which can be of use in some [[Meta-Inference]] applications.  You need to keep in mind that the parameter to evaluate is evaluated BEFORE the function itself gets it, so evaluating a non-text value is only meaningful when the evaluated parameter is itself something that can still be evaluated.  One instance of this that is often useful is the case of a [[handle]] an object.&lt;br /&gt;
&lt;br /&gt;
For example, suppose &lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 2  + 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable TheVar := [[Handle]](A)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the more general case, you might have a [[Meta-Inference]] algorithm that identifies a single variable object through some computation. Having identified the object, &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; now holds a handle to the object.  You then may want to access values or properties of the object pointed to by &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt;, rather than just values or properties of &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; itself.  Evaluate serves this purpose:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TheVar &amp;amp;rarr; A   { A -- i.e., a handle to the object A }&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](TheVar) &amp;amp;rarr; 5  { evaluates A }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is worth nothing that an alternative method also exists for evaluating a [[handle]].  You can declare a [[LocalAlias]] set to the handle, and then use its identifier as if it were the identifier of the object.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[LocalAlias]] x := TheVar Do x &amp;amp;rarr; 5    { x is an alias for A, so &amp;quot;x&amp;quot; in the body is the value of A }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When accessing attributes of an object in a [[Meta-Inference]] algorithm, where your algorithm has a handle to an object (again, say it is in &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt;), you can access the attribute using e.g.,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Description Of Evaluate(TheVar) &amp;amp;rarr; &amp;quot;Description of A&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Description Of TheVar &amp;amp;rarr; &amp;quot;Description of TheVar&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the result of using &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; alone is shown for comparison).&lt;br /&gt;
&lt;br /&gt;
== Using Evaluate on a Function ==&lt;br /&gt;
&lt;br /&gt;
Given a [[handle]] to a function object, you can use [[Evaluate]] to call the function.  If the function expects ''N'' parameters, you would provide ''N+1'' parameters to [[Evaluate]] -- the first parameter being the handle to the function, and the remaining parameters being the values passed to the function.  Example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] fn := [[If]] opt = 1 [[Then]] [[Handle]]([[Max]]) [[Else]] [[If]] opt = 2 [[Then]] [[Handle]]([[Min]]) [[Else]] [[Handle]]([[Sum]]);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, A, I)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters to the function being called are always passed by position, i.e., you cannot use a named-parameter calling syntax as you might if you were calling the function directly.  &lt;br /&gt;
&lt;br /&gt;
If the function being called contains repeated (or variable number of) parameters, and you need to include a parameter that follows the [[repeated parameter]], then you must place brackets around the repeated parameters.  For example, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; Function Fu1(x; y: repeated; z: optional) := ...&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;amp;nbsp;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, 1, 2, 3, 4) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;Fu1(1, 2, 3, 4)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[2, 3, 4]&amp;lt;/code&amp;gt; are values for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is omitted''&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, 1, [2, 3], 4) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;Fu1(1, 2, 3, y: 4)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[2, 3]&amp;lt;/code&amp;gt; are values for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is 4''.&lt;br /&gt;
&lt;br /&gt;
However, there is a limitation that the first supplied parameter (i.e., the second parameter to [[Evaluate]]) cannot be placed inside brackets.  Likewise, you cannot pass an literal list by specifying the first parameter as a bracketed list.  This is because the repeated-parameter syntax applies equally to [[Evaluate]].  If you specify the first parameter to [[Evaluate]] in brackets, those become the parameters to the function, i.e.,:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](F), [1, 2, 3, 4]) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;F(1, 2, 3, 4)''&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several common built-in functions, including [[Sum]], [[Max]], and [[Min]], allow a variable number of indexes, so that you can use &amp;lt;code&amp;gt;[[Sum]](A, I, J, K)&amp;lt;/code&amp;gt; to sum over 3 dimensions in a single call.  These functions also have [[optional parameter]]s, such as «ignoreNonNumbers», so that if you need to specify these optional parameters, you will need to place brackets around the index(es), even if only one (or zero) index is specified.  For example, the following examples show how to to specify «ignoreNonNumbers» as true to [[Sum]], when summing over a single index, and when summing over the [[implicit dimension]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]]([[Sum]]), A, [I], true)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] x := [3, 2, 'a', 'b', 6] do [[Evaluate]]([[Handle]]([[Sum]]),  x, [], true)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that if you don't need to specify the optional «ignoreNonNumbers» parameter (or any parameters that follow the repeated index parameters), then it is more natural to omit the brackets:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]]([[Sum]]), A, I)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] x := [3, 2, 5, 3, 6] do [[Evaluate]]([[Handle]]([[Sum]]), x)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Release|6.5||&lt;br /&gt;
== Evaluating in a different namespace context ==&lt;br /&gt;
''New to [[Analytica 6.5]]''&lt;br /&gt;
&lt;br /&gt;
Suppose there are two variables that both have the identifier X, but which live in different [[Namespaces]]. Then&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( &amp;quot;X+1&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
would differ depending on where it appears. By default it resolves the identifier &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; from the namespace of the object containing the expression. In some esoteric situations, you may need to interpret the expression from a different namespace context.  You can do this by first obtaining a handle to the other namespace module, or to any object inside that namespace, and passing that handle to the «nsContext» parameter.&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( &amp;quot;X+1&amp;quot;, nsContext: [[Handle]](&amp;quot;NS2&amp;quot;) )&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
* [[EvaluateScript]]&lt;br /&gt;
* [[Proactive Evaluation]]&lt;br /&gt;
* [[Evaluation Modes]]&lt;br /&gt;
* [[Handle]]&lt;br /&gt;
* [[Expression Syntax]]&lt;br /&gt;
* [[Expression Assist]]&lt;br /&gt;
* [[Parsed Expressions]]&lt;br /&gt;
* [[Function calls and parameters]]&lt;br /&gt;
* [[Summary of Programming Constructs]]&lt;br /&gt;
* [[Procedural Programming]]&lt;br /&gt;
* [[Meta-Inference]]{{Release|6.5||&lt;br /&gt;
* [[Namespaces]]}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64159</id>
		<title>What's new in Analytica 7.1?</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=What%27s_new_in_Analytica_7.1%3F&amp;diff=64159"/>
		<updated>2026-07-30T14:07:22Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: /* Built-in functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;!--Analytica 7.1 is currently under development, and will be the next future release of Analytica. The current official release is [[Analytica 7.0]]. This page is under construction, and will list enhancements that are new to Analytica or ADE 7.1.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytica release 7.1 is currently in [[Beta Tester Page|Beta Testing]].  If have have a paid desktop Analytica subscription, we encourage you to try it out from the [[Beta Tester Page]].&lt;br /&gt;
&lt;br /&gt;
== Highlights of Analytica 7.1 ==&lt;br /&gt;
&lt;br /&gt;
'''[[#Assista|Assista]]:''' By far the most important visible improvement is in [[#Assista|Assista]], Analytica's A.I. assistant.  When first released in Analytica 6.5, Assista was already quite useful for explaining Analytica features, describing and documenting models, and building models, but it was a bit unreliable in Analytica syntax and arranging influence diagrams.  We think you will find that the latest Assista is so much improved, including writing Analytica Definitions and drawing influence diagrams. You may start to use chatting with Assista as the primary way you interact with Analytica. &lt;br /&gt;
[[File:Assista What kinds of things can you do.png|alt=Assista dialog screen answering &amp;quot;What kinds of things can you do?&amp;quot;|thumb|600x600px]]&lt;br /&gt;
Other improvements include faster response time, better look and feel, a trace of its thinking, the ability to save and use conversations from previous sessions, ingesting files to provide information, including txt, pdf, csv, xlsx; understanding images and diagrams; a set of skills that you can extend and customize, and more. &lt;br /&gt;
&lt;br /&gt;
'''[[#Engine|Performance]]:'''  Large models start up much faster using multiple processes to parse the definitions. Arrays now use a ''tensor'' representation, similar to AI frameworks like PyTorch and TensorFlow, but with Index labels that support &amp;quot;Intelligent Arrays&amp;quot;. This internal improvement isn't noticeable to users -- but enables major future performance improvements.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spreadsheets|CSV and spreadsheet files]] :'''  You can now import [[#CSV files|CSV files]] simply by dragging them into an diagram or in a command line when you start Analytica. You can create a new [[#spreadsheets |spreadsheet]]  with and add or remove sheets from it.&lt;br /&gt;
&lt;br /&gt;
'''[[#Spanish|Espagnol]]:'''  The user interface now supports Spanish -- with other languages in the future. Assista already supports most languages, and explains features (translating docs) in your language.&lt;br /&gt;
&lt;br /&gt;
== Assista ==&lt;br /&gt;
[[Assista]] is an AI collaborator in Analytica, greatly improved in this release:&lt;br /&gt;
* The '''chat window''' s now a top-level window at the same level as Analytica's main application window.&lt;br /&gt;
** Click the microphone button if you want to speak your request. Click it again when you're done.&lt;br /&gt;
** You can '''move the chat window''' to another location on the screen or even a different screen, to make best user of screen space.&lt;br /&gt;
** Selected objects remain visually selected in the main window as you type into Assista.&lt;br /&gt;
** The window is '''faster and more responsive''', with a new look and feel and clearer formatting of responses.&lt;br /&gt;
** You can '''highlight, drag, and copy any text''' to paste elsewhere.&lt;br /&gt;
** It  displays a stream of &amp;quot;thoughts&amp;quot; while processing your request giving you a peek into what it is doing.&lt;br /&gt;
* On the '''backend,''' Assista has:&lt;br /&gt;
** A new '''processing pipeline''' enabling  faster response and also enabling it work longer on harder tasks. &lt;br /&gt;
** An extensible set of '''competencies (skills)''', including structuring decision models, drawing influence diagrams, designing user interfaces, Analytica syntax, and more.&lt;br /&gt;
** You can create and expose [[Assista_-_Analytica_AI_Assistant/Custom_user_skills_for_Assista|your own custom skills]] to expand capabilities, or ask it to create new skills for you.&lt;br /&gt;
** It '''saves dialogs''', keyed to your model. You can resume a previous session for that model from a dropdown in the UI.&lt;br /&gt;
* Assist can now:&lt;br /&gt;
** '''Ingest documents''' (&amp;lt;code&amp;gt;*.txt, *.pdf, *.md, *.docx, *.xlsx, *.xlsm&amp;lt;/code&amp;gt;) or URLs into the chat using a menu in the Request box, or by dragging and dropping files into the window.  Assista &amp;quot;ingests&amp;quot; the files and can extract data from a doc or image, adding tables to your model, translate a spreadsheet into Analytica, or even implement a model described in the article.&lt;br /&gt;
** ''' &amp;quot;See&amp;quot; images''' in your model -- pictures in nodes, images in table cells, and diagram or graph screenshots.&lt;br /&gt;
** Converse in most common '''languages.''' In Spanish, it can provide UI instructions referring to the Spanish-language UI elements.&lt;br /&gt;
** '''Explain its reasoning''' in previous requests and expand on ideas .&lt;br /&gt;
** '''Personalize tone''', style, level of verbosity and provide custom instructions. To do this, click on the icon in the top-left corner of the Assista window and select Personization.&lt;br /&gt;
** '''Generate reports''' as a downloadable PDF or Word document, which can contain tables, graphs or other images from your model and formatted equations.&lt;br /&gt;
&lt;br /&gt;
== Multi-linguality: Spanish UI ==&lt;br /&gt;
Analytica now comes with a Spanish-language UI, in which its menus, dialogs, error messages and built-in function descriptions are all in Spanish. Also its installer runs with a Spanish-language UI when you are in a Spanish-language region.  Spanish is the default when you are in a Spanish-language region. &lt;br /&gt;
&lt;br /&gt;
You can override the default language by launching Analytica as:&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:es&amp;lt;/code&amp;gt;&lt;br /&gt;
*: or&lt;br /&gt;
* &amp;lt;code&amp;gt;Analytica.exe /lang:en&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set the &amp;lt;code&amp;gt;Language&amp;lt;/code&amp;gt; registry setting in the &amp;lt;code&amp;gt;&amp;quot;HKCU/Software/Lumina Decision Systems/Analytica&amp;quot;&amp;lt;/code&amp;gt; hive to REG_SZ &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for your default if different from your windows region setting.&lt;br /&gt;
&lt;br /&gt;
Some of you may ask &amp;quot;what about my language?&amp;quot;. Stay tuned (and let us know there is a demand for your language). Once our AI translation pipeline is solid, it shouldn't be too hard for us to add more.&lt;br /&gt;
&lt;br /&gt;
== Window appearance ==&lt;br /&gt;
The appearance of the chrome around child MDI windows (aka the &amp;quot;non-client area&amp;quot;) has been changed to more closely match the Windows 11 style of windows -- i.e., thin (1 pixel) borders, rounded corners at the top, white title bar, very plain (text-like) button images in the toolbar.&lt;br /&gt;
&lt;br /&gt;
== CSV files ==&lt;br /&gt;
There are now a few additional ways to open CSV files in Analytica:&lt;br /&gt;
* On the command line: &amp;lt;code&amp;gt;Analytica.exe MyData.csv&amp;lt;/code&amp;gt;&lt;br /&gt;
* Drag and drop a *.csv file onto the diagram (which behaves the same as using &amp;lt;code&amp;gt;File / Import...&amp;lt;/code&amp;gt; on the *.csv file). &lt;br /&gt;
&lt;br /&gt;
== Spreadsheets ==&lt;br /&gt;
* &amp;lt;code&amp;gt;[[SpreadsheetOpen]](&amp;quot;new&amp;quot;)&amp;lt;/code&amp;gt; now creates a blank spreadsheet in memory. Works with both the Excel and LibXl backends.&lt;br /&gt;
* Prefacing a sheet name with + in the call to [[SpreadsheetSetCell]] or [[SpreadsheetSetRange]] will add a new sheet by that name to the workbook (as it applies the specified change to that new worksheet). Works with either backend.&lt;br /&gt;
* You can also now remove a sheet from a workbook using: &amp;lt;code&amp;gt;[[SpreadsheetSetCell]](wb, &amp;quot;-OldSheet&amp;quot;, col, row, Null)&amp;lt;/code&amp;gt;. The «col» and «row» parameters are required but ignored in this case.&lt;br /&gt;
&lt;br /&gt;
== Misc. User Interface ==&lt;br /&gt;
* The Node Icon editor (on the Diagram menu) is far more flexible. You can use it to edit arbitrary node images, with support for color and transparency.&lt;br /&gt;
* Added keyboard shortcuts for '''Set Node Style...''' and '''Set Diagram Style...'''&lt;br /&gt;
* There is a new option, '''Use as default arrow style''', on the right-mouse context menu for an influence diagram arrow. This sets the global arrow style default to match the selected arrow.&lt;br /&gt;
&lt;br /&gt;
== Built-in functions ==&lt;br /&gt;
* New options for [[GetProcessInfo]]: &amp;lt;code&amp;gt;&amp;quot;Number of monitors&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Current monitor work rect&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;Monitor «N» Rect&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;quot;Monitor «N» work rect&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Several new optional parameters to [[Evaluate]].&lt;br /&gt;
** «throwParsingErrors»: Flag&lt;br /&gt;
** «maxSeconds»: Adds a timeout if the evaluation does not complete within the specified time duration.&lt;br /&gt;
** «ignoreAtFirstWarning: Flag used in conjunction with «reportOutput». When set, includes the first warning text in the output reported to the «reportOutput» function, and then ignores additional warnings during the duration of the Evaluate calls (this enables [[Assista]] to see the warnings). &lt;br /&gt;
** «reportOutput»: Accepts a function (usually a [[Local function]]). Calls it with output that was written to the typescript window during the evaluation, including stuff written by [[ConsolePrint]].&lt;br /&gt;
* New optional parameter, «throwParsingErrors», to [[Evaluate]].&lt;br /&gt;
* [[ReadFromURL]] is a bit smarter about returning binary content (like &amp;lt;code&amp;gt;*.zip&amp;lt;/code&amp;gt; files) as a [[In-memory binary data terms|Binary Data Term]].&lt;br /&gt;
* [[MakeJSON]] will automatically encode an image in base64 JSON, and [[ParseJSON]] will automatically decode a base64 representation into an image. Also there is a new «maxCells» parameter that can be used to prevent giagantic arrays from being encoded (resulting in immensely long text).&lt;br /&gt;
* &amp;lt;code&amp;gt;[[GetProcessInfo]](&amp;quot;UI Language&amp;quot;)&amp;lt;/code&amp;gt; returns the UI language, either &amp;lt;code&amp;gt;&amp;quot;en&amp;quot;&amp;lt;/code&amp;gt; (for English) or &amp;lt;code&amp;gt;&amp;quot;es&amp;quot;&amp;lt;/code&amp;gt; for Spanish.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[QualifiedName]]( obj, nsContext )&amp;lt;/code&amp;gt;: Returns the qualified identifier (as text) that uniquely identifies «obj» from the context of «nsContext». &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Namespace]] of X&amp;lt;/code&amp;gt;: A new virtual attribute that returns the namespace of «X».&lt;br /&gt;
* Added a syntax construct for [[Namespaces#Scoped_namespace_inclusion:_Using|Scoped namespace inclusion]] to bring a namespace into scope for only a localized expression or lexical block.&lt;br /&gt;
* File functions ([[ReadTextFile]], [[WriteTextFile]], [[ReadBinaryFile]], [[WriteBinaryFile]], [[ReadImageFile]] and [[WriteImageFile]]) have a new optional parameter, «extensionFilter», where you can specify which extension filters show up on a file selector dialog.&lt;br /&gt;
&lt;br /&gt;
== System variables ==&lt;br /&gt;
* SysVar [[Graph_ColorSequence]]: Replaces [[Graph_ColorSeq]] which is now deprecated. The new sysvar contains a list of color interer with one integer (of the form &amp;lt;code&amp;gt;0x00rrggbb&amp;lt;/code&amp;gt;) per color (the deprecated version used triples of numbers per color).&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
* After loading a large model, it parses expressions in parallel, using multiple threads/cores to parse different variables. On some computers on some models, this can dramatically speed up model load time.&lt;br /&gt;
* Color attributes use color integers for consistently (rather than the legacy number triples for R,G,B).&lt;br /&gt;
* You can use a localized namespace import (for a single expression or single lexical block) with the syntax&lt;br /&gt;
*:&amp;lt;code&amp;gt;[[Using..Do|Using]] NS;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model loading ==&lt;br /&gt;
When opening a model file, the &amp;quot;checking&amp;quot; stage (when attributes are parsed) parses different expressions on different threads, resulting in substantially faster model load times for very large models.&lt;br /&gt;
&lt;br /&gt;
Note: In the event that this creates a problem with your specific model (maybe due to an as-yet-undiscovered multithreading bug), you can disable it for your model as follows:&lt;br /&gt;
# Temporarily turn off multithreading (Skip this step if you are able to load your model)&lt;br /&gt;
## New model&lt;br /&gt;
## &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
## Set to 1  (and remember the previous value)&lt;br /&gt;
# Open your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Disable Multithreaded Evaluations&amp;lt;/b&amp;gt;&lt;br /&gt;
# Press the &amp;lt;code&amp;gt;Edit Table&amp;lt;/code&amp;gt; button.&lt;br /&gt;
# Check the checkbox for &amp;lt;code&amp;gt;Parsing&amp;lt;/code&amp;gt;&lt;br /&gt;
# Save your model&lt;br /&gt;
# &amp;lt;b&amp;gt;Definition menu / System variables / Settings / Maximum evaluation threads&amp;lt;/b&amp;gt;&lt;br /&gt;
#: Restore the original value from Step 1&lt;br /&gt;
&lt;br /&gt;
== MCP server ==&lt;br /&gt;
* Added an ability to install multiple ADE-based Mcp servers that run different ADE releases. For example, you can install two MCP servers into Claude Code:&lt;br /&gt;
* ade-server: Runs ADE 7.1&lt;br /&gt;
* ade-server-70: Runs ADE 7.0&lt;br /&gt;
The information in the &amp;lt;code&amp;gt;«ADE install folder»\Examples\Mcp_server\README.txt&amp;lt;/code&amp;gt; file explain how (with enough info for Claude code to configure this for you).  &lt;br /&gt;
&lt;br /&gt;
With both installed, Claude Code (or other MCP-enabled AI agents) can compare results for the same model across different releases, etc.&lt;br /&gt;
&lt;br /&gt;
Side note: The Mcp server was added to ADE 7.0.&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
This release has undergone massive internal restructuring and refactorization. Ideally (i.e., in the absence of bugs) these changes won't change functionality, but may alter some aspects of behavior, hopefully for the better.&lt;br /&gt;
* Internal data structures use for multi-dimensional arrays has been changed. Possible impacts:&lt;br /&gt;
** Likely to remove the sensitivity to the &amp;quot;canonical order&amp;quot; of indexes on evaluation speed.&lt;br /&gt;
** May change relative evaluation speeds of various functions and operations.&lt;br /&gt;
* Added system modules/namespaces: &amp;lt;code&amp;gt;SysLib_Internal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SysLib_Experimental&amp;lt;/code&amp;gt;. Intended for Analytica-internal use.&lt;br /&gt;
*[[:Category:Cell format functions|Cell formatting functions]] (like [[CellSpan]], [[CellFill]], etc.) are now [[Struct]]s rather than functions. Does not impact usage, other that making it easier for code to traverse resulting data structures.&lt;br /&gt;
&lt;br /&gt;
== Discontinued... ==&lt;br /&gt;
* Plug-in functions. (An old hook that allows you to extend Analytica with compiled functions and UI elements written it C++. We are almost certain no one is using these hooks any more.)&lt;br /&gt;
* The sysvar [[Graph_ColorSeq]] is now deprecated (but works for both reading and setting to preserve backward compatibility). It has been replaced by the system variable [[Graph_ColorSequence]].&lt;br /&gt;
* The built-in (but undocumented, unsupported) &amp;lt;code&amp;gt;ifpos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if0&amp;lt;/code&amp;gt; functions were removed.&lt;br /&gt;
* The legacy (deprecated) syntax &amp;lt;code&amp;gt;Using temp:=... Do&amp;lt;/code&amp;gt; for declaring locals is no longer supported. Legacy models will have such definitions automatically rewritten to use [[Local..Do]] when you load them. [[Using..Do]] now has a different meaning, which is to provide a temporary namespace import.&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Evaluate&amp;diff=64158</id>
		<title>Evaluate</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Evaluate&amp;diff=64158"/>
		<updated>2026-07-30T13:59:39Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Evaluation Functions]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
Evaluate(t) is a powerful, but rarely needed function. If t is text, it parses it as an Analytica expression and evaluates it. If t is a handle to a variable, it evaluates and returns its value.&lt;br /&gt;
== Evaluate(t) ==&lt;br /&gt;
&lt;br /&gt;
If parameter «t» is a [[Text values|text value]],  [[Evaluate]](«t») tries to parse «t» as an Analytica [[expression]] (as in the [[definition]] of a Variable), evaluates it, and returns the resulting [[value]]. For example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Evaluate('10 * 10') &amp;amp;rarr; 100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If parameter «t» is a [[Handle]] to a variable, [[Evaluate]](«t») evaluates the variable and returns its value:&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 100&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](A)) &amp;amp;rarr; 100&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You can also use it to evaluate a function passed as an object or handle:&lt;br /&gt;
:&amp;lt;code&amp;gt;Function Add(a, b)  :=  a+b&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](Add), 2, 10) &amp;amp;rarr; 12&amp;lt;/code&amp;gt;&lt;br /&gt;
This can be useful when you  want to define a function that takes a function as a parameter and applies the function in its body. &lt;br /&gt;
See [[#Using Evaluate on a Function]] below.&lt;br /&gt;
&lt;br /&gt;
== Handling errors ==&lt;br /&gt;
As of [[Analytica 6.6]], when an error occurs during the parsing or evaluation of «t» ''and'' the call to [[Evaluate]] appears within a [[Try]], evaluation transfers to the «catch» expression of the [[Try]] without presenting any error message dialog to the user. But this isn't true when the only surrounding (possibly nested) [[Try]]s have «errorNum» filters that do not match the occurring error.&lt;br /&gt;
&lt;br /&gt;
If error is not caught by a [[Try]], then a parsing error silently returns [[Null]] and an evaluation error appears to the user like any other evaluation error, typically terminating the computation.&lt;br /&gt;
&lt;br /&gt;
In [[Analytica 6.5]] and earlier, parsing errors are not caught by a surrounding [[Try]] -- they return Null as if there were no surrounding [[Try]].&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Capturing console output ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
To capture the text of everything printed to the console while «t» is evaluated, such as the output of any [[ConsolePrint]]() calls, pass a function that accepts one parameter to the optional «reportOutput» parameter. After the evaluation completes, your function is called with the captured console text:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] consoleText;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] result {{eq}} [[Evaluate]]('ConsolePrint(2 + 2)', reportOutput: (Function(out) ::= (consoleText := out)));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; is the value of the evaluated expression (here &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;), and &amp;lt;code&amp;gt;consoleText&amp;lt;/code&amp;gt; receives the captured console output (here the text &amp;lt;code&amp;gt;&amp;quot;4&amp;quot;&amp;lt;/code&amp;gt; followed by a newline). You can pass any function that accepts one parameter to «reportOutput» -- a local function as shown, or a handle to a user-defined function. Capturing the output does not prevent it from also appearing in the typescript window as it normally does.&lt;br /&gt;
&lt;br /&gt;
«reportOutput» receives only output produced ''during'' this evaluation. If «t» refers to a variable whose value is already cached, the variable is not recomputed, so it produces no console output and the reported text is empty.&lt;br /&gt;
&lt;br /&gt;
If the expression «t» returns multiple values using the &amp;lt;code&amp;gt;_(..)&amp;lt;/code&amp;gt; operator, [[Evaluate]] passes these through to its own caller, so you can capture them in the usual way:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] (a, b) {{eq}} [[Evaluate]](&amp;quot;_(1, 2)&amp;quot;) Do b &amp;amp;rarr; 2&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Limiting evaluation time ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
The optional «maxSeconds» parameter sets an approximate limit, in seconds, on how long the evaluation of «t» may run. «maxSeconds» may be fractional, so &amp;lt;code&amp;gt;maxSeconds: 0.1&amp;lt;/code&amp;gt; limits evaluation to roughly 100&amp;amp;nbsp;milliseconds. The default of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means no time limit.&lt;br /&gt;
&lt;br /&gt;
If the evaluation does not complete within «maxSeconds», it is aborted and [[Evaluate]] throws an error reading ''&amp;quot;Evaluate reached the maximum time limit of N seconds without completing.&amp;quot;'' Because this is an ordinary evaluation error, you can catch it with a surrounding [[Try]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Try]]( [[Evaluate]]('Sum(Sqrt(1..100M))', maxSeconds: 0.5), catch: 'Timed out' )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The timing is approximate -- evaluation stops the next time it checks for interruption -- so the limit adds no measurable overhead to normal evaluation. This makes «maxSeconds» well suited to probing how far a long-running evaluation gets within a time budget, rather than to enforcing a precise deadline.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Controlling warnings ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
Normally, a warning that occurs while «t» is being evaluated is shown to the user, just as it would be during any other evaluation. The optional «ignoreAtFirstWarning» parameter, when &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, silently does what pressing the ''Ignore warnings'' button would do when the first warning occurs: no warning dialog is shown, evaluation continues, and any further warnings during the same call are ignored entirely (so that, for example, a warning that occurs in every cell of a million-cell array does not repeat a million times).&lt;br /&gt;
&lt;br /&gt;
The text of the first warning still goes to the console output, so by also capturing the console output with «reportOutput» (see [[#Capturing console output|Capturing console output]] above) the calling code receives the warning text as feedback:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] warnText;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] result {{eq}} [[Evaluate]]('Sqrt(-1)', ignoreAtFirstWarning: true, reportOutput: (Function(out) ::= (warnText := out)));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;warnText&amp;lt;/code&amp;gt; contains the text ''&amp;quot;Warning: Square root of a negative number.&amp;quot;'' No dialog interrupts the user.&lt;br /&gt;
&lt;br /&gt;
The suppression applies only for the duration of the [[Evaluate]] call -- the previous warning setting is restored when [[Evaluate]] returns, so the user still sees warnings from later evaluations unless they had already silenced them. This parameter is particularly useful when code (such as an AI agent) calls [[Evaluate]] and wants feedback about warnings without showing dialogs to the user.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Limitations of Evaluate(t) ==&lt;br /&gt;
&lt;br /&gt;
There are some subtleties and limitations to Evaluate(«t») when «t» is a text value.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=|2=6.5|3=If text «t» contains a  [[syntax]] error, [[Evaluate]](«t») gives no error message, and returns [[Null]].}}&lt;br /&gt;
&lt;br /&gt;
The context inside the  Evaluate parameter is global, not local. So:&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 100&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable B := ([[Local]] A := 0; [[Evaluate]]('A + 1'))&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B &amp;amp;rarr; 101&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Variable &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; inside &amp;lt;code&amp;gt;Evaluate('A + 1')&amp;lt;/code&amp;gt; refers to the global &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, not the local &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; defined in &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;. More generally:&lt;br /&gt;
&lt;br /&gt;
* [[Evaluate]](t) creates its own context for [[Parsed Expressions|parsing]] «t» (at evaluation time), which is not the context of the expression in which the [[Evaluate]](t) appears  -- e.g., the definition of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; above.&lt;br /&gt;
* So, text «t» cannot refer to [[Local Values|local value]]s, [[index]]es, or [[function parameters]] defined in the context in which the [[Evaluate]](t) function appears.&lt;br /&gt;
* Text «t» may itself define local values and indexes, and refer to them, but these will not be available outside «t».&lt;br /&gt;
* If the text value of «t» refers to a global variable —e.g., &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; in the definition of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; above—these do not appear as Inputs of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;. &lt;br /&gt;
* More generally, Analytica cannot track the dependency of any variable name that appears inside the text. So, for example, any change to &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; will not cause automatic re-evaluation of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;:&lt;br /&gt;
:&amp;lt;code&amp;gt;A := 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B := A + 1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;C := Evaluate('A + 1')&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;A := 5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; changes, Analytica will automatically ensure that &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; is updated, but it has no way of knowing &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; should also be recomputed.&lt;br /&gt;
&lt;br /&gt;
The parameter «t» may itself be an expression that creates a text value to be evaluated by [[Evaluate]]. This text expression appears in the definition of &amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; and is not subject to the above limitations, so, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable V :=([[Local]] x:= ’10’; [[Evaluate]](x &amp;amp; x))&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;V &amp;amp;rarr; 1010&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When to Use ==&lt;br /&gt;
&lt;br /&gt;
The cases in which you should use [[Evaluate]] are rare.  You should be reluctant to use it due to the caveats listed in the previous section. Typical cases when it is useful include:&lt;br /&gt;
* Parsing simple expressions.&lt;br /&gt;
* (advanced) Use in [[Meta-Inference]] algorithms where you are manipulating handles to objects in your model.&lt;br /&gt;
* (rare) Cases where you really do wish to by-pass dependency maintenance.  You want it to compute something the first time the result is requested after the model is first loaded, but not update when parent values are changes.&lt;br /&gt;
&lt;br /&gt;
== Non-text Parameters ==&lt;br /&gt;
&lt;br /&gt;
A non-text value can also be passed to [[Evaluate]], which can be of use in some [[Meta-Inference]] applications.  You need to keep in mind that the parameter to evaluate is evaluated BEFORE the function itself gets it, so evaluating a non-text value is only meaningful when the evaluated parameter is itself something that can still be evaluated.  One instance of this that is often useful is the case of a [[handle]] an object.&lt;br /&gt;
&lt;br /&gt;
For example, suppose &lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 2  + 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable TheVar := [[Handle]](A)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the more general case, you might have a [[Meta-Inference]] algorithm that identifies a single variable object through some computation. Having identified the object, &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; now holds a handle to the object.  You then may want to access values or properties of the object pointed to by &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt;, rather than just values or properties of &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; itself.  Evaluate serves this purpose:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TheVar &amp;amp;rarr; A   { A -- i.e., a handle to the object A }&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](TheVar) &amp;amp;rarr; 5  { evaluates A }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is worth nothing that an alternative method also exists for evaluating a [[handle]].  You can declare a [[LocalAlias]] set to the handle, and then use its identifier as if it were the identifier of the object.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[LocalAlias]] x := TheVar Do x &amp;amp;rarr; 5    { x is an alias for A, so &amp;quot;x&amp;quot; in the body is the value of A }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When accessing attributes of an object in a [[Meta-Inference]] algorithm, where your algorithm has a handle to an object (again, say it is in &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt;), you can access the attribute using e.g.,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Description Of Evaluate(TheVar) &amp;amp;rarr; &amp;quot;Description of A&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Description Of TheVar &amp;amp;rarr; &amp;quot;Description of TheVar&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the result of using &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; alone is shown for comparison).&lt;br /&gt;
&lt;br /&gt;
== Using Evaluate on a Function ==&lt;br /&gt;
&lt;br /&gt;
Given a [[handle]] to a function object, you can use [[Evaluate]] to call the function.  If the function expects ''N'' parameters, you would provide ''N+1'' parameters to [[Evaluate]] -- the first parameter being the handle to the function, and the remaining parameters being the values passed to the function.  Example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] fn := [[If]] opt = 1 [[Then]] [[Handle]]([[Max]]) [[Else]] [[If]] opt = 2 [[Then]] [[Handle]]([[Min]]) [[Else]] [[Handle]]([[Sum]]);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, A, I)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters to the function being called are always passed by position, i.e., you cannot use a named-parameter calling syntax as you might if you were calling the function directly.  &lt;br /&gt;
&lt;br /&gt;
If the function being called contains repeated (or variable number of) parameters, and you need to include a parameter that follows the [[repeated parameter]], then you must place brackets around the repeated parameters.  For example, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; Function Fu1(x; y: repeated; z: optional) := ...&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;amp;nbsp;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, 1, 2, 3, 4) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;Fu1(1, 2, 3, 4)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[2, 3, 4]&amp;lt;/code&amp;gt; are values for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is omitted''&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, 1, [2, 3], 4) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;Fu1(1, 2, 3, y: 4)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[2, 3]&amp;lt;/code&amp;gt; are values for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is 4''.&lt;br /&gt;
&lt;br /&gt;
However, there is a limitation that the first supplied parameter (i.e., the second parameter to [[Evaluate]]) cannot be placed inside brackets.  Likewise, you cannot pass an literal list by specifying the first parameter as a bracketed list.  This is because the repeated-parameter syntax applies equally to [[Evaluate]].  If you specify the first parameter to [[Evaluate]] in brackets, those become the parameters to the function, i.e.,:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](F), [1, 2, 3, 4]) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;F(1, 2, 3, 4)''&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several common built-in functions, including [[Sum]], [[Max]], and [[Min]], allow a variable number of indexes, so that you can use &amp;lt;code&amp;gt;[[Sum]](A, I, J, K)&amp;lt;/code&amp;gt; to sum over 3 dimensions in a single call.  These functions also have [[optional parameter]]s, such as «ignoreNonNumbers», so that if you need to specify these optional parameters, you will need to place brackets around the index(es), even if only one (or zero) index is specified.  For example, the following examples show how to to specify «ignoreNonNumbers» as true to [[Sum]], when summing over a single index, and when summing over the [[implicit dimension]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]]([[Sum]]), A, [I], true)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] x := [3, 2, 'a', 'b', 6] do [[Evaluate]]([[Handle]]([[Sum]]),  x, [], true)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that if you don't need to specify the optional «ignoreNonNumbers» parameter (or any parameters that follow the repeated index parameters), then it is more natural to omit the brackets:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]]([[Sum]]), A, I)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] x := [3, 2, 5, 3, 6] do [[Evaluate]]([[Handle]]([[Sum]]), x)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Release|6.5||&lt;br /&gt;
== Evaluating in a different namespace context ==&lt;br /&gt;
''New to [[Analytica 6.5]]''&lt;br /&gt;
&lt;br /&gt;
Suppose there are two variables that both have the identifier X, but which live in different [[Namespaces]]. Then&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( &amp;quot;X+1&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
would differ depending on where it appears. By default it resolves the identifier &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; from the namespace of the object containing the expression. In some esoteric situations, you may need to interpret the expression from a different namespace context.  You can do this by first obtaining a handle to the other namespace module, or to any object inside that namespace, and passing that handle to the «nsContext» parameter.&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( &amp;quot;X+1&amp;quot;, nsContext: [[Handle]](&amp;quot;NS2&amp;quot;) )&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
* [[EvaluateScript]]&lt;br /&gt;
* [[Proactive Evaluation]]&lt;br /&gt;
* [[Evaluation Modes]]&lt;br /&gt;
* [[Handle]]&lt;br /&gt;
* [[Expression Syntax]]&lt;br /&gt;
* [[Expression Assist]]&lt;br /&gt;
* [[Parsed Expressions]]&lt;br /&gt;
* [[Function calls and parameters]]&lt;br /&gt;
* [[Summary of Programming Constructs]]&lt;br /&gt;
* [[Procedural Programming]]&lt;br /&gt;
* [[Meta-Inference]]{{Release|6.5||&lt;br /&gt;
* [[Namespaces]]}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=Evaluate&amp;diff=64157</id>
		<title>Evaluate</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=Evaluate&amp;diff=64157"/>
		<updated>2026-07-30T00:58:46Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Bug 22393: Evaluate() again passes through multiple return values of the evaluated expression; console-output capture moved from 2nd return value to new reportOutput parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Evaluation Functions]]&lt;br /&gt;
{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
Evaluate(t) is a powerful, but rarely needed function. If t is text, it parses it as an Analytica expression and evaluates it. If t is a handle to a variable, it evaluates and returns its value.&lt;br /&gt;
== Evaluate(t) ==&lt;br /&gt;
&lt;br /&gt;
If parameter «t» is a [[Text values|text value]],  [[Evaluate]](«t») tries to parse «t» as an Analytica [[expression]] (as in the [[definition]] of a Variable), evaluates it, and returns the resulting [[value]]. For example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Evaluate('10 * 10') &amp;amp;rarr; 100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If parameter «t» is a [[Handle]] to a variable, [[Evaluate]](«t») evaluates the variable and returns its value:&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 100&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](A)) &amp;amp;rarr; 100&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You can also use it to evaluate a function passed as an object or handle:&lt;br /&gt;
:&amp;lt;code&amp;gt;Function Add(a, b)  :=  a+b&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](Add), 2, 10) &amp;amp;rarr; 12&amp;lt;/code&amp;gt;&lt;br /&gt;
This can be useful when you  want to define a function that takes a function as a parameter and applies the function in its body. &lt;br /&gt;
See [[#Using Evaluate on a Function]] below.&lt;br /&gt;
&lt;br /&gt;
== Handling errors ==&lt;br /&gt;
As of [[Analytica 6.6]], when an error occurs during the parsing or evaluation of «t» ''and'' the call to [[Evaluate]] appears within a [[Try]], evaluation transfers to the «catch» expression of the [[Try]] without presenting any error message dialog to the user. But this isn't true when the only surrounding (possibly nested) [[Try]]s have «errorNum» filters that do not match the occurring error.&lt;br /&gt;
&lt;br /&gt;
If error is not caught by a [[Try]], then a parsing error silently returns [[Null]] and an evaluation error appears to the user like any other evaluation error, typically terminating the computation.&lt;br /&gt;
&lt;br /&gt;
In [[Analytica 6.5]] and earlier, parsing errors are not caught by a surrounding [[Try]] -- they return Null as if there were no surrounding [[Try]].&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Capturing console output ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
To capture the text of everything printed to the console while «t» is evaluated, such as the output of any [[ConsolePrint]]() calls, pass a function that accepts one parameter to the optional «reportOutput» parameter. After the evaluation completes, your function is called with the captured console text:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] consoleText;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] result {{eq}} [[Evaluate]]('ConsolePrint(2 + 2)', reportOutput: (Function(out) ::= (consoleText := out)));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; is the value of the evaluated expression (here &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;), and &amp;lt;code&amp;gt;consoleText&amp;lt;/code&amp;gt; receives the captured console output (here the text &amp;lt;code&amp;gt;&amp;quot;4&amp;quot;&amp;lt;/code&amp;gt; followed by a newline). You can pass any function that accepts one parameter to «reportOutput» -- a local function as shown, or a handle to a user-defined function. Capturing the output does not prevent it from also appearing in the typescript window as it normally does.&lt;br /&gt;
&lt;br /&gt;
«reportOutput» receives only output produced ''during'' this evaluation. If «t» refers to a variable whose value is already cached, the variable is not recomputed, so it produces no console output and the reported text is empty.&lt;br /&gt;
&lt;br /&gt;
If the expression «t» returns multiple values using the &amp;lt;code&amp;gt;_(..)&amp;lt;/code&amp;gt; operator, [[Evaluate]] passes these through to its own caller, so you can capture them in the usual way:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] (a, b) {{eq}} [[Evaluate]](&amp;quot;_(1, 2)&amp;quot;) Do b &amp;amp;rarr; 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(Note: earlier Analytica 7.1 builds instead returned the console output as a second return value from [[Evaluate]]. That interfered with passing through the multiple return values of «t», and was replaced by the «reportOutput» parameter.)''&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Limiting evaluation time ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
The optional «maxSeconds» parameter sets an approximate limit, in seconds, on how long the evaluation of «t» may run. «maxSeconds» may be fractional, so &amp;lt;code&amp;gt;maxSeconds: 0.1&amp;lt;/code&amp;gt; limits evaluation to roughly 100&amp;amp;nbsp;milliseconds. The default of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means no time limit.&lt;br /&gt;
&lt;br /&gt;
If the evaluation does not complete within «maxSeconds», it is aborted and [[Evaluate]] throws an error reading ''&amp;quot;Evaluate reached the maximum time limit of N seconds without completing.&amp;quot;'' Because this is an ordinary evaluation error, you can catch it with a surrounding [[Try]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Try]]( [[Evaluate]]('Sum(Sqrt(1..100M))', maxSeconds: 0.5), catch: 'Timed out' )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The timing is approximate -- evaluation stops the next time it checks for interruption -- so the limit adds no measurable overhead to normal evaluation. This makes «maxSeconds» well suited to probing how far a long-running evaluation gets within a time budget, rather than to enforcing a precise deadline.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Release|1=7.1|2=|3=&lt;br /&gt;
== Controlling warnings ==&lt;br /&gt;
''New to [[Analytica 7.1]].''&lt;br /&gt;
&lt;br /&gt;
Normally, a warning that occurs while «t» is being evaluated is shown to the user, just as it would be during any other evaluation. The optional «ignoreAtFirstWarning» parameter, when &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, silently does what pressing the ''Ignore warnings'' button would do when the first warning occurs: no warning dialog is shown, evaluation continues, and any further warnings during the same call are ignored entirely (so that, for example, a warning that occurs in every cell of a million-cell array does not repeat a million times).&lt;br /&gt;
&lt;br /&gt;
The text of the first warning still goes to the console output, so by also capturing the console output with «reportOutput» (see [[#Capturing console output|Capturing console output]] above) the calling code receives the warning text as feedback:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] warnText;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] result {{eq}} [[Evaluate]]('Sqrt(-1)', ignoreAtFirstWarning: true, reportOutput: (Function(out) ::= (warnText := out)));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;warnText&amp;lt;/code&amp;gt; contains the text ''&amp;quot;Warning: Square root of a negative number.&amp;quot;'' No dialog interrupts the user.&lt;br /&gt;
&lt;br /&gt;
The suppression applies only for the duration of the [[Evaluate]] call -- the previous warning setting is restored when [[Evaluate]] returns, so the user still sees warnings from later evaluations unless they had already silenced them. This parameter is particularly useful when code (such as an AI agent) calls [[Evaluate]] and wants feedback about warnings without showing dialogs to the user.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Limitations of Evaluate(t) ==&lt;br /&gt;
&lt;br /&gt;
There are some subtleties and limitations to Evaluate(«t») when «t» is a text value.&lt;br /&gt;
&lt;br /&gt;
{{Release|1=|2=6.5|3=If text «t» contains a  [[syntax]] error, [[Evaluate]](«t») gives no error message, and returns [[Null]].}}&lt;br /&gt;
&lt;br /&gt;
The context inside the  Evaluate parameter is global, not local. So:&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 100&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable B := ([[Local]] A := 0; [[Evaluate]]('A + 1'))&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B &amp;amp;rarr; 101&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Variable &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; inside &amp;lt;code&amp;gt;Evaluate('A + 1')&amp;lt;/code&amp;gt; refers to the global &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, not the local &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; defined in &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;. More generally:&lt;br /&gt;
&lt;br /&gt;
* [[Evaluate]](t) creates its own context for [[Parsed Expressions|parsing]] «t» (at evaluation time), which is not the context of the expression in which the [[Evaluate]](t) appears  -- e.g., the definition of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; above.&lt;br /&gt;
* So, text «t» cannot refer to [[Local Values|local value]]s, [[index]]es, or [[function parameters]] defined in the context in which the [[Evaluate]](t) function appears.&lt;br /&gt;
* Text «t» may itself define local values and indexes, and refer to them, but these will not be available outside «t».&lt;br /&gt;
* If the text value of «t» refers to a global variable —e.g., &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; in the definition of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; above—these do not appear as Inputs of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;. &lt;br /&gt;
* More generally, Analytica cannot track the dependency of any variable name that appears inside the text. So, for example, any change to &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; will not cause automatic re-evaluation of &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;:&lt;br /&gt;
:&amp;lt;code&amp;gt;A := 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;B := A + 1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;C := Evaluate('A + 1')&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;A := 5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; changes, Analytica will automatically ensure that &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; is updated, but it has no way of knowing &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; should also be recomputed.&lt;br /&gt;
&lt;br /&gt;
The parameter «t» may itself be an expression that creates a text value to be evaluated by [[Evaluate]]. This text expression appears in the definition of &amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; and is not subject to the above limitations, so, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable V :=([[Local]] x:= ’10’; [[Evaluate]](x &amp;amp; x))&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;V &amp;amp;rarr; 1010&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When to Use ==&lt;br /&gt;
&lt;br /&gt;
The cases in which you should use [[Evaluate]] are rare.  You should be reluctant to use it due to the caveats listed in the previous section. Typical cases when it is useful include:&lt;br /&gt;
* Parsing simple expressions.&lt;br /&gt;
* (advanced) Use in [[Meta-Inference]] algorithms where you are manipulating handles to objects in your model.&lt;br /&gt;
* (rare) Cases where you really do wish to by-pass dependency maintenance.  You want it to compute something the first time the result is requested after the model is first loaded, but not update when parent values are changes.&lt;br /&gt;
&lt;br /&gt;
== Non-text Parameters ==&lt;br /&gt;
&lt;br /&gt;
A non-text value can also be passed to [[Evaluate]], which can be of use in some [[Meta-Inference]] applications.  You need to keep in mind that the parameter to evaluate is evaluated BEFORE the function itself gets it, so evaluating a non-text value is only meaningful when the evaluated parameter is itself something that can still be evaluated.  One instance of this that is often useful is the case of a [[handle]] an object.&lt;br /&gt;
&lt;br /&gt;
For example, suppose &lt;br /&gt;
:&amp;lt;code&amp;gt;Variable A := 2  + 3&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Variable TheVar := [[Handle]](A)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the more general case, you might have a [[Meta-Inference]] algorithm that identifies a single variable object through some computation. Having identified the object, &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; now holds a handle to the object.  You then may want to access values or properties of the object pointed to by &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt;, rather than just values or properties of &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; itself.  Evaluate serves this purpose:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TheVar &amp;amp;rarr; A   { A -- i.e., a handle to the object A }&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](TheVar) &amp;amp;rarr; 5  { evaluates A }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is worth nothing that an alternative method also exists for evaluating a [[handle]].  You can declare a [[LocalAlias]] set to the handle, and then use its identifier as if it were the identifier of the object.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[LocalAlias]] x := TheVar Do x &amp;amp;rarr; 5    { x is an alias for A, so &amp;quot;x&amp;quot; in the body is the value of A }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When accessing attributes of an object in a [[Meta-Inference]] algorithm, where your algorithm has a handle to an object (again, say it is in &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt;), you can access the attribute using e.g.,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Description Of Evaluate(TheVar) &amp;amp;rarr; &amp;quot;Description of A&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Description Of TheVar &amp;amp;rarr; &amp;quot;Description of TheVar&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the result of using &amp;lt;code&amp;gt;TheVar&amp;lt;/code&amp;gt; alone is shown for comparison).&lt;br /&gt;
&lt;br /&gt;
== Using Evaluate on a Function ==&lt;br /&gt;
&lt;br /&gt;
Given a [[handle]] to a function object, you can use [[Evaluate]] to call the function.  If the function expects ''N'' parameters, you would provide ''N+1'' parameters to [[Evaluate]] -- the first parameter being the handle to the function, and the remaining parameters being the values passed to the function.  Example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] fn := [[If]] opt = 1 [[Then]] [[Handle]]([[Max]]) [[Else]] [[If]] opt = 2 [[Then]] [[Handle]]([[Min]]) [[Else]] [[Handle]]([[Sum]]);&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, A, I)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters to the function being called are always passed by position, i.e., you cannot use a named-parameter calling syntax as you might if you were calling the function directly.  &lt;br /&gt;
&lt;br /&gt;
If the function being called contains repeated (or variable number of) parameters, and you need to include a parameter that follows the [[repeated parameter]], then you must place brackets around the repeated parameters.  For example, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; Function Fu1(x; y: repeated; z: optional) := ...&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;amp;nbsp;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, 1, 2, 3, 4) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;Fu1(1, 2, 3, 4)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[2, 3, 4]&amp;lt;/code&amp;gt; are values for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is omitted''&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]](fn, 1, [2, 3], 4) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;Fu1(1, 2, 3, y: 4)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;[2, 3]&amp;lt;/code&amp;gt; are values for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is 4''.&lt;br /&gt;
&lt;br /&gt;
However, there is a limitation that the first supplied parameter (i.e., the second parameter to [[Evaluate]]) cannot be placed inside brackets.  Likewise, you cannot pass an literal list by specifying the first parameter as a bracketed list.  This is because the repeated-parameter syntax applies equally to [[Evaluate]].  If you specify the first parameter to [[Evaluate]] in brackets, those become the parameters to the function, i.e.,:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]](F), [1, 2, 3, 4]) &amp;amp;rarr;&amp;lt;/code&amp;gt; &lt;br /&gt;
::''Equivalent to &amp;lt;code&amp;gt;F(1, 2, 3, 4)''&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several common built-in functions, including [[Sum]], [[Max]], and [[Min]], allow a variable number of indexes, so that you can use &amp;lt;code&amp;gt;[[Sum]](A, I, J, K)&amp;lt;/code&amp;gt; to sum over 3 dimensions in a single call.  These functions also have [[optional parameter]]s, such as «ignoreNonNumbers», so that if you need to specify these optional parameters, you will need to place brackets around the index(es), even if only one (or zero) index is specified.  For example, the following examples show how to to specify «ignoreNonNumbers» as true to [[Sum]], when summing over a single index, and when summing over the [[implicit dimension]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]]([[Sum]]), A, [I], true)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] x := [3, 2, 'a', 'b', 6] do [[Evaluate]]([[Handle]]([[Sum]]),  x, [], true)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that if you don't need to specify the optional «ignoreNonNumbers» parameter (or any parameters that follow the repeated index parameters), then it is more natural to omit the brackets:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]([[Handle]]([[Sum]]), A, I)&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Local]] x := [3, 2, 5, 3, 6] do [[Evaluate]]([[Handle]]([[Sum]]), x)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Release|6.5||&lt;br /&gt;
== Evaluating in a different namespace context ==&lt;br /&gt;
''New to [[Analytica 6.5]]''&lt;br /&gt;
&lt;br /&gt;
Suppose there are two variables that both have the identifier X, but which live in different [[Namespaces]]. Then&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( &amp;quot;X+1&amp;quot; )&amp;lt;/code&amp;gt;&lt;br /&gt;
would differ depending on where it appears. By default it resolves the identifier &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; from the namespace of the object containing the expression. In some esoteric situations, you may need to interpret the expression from a different namespace context.  You can do this by first obtaining a handle to the other namespace module, or to any object inside that namespace, and passing that handle to the «nsContext» parameter.&lt;br /&gt;
:&amp;lt;code&amp;gt;[[Evaluate]]( &amp;quot;X+1&amp;quot;, nsContext: [[Handle]](&amp;quot;NS2&amp;quot;) )&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2&amp;quot;&amp;gt;&lt;br /&gt;
* [[EvaluateScript]]&lt;br /&gt;
* [[Proactive Evaluation]]&lt;br /&gt;
* [[Evaluation Modes]]&lt;br /&gt;
* [[Handle]]&lt;br /&gt;
* [[Expression Syntax]]&lt;br /&gt;
* [[Expression Assist]]&lt;br /&gt;
* [[Parsed Expressions]]&lt;br /&gt;
* [[Function calls and parameters]]&lt;br /&gt;
* [[Summary of Programming Constructs]]&lt;br /&gt;
* [[Procedural Programming]]&lt;br /&gt;
* [[Meta-Inference]]{{Release|6.5||&lt;br /&gt;
* [[Namespaces]]}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
	<entry>
		<id>https://docs.analytica.com/index.php?title=AcpStyles&amp;diff=64148</id>
		<title>AcpStyles</title>
		<link rel="alternate" type="text/html" href="https://docs.analytica.com/index.php?title=AcpStyles&amp;diff=64148"/>
		<updated>2026-07-27T23:37:02Z</updated>

		<summary type="html">&lt;p&gt;Lchrisman: Document 14 AcpStyles used by the ACP client but missing from this page: the flex box diagram layout family, show_toolbar, text_inputs_white, Show_row_col_header, row_pivoter_loc, blue_handle_links, acp_large_table_scroll, acp_max_table_size_to_show&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Analytica Cloud Platform]]&lt;br /&gt;
[[Category: Attributes]]&lt;br /&gt;
[[Analytica_Cloud_Player|&amp;lt;&amp;lt;Analytica Cloud Platform ]]&lt;br /&gt;
&lt;br /&gt;
::{{ReleaseBar}}&lt;br /&gt;
&lt;br /&gt;
ACP offers a wide variety of styles and options to control the look and functioning of the user interface. Many of these go beyond what is (currently) available in Desktop Analytica (DTA). &lt;br /&gt;
&lt;br /&gt;
The easiest way to set these styles and options is to use the [[ACP Style Library]], which you can load into your model within ACP from the hamburger menu.  As you change styles in ACP, you can see their effects immediately.  &lt;br /&gt;
&lt;br /&gt;
If you use the [[ACP Style Library]] you don't need to learn about the ACP Styles described below. The only reason to read the rest of this page is if you want to do something esoteric with AcpStyles, or use one of the few AcpStyles not accessible in the [[ACP_Style_Library]]. &lt;br /&gt;
&lt;br /&gt;
You can also load the  [[ACP Style Library]] in Analytica on the desktop from the '''Add Library...' option from the '''File''' menu. But, you won't be able to see the effects until you upload the model into ACP.&lt;br /&gt;
&lt;br /&gt;
The styles and options are specified as keywords and tags in the AcpStyles  attribute. Most styles and options apply to the whole Model and are specified in the AcpStyles attribute of the Model.  When you want to specify special styles for individual modules or variables, you apply them to the ACPStyles attribute of the relevant object.&lt;br /&gt;
 &lt;br /&gt;
The easiest way to view and edit the AcpStyles  attribute in Desktop Analytica is to use the [[Attribute panel]].  Select AcpStyles  from the list of Attributes at the top of that panel. By default, AcpStyles is not shown in the [[Object window]], so you first need to set it to be shown either with the [[Object_Window|right click menu]] in the Object window, or in the [[Manage attributes|Attributes dialog]].  &lt;br /&gt;
&lt;br /&gt;
The AcpStyles  and their flags are not case sensitive.  &lt;br /&gt;
&lt;br /&gt;
When you put multiple flags in a AcpStyles attribute, put each flag on a separate line. &lt;br /&gt;
&lt;br /&gt;
== Model level styles  ==&lt;br /&gt;
&lt;br /&gt;
These styles apply to the entire model. You set them in the AcpStyles attribute for the Main Model. (They have no effect when set for a submodule.)&lt;br /&gt;
&lt;br /&gt;
=== Navigation style  ===&lt;br /&gt;
&lt;br /&gt;
These Navigation_style options control how a user can view and access the module hierarchy:&lt;br /&gt;
* '''&amp;lt;code&amp;gt;Navigation_style: Outline&amp;lt;/code&amp;gt;''' -- Show an expandable tree of modules on the left of the ACP window, similar to the outline view in desktop Analytica (showing only modules not other objects). This is the default style when you upload a model with no ACP styles set or no Acp styles library embedded, or if you have not yet set the Navigation style in the Acp styles library. A navigation flag is not needed for this style, but if you want to explicitly set this style you can add '''&amp;lt;code&amp;gt;Navigation_style: Outline&amp;lt;/code&amp;gt;''' to the top diagram's AcpStyles attribute.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Navigation_style: Top diagram only&amp;lt;/code&amp;gt;''' -- Show only the top diagram, with no Outline and no tabs. This lets you make a simple web application with a single UI page.  &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the next two  'Tabbed application' styles, each module in the main model becomes a tab. The order of the tabs follows the sequence of the module nodes in the main diagram, from  left to right then top to bottom. &lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;Navigation_style: Top_tabs&amp;lt;/code&amp;gt;''' -- The main modules in the top model appear as a row of tabs across the top of the window. Click a tab to show the diagram for that module. &lt;br /&gt;
&amp;lt;!--Remove for now* '''&amp;lt;code&amp;gt;Navigation_style: Two_top_tabs&amp;lt;/code'''&amp;gt; --  The main modules in the top model appear as a row of tabs. The submodules of the module whose tab is selected appear as a second row of tabs. Needs to be used with the style'''&amp;lt;code&amp;gt;show_as_tab: no&amp;lt;/code&amp;gt;'''. --&amp;gt;&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Navigation_style: Side_tabs&amp;lt;/code&amp;gt;''' -- The main modules in the top model appear as a column of tabs on the left of the window. Click a tab to show the diagram for that module.&lt;br /&gt;
&amp;lt;!--Remove for now * '''&amp;lt;code&amp;gt;Navigation_style: Two_side_tabs&amp;lt;/code&amp;gt;'''  -- The top tabs reflect the main modules in the top model. Clicking a top tab shows a a set of subtabs, reflecting the submodules of main module (tab) selected. Needs to be used with the style '''&amp;lt;code&amp;gt;show_as_tab: no&amp;lt;/code&amp;gt;'''.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We describe each in more detail below.&lt;br /&gt;
&lt;br /&gt;
===Outline Tree===&lt;br /&gt;
&lt;br /&gt;
By default, when using the Outline Navigation style, ACP shows an expandable outline tree of modules on the left hand side of the window, similar to the Outline view in Analytica on the desktop. This makes it easy to navigate a model with an extensive hierarchy of modules. &lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_outline: yes&amp;lt;/code&amp;gt;''' -- The default, and unecessary for Outline Navigation style. It is generally redundant with other Navigation styles since the tabs or hierarchy show the same information, and the Outline takes up screen space. But you can add  it to the top diagram's AcpStyles attribute if you want to show the Outline tree with other Navigation styles.&lt;br /&gt;
&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Outline tree 6.0 01.png]]|{{CalloutAnnotation|Market model with&amp;lt;br&amp;gt;Outline Tree|v=80|pt=10,106}}}}&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_outline: no&amp;lt;/code&amp;gt;''' --  When using the Acp Style library this is set by default for Navigation styles other than Outline. For small models, and most web apps, you may want to suppress the Outline view even when using the Outline Navigation style. Do this by inserting this text into the top diagram's AcpStyles attribute (See image below). (If a model has only one diagram,  i.e. with no modules, it never shows the outline tree.)&amp;lt;br/&amp;gt;&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Outline tree 6.0 02.png]]|{{CalloutAnnotation|Market model with &amp;lt;br/&amp;gt;'''&amp;lt;code&amp;gt;show_outline: no&amp;lt;/code&amp;gt;'''|v=80}}}}&lt;br /&gt;
&lt;br /&gt;
===Top Diagram Only===&lt;br /&gt;
&lt;br /&gt;
Set by adding '''&amp;lt;code&amp;gt;navigation_style: top_diagram_only&amp;lt;/code&amp;gt;''' to the AcpStyles attribute of the top diagram. &amp;lt;!--Not to be confused with the AcpStyles flag of similar name: '''&amp;lt;code&amp;gt;top_diagram_only: yes&amp;lt;/code&amp;gt;'''. -This is a navigation style most easily set with the ACP styles library. --&amp;gt; The Styles library will set the flag &amp;lt;!--'''&amp;lt;code&amp;gt;top_diagram_only:yes&amp;lt;/code&amp;gt;''',--&amp;gt; '''&amp;lt;code&amp;gt;show_outline:no&amp;lt;/code&amp;gt;''' .&lt;br /&gt;
&lt;br /&gt;
===Tabbed Module Navigation===&lt;br /&gt;
&lt;br /&gt;
As an alternative to the Outline view, you can set the '''&amp;lt;code&amp;gt;Navigation_style&amp;lt;/code&amp;gt;''' to use use a tabbed interface which is often more convenient and familiar for web applications. By default, the main model appears as the first tab. You can change this with the style [[AcpStyles_Attribute_Values#Exclude_the_top_level_diagram_from_tabs|show_as_tab:no]] described below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace this section with one that does not talk about two tabs for now - until they are implemented in ACP3 - There are four tabbed styles, Top_tabs and Two_top_tabs, with one or two rows of tabs across the top, respectively; and Side_tabs and Two_side_tabs with one or two columns of tabs down the side. Top_tabs works well if you have up to 5 to 8 modules in the main diagram (tabs), depending on the length of their titles and the width of the ACP window.  If you have a lot of modules, or they have long titles, it may be better to use Side_tabs.  If you have too many modules to fit at the top or side, you can use Two_top_tabs or Two_side_tabs. In those cases, you must organize the modules into a two-level hierarchy with logical groupings. &lt;br /&gt;
&lt;br /&gt;
'Top tabs or side tabs.' The first tab displays the top level diagram, and the remaining tabs display the modules present on the top level diagram of the model.  (The modules will not display on the diagram, so you need to tweak your diagram for playing in ACP so that it looks right without these present). The size of the diagram is determined by the size of the top level diagram window when the model was last saved in Analytica.&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;navigation_style: top_tabs&amp;lt;/code&amp;gt;''' This setting instructs ACP to use the 'Tabs across top' navigation style.&lt;br /&gt;
&lt;br /&gt;
:[[File:Top tabs 6.0 01.png]]&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;navigation_style: side_tabs&amp;lt;/code&amp;gt;''' This setting instructs ACP to use the 'Side tabs' navigation style.  Side tabs work better than top tabs when there are more module nodes present.&lt;br /&gt;
&lt;br /&gt;
:[[File:Side tabs 6.0 01.png]]&lt;br /&gt;
* &amp;lt;code&amp;gt;Navigation_style: Two_top_tabs&amp;lt;/code&amp;gt; &lt;br /&gt;
* &amp;lt;code&amp;gt;Navigation_style: Two_side_tabs&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''These 2 Navigation styles replace the style  &amp;lt;code&amp;gt;two_tiers_tabs:yes&amp;lt;/code&amp;gt; which has been deprecated.'''&lt;br /&gt;
&lt;br /&gt;
These styles are useful for modules with several layers of modules and submodules - to reduce the clutter of the top layer of tabs. Modules in the model's top diagram appear as top tabs (left tabs).  Modules within those top level modules appear as subtabs,  the 'second tier'. When you select a top-level tab, it shows its submodules as subtabs. This means that the top level of modules will not show any contents other than their submodules, so the model needs to be designed with this in mind.&lt;br /&gt;
*Currently these 2 styles must be used with the '''&amp;lt;code&amp;gt;show_as_tab: no&amp;lt;/code&amp;gt;''' style set. &amp;lt;!--Coming soon: Compatibility with '''&amp;lt;code&amp;gt;show_as_tab: yes&amp;lt;/code&amp;gt;'''&lt;br /&gt;
*The selected tab appears with the color of the diagram background of it's module&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
There are two tabbed styles, Top_tabs, with a row of tabs across the top; and Side_tabs with a column of tabs down the side. Top_tabs works well if you have up to 5 to 8 modules in the main diagram (tabs), depending on the length of their titles and the width of the ACP window.  If you have a lot of modules, or they have long titles, it may be better to use Side_tabs.  &lt;br /&gt;
&lt;br /&gt;
'Top tabs or side tabs.' The first tab displays the top level diagram, and the remaining tabs display the modules present on the top level diagram of the model.  (The modules will not display on the diagram, so you need to tweak your diagram for playing in ACP so that it looks right without these present). &lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;navigation_style: top_tabs&amp;lt;/code&amp;gt;''' -- This setting instructs ACP to use the 'Tabs across top' navigation style.&lt;br /&gt;
&lt;br /&gt;
[[File:Top tabs 6.0 01.png]]&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;navigation_style: side_tabs&amp;lt;/code&amp;gt;''' -- This setting instructs ACP to use the 'Side tabs' navigation style.  Side tabs work better than top tabs when there are more module nodes present.&lt;br /&gt;
&lt;br /&gt;
[[File:Side tabs 6.0 01.png]]&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Tabs ===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_tabs: no&amp;lt;/code&amp;gt;''' -- By default, with the Outline Navigation style. ACP shows navigation tabs for &amp;quot;Diagram&amp;quot;, &amp;quot;Object&amp;quot;, &amp;quot;Table&amp;quot;, &amp;quot;Graph&amp;quot; along the top. Use this flag to hide those tabs. If you display the model inputs and outputs on the diagram -- using embedded tables and graphs on the diagram -- your users may not need those tabs.  (You can also use '''&amp;lt;code&amp;gt;show_tabs: yes&amp;lt;/code&amp;gt;''' to explicitly show the tabs in Outline and Top diagram only Navigation styles.) &lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_toolbar: no&amp;lt;/code&amp;gt;''' -- A synonym for '''&amp;lt;code&amp;gt;show_tabs: no&amp;lt;/code&amp;gt;'''. Either style hides these tabs, and either one set to '''&amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;''' shows them.&lt;br /&gt;
{{CalloutAnnotationBlock|[[File:Show tabs no 6.0 0.1.png]]|{{CalloutAnnotation|Market model with &amp;lt;br/&amp;gt;'''&amp;lt;code&amp;gt;show_tabs: no&amp;lt;/code&amp;gt;'''|v=80|pt=232,37|path=t!-}}}}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Module hierarchy bar ===&lt;br /&gt;
Using tabbed navigation, ACP shows the model hierarchy in a bar at the top of the diagram by default. The model hierarchy header shows you where you are in a large model by listing the titles of the ancestor modules in which the current diagram is nested.  You can click any ancestor to click up levels in the hierarchy. The Hierarchy Bar takes up much less screen real estate than the Outline Tree. ACP doesn't show the hierarchy bar when you are viewing a top level module, or if the module title is already in the selected tab. &amp;lt;!--With a two-level tab navigation, it shows the hierarchy bar only when viewing a module nested 3 or more levels down. Basically, the hierarchy header does not duplicate what you can see in the tabs.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this setting is not based on a AcpStyles attribute, but rather on the ''Show module hierarchy'' check box in the model [[Preferences]] in Analytica.  If you want to set this preference manually, with the model opened in Analytica, on the [[Edit menu]], select '''Preference...''', and check (or uncheck) the ''Show module hierarchy'' checkbox. &lt;br /&gt;
&lt;br /&gt;
If you are using the ACP styles library, the Styles library will set this to the default setting automatically once you select a Navigation style. But you have the option of changing it if, for instance you want to show the Outline and the Hierarchy bar.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--:[[Image:Acp hh.png]]--&amp;gt;&lt;br /&gt;
===Auto zoom ===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;auto_zoom_diagrams: yes&amp;lt;/code&amp;gt;''' -- ACP automatically zooms the UI to fit the browser window -- the most constraining of width or height so it retains the aspect ratio of the diagram. Works with zoom in and zoom out. Auto Zoom will allow a model to go down to 50% of its size or up to 200% of its size. If the model does not fit at 50% size, the window will show scroll bars. This Acp style has no effect if '''&amp;lt;code&amp;gt;Use_top_diagram_size:Yes &amp;lt;/code&amp;gt;''' is present, you can use only one or the other. You can also set '''&amp;lt;code&amp;gt;auto_zoom_diagrams: no&amp;lt;/code&amp;gt;''' which is the default. (This is a model level setting and is added to the top diagram of a model).&lt;br /&gt;
&lt;br /&gt;
===Customize zoom levels===&lt;br /&gt;
AcpStyles for controlling the max/min zoom when '''&amp;lt;code&amp;gt;auto_zoom_diagram: yes&amp;lt;/code&amp;gt;''' is set. The default if these styles are not set is as above - 50% and 200%. The easiest way to set these is with the [[ACP_Style_Library]] - where the controls are in the Esoteric ACP styles module. This is available from the Hamburger menu in ACP. Note that in order to see this effect, the '''&amp;lt;code&amp;gt;Browser window size&amp;lt;/code&amp;gt;''' needs to have the screen size pulldown menu set to '''&amp;lt;code&amp;gt;Auto zoom&amp;lt;/code&amp;gt;''' as well. &lt;br /&gt;
*'''&amp;lt;code&amp;gt;zoom_min_percent: 75&amp;lt;/code&amp;gt;''' (means that the minimum zoom level will be 75% or .75)&lt;br /&gt;
*'''&amp;lt;code&amp;gt;zoom_max_percent: 125&amp;lt;/code&amp;gt;''' (means the that max zoom level will be 125% or 1.25)&lt;br /&gt;
&lt;br /&gt;
===Use top diagram size for all ACP windows===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Use_top_diagram_size:Yes &amp;lt;/code&amp;gt;''' --  Sets the size of all diagrams based on the size of the diagram window of the top level when the model was last viewed in Desktop Analytica (in non-maximized mode).  '''&amp;lt;code&amp;gt;Use_top_diagram_size:No &amp;lt;/code&amp;gt;''' is the same as if the flag is not set, and is the default  - the ACP diagram will use the entire browser window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Not in ACP3 yet - ER519&lt;br /&gt;
===Display Only a Single Diagram===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;top_diagram_only: yes&amp;lt;/code&amp;gt;''' -- Use this flag if you want to restrict users access to only the top diagram. With this flag, any action that would normally bring up a different diagram will just reload the top diagram.  (If you are using this setting, you will also want to also not display the Outline Tree as explained above, since clicking on the modules in the Outline will have no effect.)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
===Show or hide the Dashboard Title and Model title===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_model_title: no&amp;lt;/code&amp;gt;''' -- Hide the title of the model, which appears by default in the top Teal bar.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_diagram_title: yes&amp;lt;/code&amp;gt;''' --  Use  to show the dashboard title at the top of the diagram. Or &amp;lt;code&amp;gt;show_diagram_title: no&amp;lt;/code&amp;gt; to suppress the diagram title, but not really necessary because ACP does not show the diagram title by default.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
===Hide the Banner and Logo===&lt;br /&gt;
Another flag it's easier to use the [[ACP Style Library]] to set, since it is only compatible with the toolbar tabs hidden. The Styles library changes all the flags at once, and prevents you from entering incompatible combinations.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_banner: no&amp;lt;/code&amp;gt;''' &lt;br /&gt;
::Hides the banner space usually present at the top of ACP. The banner typically contains the Lumina Logo, the '''Parent Diagram''' button, tabs, '''Close Model''' button, and '''Save''' button.&lt;br /&gt;
&lt;br /&gt;
:*This could be useful for customizing the appearance of a model [[Putting_ACP_in_a_Web_Page|embedded in a web page]], for instance.&lt;br /&gt;
:[[File:Banner area 01.PNG]]&lt;br /&gt;
:*If you play a model without the banner area in ACP, there isn't a convenient way to close the model without closing the browser.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Exclude diagram(s) from tabs===&lt;br /&gt;
&lt;br /&gt;
When using tabbed navigation, you can select those modules (from the top model diagram) that you want to appear as a tab in ACP. The default is for all to appear as tabs. You should use the ''Show modules as tabs'' choice menu in the '''&amp;lt;code&amp;gt;ACP Navigation styles&amp;lt;/code&amp;gt;''' section of the [[ACP Style Library]] if you want to set this flag,, and if you also want to hide the modules corresponding to these tabs [[ChangeNodeVisibility|hidden]], so that the model viewer cannot see them.&lt;br /&gt;
&lt;br /&gt;
*Optionally, Enter the text '''&amp;lt;code&amp;gt;Show_as_tab: no&amp;lt;/code&amp;gt;''' in the AcpStyles attribute of the modules you don't wish to show as a tab. The modules themselves will not be hidden with this setting, only the tabs.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_as_tab: no&amp;lt;/code&amp;gt;''' &lt;br /&gt;
::Excludes the top level diagram and just shows the submodules of the top level diagram as tabs. Since the top diagram will not display in ACP, you include the key user interface pages as modules in the main model. Can be used only with 'Top tabs' or 'Side tabs' styles. &lt;br /&gt;
*When setting tabbed Navigation styles using the ACP Styles Library, the default is for the Top level diagram to be included, except with two tiers of tabs, for which it is (Currently) required to exclude the top diagram from the tabs.&lt;br /&gt;
&lt;br /&gt;
If you want to see what it looks like, play this model [[Media:Show as tab no.ana|Array examples]] in ACP, with the '''&amp;lt;code&amp;gt;show_as_tab: no&amp;lt;/code&amp;gt;''' style in the AcpStyles  attribute, and set to tabs along top.&lt;br /&gt;
&lt;br /&gt;
:[[File:Show as tab no02.png]]&lt;br /&gt;
&lt;br /&gt;
*Play this model in ACP and the top level diagram does not show. Rather the diagram for 'Intro to Arrays' shows as the first tab and then the other tabs.'''&lt;br /&gt;
&lt;br /&gt;
:[[File:Show as tab no01.png]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
===Tab color===&lt;br /&gt;
&lt;br /&gt;
When using Tabbed Navigation, you can use these flags to control how the color of the tabs display on your model in ACP. To use, add one of them to the AcpStyles attribute of the top level diagram of your model. They have no effect if added to a module other than the top diagram.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Tab_color: Default &amp;lt;/code&amp;gt;''' The default. Non-selected tabs are bluish white. The selected tab uses the background color for that diagram.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Tab_color: Background &amp;lt;/code&amp;gt;''' All tabs use their diagram background color, whether selected or not&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Tab_color: Node &amp;lt;/code&amp;gt;'''  The selected Tab uses its diagram background color; The other tabs use the color of their Module node (not their diagram background color).  You can use this to change the color of the tabs by modifying their node color in an Analytica functions.&lt;br /&gt;
&lt;br /&gt;
== Model level styles for diagram nodes. ==&lt;br /&gt;
&lt;br /&gt;
These model-level styles affect how all nodes are displayed in diagrams.  &lt;br /&gt;
===Default view for Frame nodes===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Frame_default_view:object&amp;lt;/code&amp;gt;''' Shows the default view as the object view for all frame nodes (until  you click another option e.g. graph or table) . &lt;br /&gt;
*'''&amp;lt;code&amp;gt;Frame_default_view:no&amp;lt;/code&amp;gt;''' The default.&lt;br /&gt;
=== Node shadows and bevels  ===&lt;br /&gt;
&lt;br /&gt;
By default ACP displays nodes without shadows or bevels (for now) , so they look like this:&lt;br /&gt;
:[[Image:Nodes no shadow or bevel.png]] &lt;br /&gt;
&lt;br /&gt;
Set this flag to show a drop shadow behind each node, giving a kind of 3D effect:&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;node_drop_shadow: yes&amp;lt;/code&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
:[[Image:Nodes drop shadow.png]] &lt;br /&gt;
&lt;br /&gt;
Set this flag to display a bevel border for each node, giving another kind of 3-D effect: &lt;br /&gt;
*'''&amp;lt;code&amp;gt;bevel_node_border: yes&amp;lt;/code&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
:[[Image:Nodes beveled border.png]] &lt;br /&gt;
&lt;br /&gt;
===Node hover highlighting===&lt;br /&gt;
&lt;br /&gt;
By default, ACP displays a highlight -- a contrasting light rectangle behind a node -- when you move the cursor over the node:&lt;br /&gt;
&lt;br /&gt;
[[File:acp hover hl.png]]&lt;br /&gt;
&lt;br /&gt;
You can switch it off by setting:&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_hover_highlight: No&amp;lt;/code&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
=== Balloon Help  ===&lt;br /&gt;
&lt;br /&gt;
When you move the cursor over a node, ACP usually shows a &amp;quot;balloon&amp;quot; popup next to the node with the description of the node (if it has one) to help end users understand what its for, or what to enter for a user input. If the node has no description, the [[help balloons|balloon help]] will not appear.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_id_in_balloon: yes&amp;lt;/code&amp;gt;''' Use this flag to show each node's identifier below its title in the balloon -- unless the identifier and title are identical (except for spaces which are replaced by underscores). This flag goes in the AcpStyles of the model and apply to all nodes in the model.&lt;br /&gt;
&amp;lt;!-- not implemented in ACP3 &lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_definition_in_balloon: yes&amp;lt;/code&amp;gt;''' &lt;br /&gt;
::Use this flag to show the node's definition in the balloon below the description.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;!-- not implemented in ACP3 &lt;br /&gt;
*'''&amp;lt;code&amp;gt;hover_balloon_delay&amp;lt;/code&amp;gt;''' &lt;br /&gt;
::When you mouse over a node, there's a short delay of about half a second before it displays the balloon (to prevent wild balloon appearance when you move the cursor rapidly over a diagram.) You can tweak this delay time measured in milliseconds by inserting this flag. E.g. '''&amp;lt;code&amp;gt;hover_balloon_delay: 200&amp;lt;/code&amp;gt;''' to reduce the delay to .2 seconds.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The flags above go in the AcpStyles of the model and apply to all nodes in the model. You can also modify some aspects of the balloon separately for each node by inserting these flags in AcpStyles for each node: --&amp;gt;&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_hover_balloon: no&amp;lt;/code&amp;gt;'''&lt;br /&gt;
::Insert this flag in the AcpStyles for a node, to suppress display of its balloon.&lt;br /&gt;
&amp;lt;!--title no longer shows in the balloon&lt;br /&gt;
*'''&amp;lt;code&amp;gt;show_hover_balloon_title: no&amp;lt;/code&amp;gt;'''&lt;br /&gt;
::Insert this flag in the AcpStyles for a node, to suppress its title in the balloon.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Flex box diagram layout===&lt;br /&gt;
&lt;br /&gt;
By default, ACP places every node at the position it has in the Analytica diagram. As an alternative, you can lay a diagram out as a ''flex box'', in which the nodes flow across the diagram and wrap onto more lines as the browser window changes size. Unlike most of the styles above, you set this on the AcpStyles attribute of the module whose diagram you want laid out this way, so different diagrams in one model can use different layouts.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;display: flex&amp;lt;/code&amp;gt;''' -- Lay this diagram out as a flex box.&lt;br /&gt;
&lt;br /&gt;
Frame nodes, tall form nodes and text nodes become the items of the flex box. ACP does not draw influence arrows on a flex diagram.&lt;br /&gt;
&lt;br /&gt;
These styles adjust the layout. They have no effect unless '''&amp;lt;code&amp;gt;display: flex&amp;lt;/code&amp;gt;''' is also set on the same diagram:&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_direction: row&amp;lt;/code&amp;gt;''' -- The default. Items flow from left to right. Use '''&amp;lt;code&amp;gt;flex_direction: column&amp;lt;/code&amp;gt;''' to make them flow from top to bottom.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_wrap: wrap&amp;lt;/code&amp;gt;''' -- The default. Items wrap onto more lines when they don't fit. Use '''&amp;lt;code&amp;gt;flex_wrap: no_wrap&amp;lt;/code&amp;gt;''' to keep them all on one line.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_h_align: left&amp;lt;/code&amp;gt;''' -- The default. Use '''&amp;lt;code&amp;gt;center&amp;lt;/code&amp;gt;''' or '''&amp;lt;code&amp;gt;right&amp;lt;/code&amp;gt;''' to change the horizontal alignment of the items.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_v_align: top&amp;lt;/code&amp;gt;''' -- The default. Use '''&amp;lt;code&amp;gt;center&amp;lt;/code&amp;gt;''' or '''&amp;lt;code&amp;gt;bottom&amp;lt;/code&amp;gt;''' to change the vertical alignment of the items.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_gap: n&amp;lt;/code&amp;gt;''' -- The spacing around each item. ACP divides ''n'' by four to get the margin and the padding in pixels, so the default of 16 gives four pixels of each. Set this one on the top model rather than on the individual diagram.&lt;br /&gt;
&lt;br /&gt;
You can include or exclude an individual node by setting this style in the AcpStyles attribute of that node:&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_box_item: yes&amp;lt;/code&amp;gt;''' -- Make this node an item of the flex box even though it would not otherwise be one.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;flex_box_item: no&amp;lt;/code&amp;gt;''' -- Keep this node out of the flex box.&lt;br /&gt;
&lt;br /&gt;
===Background of text input boxes===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;text_inputs_white: no&amp;lt;/code&amp;gt;''' -- The box for typing into a text input node takes the background color of the node it sits on. By default, '''&amp;lt;code&amp;gt;text_inputs_white: yes&amp;lt;/code&amp;gt;''', the box is white.&lt;br /&gt;
&lt;br /&gt;
==ACP styles inheritance==&lt;br /&gt;
This is the order of inheritance for Acpstyles below that apply to tables and graphs. Styles at a higher level take precedence over the lower precedence styles. (Inheritance doesn't apply to the ACPstyles described above tbecause they work only at the Model level.)&lt;br /&gt;
# '''Variable''' (includes Tall nodes): Acpstyles applied to an individual variable will take precedence over all other styles. A variable with a style of &amp;lt;code&amp;gt;show_title:no&amp;lt;/code&amp;gt; will not show the title, even if the model level style is &amp;lt;code&amp;gt;show_title:yes&amp;lt;/code&amp;gt;, and if that node shows it's result in a frame node the variable style will override the frame node style.&lt;br /&gt;
# '''Frame''' : An Acpstyle set for a frame node will affect any variable shown in that frame that doesn't have its own settings. These will also override any styles at the model level.&lt;br /&gt;
# '''Model ACP style defaults''': Acpstyles that you can enter into the Acptyles attribute of the top diagram of your model. These will override the ACP defaults, and will be inherited by frame nodes and variables in the model that don't have their own Acpstyle.&lt;br /&gt;
# '''ACP style defaults for ACP''': The default style ACP uses if you have no specific setting for that style. Eg for show_index_menus the default is fly-in and that is what will show if you don't enter a different show_index_menus: Acpstyle flag in the Acpstyle for the top diagram (model level) or for frame nodes or variables.&lt;br /&gt;
&lt;br /&gt;
==ACP Styles for tables and graphs==&lt;br /&gt;
&lt;br /&gt;
These styles affect how result graphs and tables are displayed in ACP, including in [[Embed_table_or_graph_with_ACP#Frame_nodes|Tall nodes]] and [[Embed_table_or_graph_with_ACP#Tall_nodes|˞Frame nodes]]. They provide options not (yet) available in Desktop Analytica. ACP has default settings for these. You can override these settings for the entire model. You can also set them for [[Embed_table_or_graph_with_ACP#Frame_nodes|˞Frame nodes]], which will apply to all results shown in the Frame and override the ACP and model level settings. And you can set these styles for individual variables, which will override any settings in the Model or Frame. As always, it's easiest to set the using the [[ACP Style Library]]. &lt;br /&gt;
&lt;br /&gt;
None of these styles apply to tab result views using the default Navigation_style: Outline.&lt;br /&gt;
&lt;br /&gt;
===Show or hide the Description===&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_description: n&amp;lt;/code&amp;gt;''' If &amp;lt;code&amp;gt;n &amp;gt; 0 &amp;lt;/code&amp;gt; it shows the Description of the variable above the table or graph using up to n% of the vertical space available. If that's not big enough to show the entire description, it shows a vertical scroll bar. Iif you don't want to show the description at all, set &amp;lt;code&amp;gt;n = 0&amp;lt;/code&amp;gt;. Default if not mentioned, is one third, i.e. &amp;lt;code&amp;gt;Show_description: 33&amp;lt;/code&amp;gt;.  You can set this style at the model level for all Frame or Tall nodes, and you can override this default for any individual node.&lt;br /&gt;
&lt;br /&gt;
===Show or hide the Object view icon===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Object_in_Frame:yes/no&amp;lt;/code&amp;gt;''': With this style set, it shows an object view hover icon at the top right of a frame node or tall node when showing a graph or table view. Click this icon to show the object window view. The object view shows the Table and Graph hover icon to go back to the table or graph view.  You can set '''&amp;lt;code&amp;gt;Object_in_frame&amp;lt;/code&amp;gt;''' style at either the top level of the model or in an individual frame node, which overrides the top level setting. When working with tall nodes, you can set '''&amp;lt;code&amp;gt;Object_in_frame&amp;lt;/code&amp;gt;''' style at the top level or in the original variable's ACP style setting, which overrides the top level setting.&lt;br /&gt;
&lt;br /&gt;
===Show or hide the title===&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_title&amp;lt;/code&amp;gt;''': Set &amp;lt;code&amp;gt;Show_title: yes&amp;lt;/code&amp;gt; to show or &amp;lt;code&amp;gt;Show_title: no&amp;lt;/code&amp;gt; to stop showing the Title and units of a selected variable. This style can be used at the model level, for frame nodes or for individual nodes, but controls  whether or not the Title and units show in Frame nodes or tall nodes. &lt;br /&gt;
&lt;br /&gt;
===Show or hide the Graph-Table icon===&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_graph_table_icon:no&amp;lt;/code&amp;gt;''' Hides the icon in the top right of a Result that lets you toggle between Graph and Table view. This applies to [[Embed_table_or_graph_with_ACP|Frame nodes and tall nodes]]. This style can be used for  the entire model, for frame nodes or for individual nodes . You set them in the AcpStyles attribute.  Conversely, you can set  '''&amp;lt;code&amp;gt;Show_graph_table_icon:yes&amp;lt;/code&amp;gt;'''. This is the default so not usually necessary at the model level, but can be used in a frame node or variable to override the model default or override a frame node setting.&lt;br /&gt;
&lt;br /&gt;
===Show or hide the Uncertainty view menu===&lt;br /&gt;
By default, in ACP, as in desktop Analytica, the [[Uncertainty views]] menu appears above each result graph or table to let you select [[Mid]] to display its deterministic value, or Mean, Probability distribution, and other ways to display a probabilistic value.  &lt;br /&gt;
&lt;br /&gt;
You can override this default behavior with this ACP style for the entire model, [[Embed_table_or_graph_with_ACP#Frame_nodes|Frame nodes]], or for individual variables. The Uncertainty view menu is always present in tab result views.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_uncertainty_view: No&amp;lt;/code&amp;gt;''' Never show the uncertainty menu in frame nodes or tall result nodes. Suitable for models with no probabilistic values, or if you want to fix a particular probabilistic view for each frame node or variable so that ACP users can't change it.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_uncertainty_view: Yes&amp;lt;/code&amp;gt;''' Always show the uncertainty menu even for variables that are not probabilistic, as in Desktop Analytica. This is the default and not normally necessary at the model level, but can be used to customize which frame nodes or variables to show the uncertainty view menu when the model level style is set to '''&amp;lt;code&amp;gt;Show_uncertainty_view: No&amp;lt;/code&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
===Show or hide the Index menus and Pivoters/slicers===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_index_menus: Fly-in&amp;lt;/code&amp;gt;''' By default (the same as if there is no show_index_menu: setting) the index menus are not shown in [[https://wiki.analytica.com/index.php?title=Embed_table_or_graph_with_ACP|frame nodes or tall nodes]] (but slicers are), since often the modeler has already chosen the pivot they want to use. And because these menus take up valuable screen space. But if you hover over the frame node (or tall node) there is a fly-in pivoter control. If you click this it toggles - on or off - the visibility of the pivoters; allowing you to pivot the result table or graph and then close the pivoters to give you more space.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_index_menus: Yes&amp;lt;/code&amp;gt;''' If you do want to allow users to be able to pivot or change the slice of the table or graph, without using the fly-in, then use use show_index_menus:yes. Always present in tab result views.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_index_menus: No&amp;lt;/code&amp;gt;''' If show_index_menus:no is set then the indexes and pivoters will not show and there is no fly-in, but the slicers will still be present.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_index_menus: Not_even_slicers&amp;lt;/code&amp;gt;''' If you don't want to show any pivoters or slicers, you can set show_index_menus:Not_even_slicers.&lt;br /&gt;
&lt;br /&gt;
===Table filtering===&lt;br /&gt;
'''&amp;lt;code&amp;gt;Show_Table_Filtering: no&amp;lt;/code&amp;gt;''' Turns off the ability to filter tables by column, and reverts to the previous sort functionality. [[Tables_in_ACP#Sort_columns]]&amp;lt;br /&amp;gt;&lt;br /&gt;
'''&amp;lt;code&amp;gt;Show_Table_Filtering: yes&amp;lt;/code&amp;gt;''' The default - shows the table filtering icons&lt;br /&gt;
&lt;br /&gt;
===Show or hide the Rows and Columns pivot controls===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_row_col_header: no&amp;lt;/code&amp;gt;''' -- Hides the &amp;quot;Rows&amp;quot; and &amp;quot;Columns&amp;quot; pivot controls above a result table, while still showing any slicers.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_row_col_header: yes&amp;lt;/code&amp;gt;''' -- The default.&lt;br /&gt;
&lt;br /&gt;
===Position of the row pivoter===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;row_pivoter_loc: header&amp;lt;/code&amp;gt;''' -- Puts the pivoter for the row index inside the top left header cell of the table itself, rather than among the pivot controls above the table. Set it for the model, or for an individual variable to move the pivoter of just that table.&lt;br /&gt;
&lt;br /&gt;
===Links from table headers===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;blue_handle_links: no&amp;lt;/code&amp;gt;''' -- A row or column header whose value is a handle to an object normally appears as a blue link, and clicking it jumps to that node in its diagram. This style shows those headers as ordinary text instead. It is a model level style.&lt;br /&gt;
&lt;br /&gt;
===Very large tables===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;acp_large_table_scroll: yes&amp;lt;/code&amp;gt;''' -- Turns on virtual scrolling, so that ACP fetches and renders only the cells of a table that are actually in view. This makes a very large table usable. It applies only to tables bigger than the cell limit configured on the ACP server. Set it for the model, or for an individual variable.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;acp_max_table_size_to_show: n&amp;lt;/code&amp;gt;''' -- The largest number of body cells (rows times columns) that ACP shows in a table. A bigger table is truncated. When you don't set it, the limit configured in the [[Customizing_an_ACP_server#The_acpConfig.json_file|AcpConfig.json]] file applies. This is a model level style.&lt;br /&gt;
&lt;br /&gt;
===Autocalc===&lt;br /&gt;
&lt;br /&gt;
In the  [[ACP Style Library]], Autocalc looks like a style you can set for a model, module or variable. It controls whether ACP evaluates each variable and shows its results automatically when you view a Diagram or tab showing the -- instead of the default Analytica behavior where the end user has to click on a Calc button to compute a result.  With Autocalc on, a result in view also recomputes automatically when you change an input that influences it.&lt;br /&gt;
&lt;br /&gt;
Autocalc is not actually an ACPStyle in ACP3. (It was in ACP1.)  Autocalc is implemented using the Desktop Analytica functionality  for [[Proactive_Evaluation]].&lt;br /&gt;
&lt;br /&gt;
== Node Level Settings  ==&lt;br /&gt;
&lt;br /&gt;
These style flags and options apply to individual nodes (variables), rather than the model as a whole. So, you set these flags on the AcpStyles for selected objects (nodes).&lt;br /&gt;
&lt;br /&gt;
=== Other node level flags ===&lt;br /&gt;
&lt;br /&gt;
===Date Picker===&lt;br /&gt;
Show a date picker for input nodes.&lt;br /&gt;
* '''&amp;lt;code&amp;gt;date_picker:none&amp;lt;/code&amp;gt;''' [default]&lt;br /&gt;
* '''&amp;lt;code&amp;gt;date_picker:date&amp;lt;/code&amp;gt;''' [for only date]&lt;br /&gt;
* '''&amp;lt;code&amp;gt;date_picker:datetime&amp;lt;/code&amp;gt;''' [for date and time]&lt;br /&gt;
&lt;br /&gt;
=== Prevent nodes from showing on the diagram ===&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Show_Object: no&amp;lt;/code&amp;gt;''' &lt;br /&gt;
You can prevent nodes or modules from showing on the diagram of your model, by adding this flag to the AcpStyles attribute of the object you wish to hide. Once the model is shown in ACP the objects aren't visible.&lt;br /&gt;
&lt;br /&gt;
== Modifying ACP menus==&lt;br /&gt;
&lt;br /&gt;
Normally, ACP offers menus that appear when you press one of the three icons on the right of the top teal bar. These ACP styles let you modify these menus.&lt;br /&gt;
&lt;br /&gt;
===Hide the Save options===&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Hide_save_button: yes &amp;lt;/code&amp;gt;''' Set this model ACP style option to exclude the  'Save this model' and 'Save model as...' from the ACP Close menu. It prevents  users from saving over your models or saving other versions. &lt;br /&gt;
*''This style cannot currently be set from the ACP style library, since it would allow users to show the save and save as menu options and then save changes even if the modeler does not want to allow it.''&lt;br /&gt;
&lt;br /&gt;
===Remove Help menu items===&lt;br /&gt;
&lt;br /&gt;
These styles add menu items to or remove items from the help (?) menu if added to the AcpStyles of the top diagram of your model. For [[ACP_Server_License|ACP installations]]  on an intranet, these standard links may not be accessible. On the other hand you may want to offer a special help page for a particular model.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Remove_help_menu_options: Text&amp;lt;/code&amp;gt;&lt;br /&gt;
This style allows you to list one or more of the standard options to remove from the help (?) menu. Replace &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt; with one or more of the following: &amp;lt;code&amp;gt;ACP_Online_docs, Analytica_Q_A_forum, Tech_support&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
(Note: The help menu item &amp;lt;code&amp;gt;Connection status&amp;lt;/code&amp;gt; cannot currently be removed).&lt;br /&gt;
&lt;br /&gt;
===Add Help menu item===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;Add_help_menu_option: Text|URL&amp;lt;/code&amp;gt;''' &lt;br /&gt;
Adds another menu item, for example: &amp;lt;code&amp;gt;Add_help_menu_option: How to use this model...|https://www.lumina.com&amp;lt;/code&amp;gt; adds a menu item to the help (?) menu with the text &amp;quot;How to use this model...&amp;quot; and opens the link when clicked.&lt;br /&gt;
&lt;br /&gt;
===Add download this model to the Close menu===&lt;br /&gt;
*'''&amp;lt;code&amp;gt;save_menu_download: yes&amp;lt;/code&amp;gt;'''&lt;br /&gt;
This AcpStyle is controlled by a setting in the [[Customizing_an_ACP_server#The_acpConfig.json_file|AcpConfig.json]] file. On Lumina's acp.analytica.com server it is turned on.&lt;br /&gt;
With this AcpStyle in the model, ''&amp;lt;code&amp;gt;&amp;quot;download this model&amp;quot;&amp;lt;/code&amp;gt;'' is added to the close menu at the top right of the ACP GUI.&lt;br /&gt;
When set, this will allow anyone to download the model - even a reviewer, and even from an email invite.&lt;br /&gt;
*'''&amp;lt;code&amp;gt;save_menu_download: no&amp;lt;/code&amp;gt;''' (default if not set)&lt;br /&gt;
*'''&amp;lt;code&amp;gt;save_menu_download:Prompt_to_download_free&amp;lt;/code&amp;gt;'''.  This adds a popup dialog with a download link and prompt to download the Analytica free installer.&lt;br /&gt;
''This style cannot be set from the ACP Style library, since it would allow reviewers to change the style and download the model, even if the modeler does not  want to allow that.''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[ACP Style Library]] &lt;br /&gt;
* [[media:ACP style library.ana]]&lt;br /&gt;
* [[Analytica Cloud Platform]]&lt;br /&gt;
* [[ACP Rendering tables and graphs on the diagram]]&lt;br /&gt;
* [[Putting ACP in a Web Page]]&lt;br /&gt;
* [[Help balloons]]&lt;br /&gt;
* [[Attributes]]&lt;br /&gt;
* [[Manage attributes]]&lt;/div&gt;</summary>
		<author><name>Lchrisman</name></author>
	</entry>
</feed>