Making a browse-only model and hiding definitions
With Analytica Enterprise and Optimizer, you can save a model as Browse-only so that end users can view the model and results and change user inputs, but not edit the model (using any Edition of Analytica, including Free 101 and Professional). You can also hide definitions that contain sensitive or proprietary data or algorithms.
When you are ready to let others use the models you have created, you might want to save it as browse-only, so that end users can only change the variables you have designated as inputs (by making input nodes for them). You might also want to hide definitions of variables or functions to protect confidential or proprietary data or algorithms.
With Analytica Enterprise and Analytica Optimizer, you can save models in a form that is locked as browse-only and with hidden definitions. It also encrypts the Analytica source file in a form that is not human readable so that no-one can view or modify it outside of Analytica -- with a text editor. These are the basic steps, explained further below:
- Hide selected definitions, by variable, module, or the entire model.
- Save your master model file (and any filed submodules) so that you can still view and modify the original yourself.
- Select Save a copy from the File menu, and check Lock and encrypt and optionally Save as a browse-only model copy to save an encrypted copy.
- Distribute the locked and encrypted copy to your end users.
The third step locks and encrypts the model permanently and irretrievably. No-one (not even the author) can see or modify Hidden definitions. That's why you must save the encrypted model as a copy, and keep the original model master (unprotected) copy. Any definitions that you have set as "Hidden" in the model master can still be viewed and unhidden in the original model or model file. You must Hide them and Save a Copy checking "Lock and Encrypt" to complete the process.
Hiding and unhiding definitions
To hide the definition of a single variable or function, or all variables and functions in a module:
- Select the node of the variable, function, or module in its parent diagram, or open the module and select no nodes inside it.
- Select Hide Definition(s) from the Object menu, so it becomes checked.
You cannot hide multiple nodes at once except by hiding their parent module.
If a variable, function, or module is hidden, when you try to view its definition, it displays:
[Definition is Hidden]
Unhiding and inheritance of hiding
Definition hiding is inherited down the module hierarchy. If you hide a module, you hide the definitions of all the objects that it contains, including its submodules and all the objects that they contain — unless you explicitly unhide an object or submodule. To unhide a variable, function, or module:
- Select its node in its parent diagram.
- Select Unhide Definition(s) from the Object menu, so it becomes checked.
In the module hierarchy shown below, module
Mo1 is hidden, and therefore so are the objects it contains, module
Va2. But module
Mo3 is unhidden, and therefore so are the objects it contains,
Mo4. However, object
Va4 is itself explicitly hidden.
Hiding does not become permanent until you save the file as locked and encrypted. In the original file, you can unhide, edit, or hide as you wish in the original model. That’s why it’s so important that you save a master copy for your own use.
Saving an encrypted copy of your model
When you are ready to save an encrypted copy of your model, select Save a Copy In from the File menu.
Enter a filename that is different than the filename of your master copy, to make sure that you retain an editable version for your self.
Check Lock and encrypt the copy at the bottom of the dialog to save the model in an encrypted form that makes any hidden definitions unviewable, even if you try to edit the file.
Check Save as a browse-only model if you also want to prevent users from changing any variables not designated as inputs. In that case, the model is locked in browse-only mode, even if the user runs the model with an Analytica edition that normally allows editing.
Optionally check Save everything in one file by embedding filed modules to produce a single file that can be distributed. If your model is utilizing unlocked filed modules, the content in those may remain exposed unless you use this option (alternatively, you can link to locked copies of those modules in your main model before saving your main model in a locked form). Even if you do not lock your model, this option can provide a convenient way to distribute your model as a single file to end-users, or to bundle it for upload to the Analytica Cloud Player. Publish to cloud on the File menu saves everything in a single file automatically during the upload.
A browse-only model is always encrypted to prevent anyone from editing the source Analytica file. That's why it automatically checks Lock and encrypt the copy and the Save in XML format option is not available.
If you want end users to be able to use other Enterprise features, such as database access, file reading and writing, Huge Arrays, or performance profiling, they need the Power Player — or their own Enterprise edition. Enterprise and Optimizer-level features are available to users viewing your model through the Analytica Cloud Player (ACP).
When a user runs a browse-only model (saved as such from Enterprise) into Analytica Professional, it runs it in Power Player mode, so that database access, etc., is available (features not otherwise accessible from Analytica Professional).
Filed libraries and submodules
When you save a copy of your model without checking the Save everything in one file by embedding filed modules option, it saves a locked copy only of the top-level model file. The locked status of any filed modules remain in their original state, such that individual module files may remain non-encrypted or editable. If you don’t want to embed all filed modules in your encrypted copy, you’ll need to save an encrypted copy of each submodule individually, and use “Add Module...” with the Link and Merge options to switch your model to using the locked copy, prior to saving a copy of your top-level model.
You can distribute locked copies of libraries or modules to let other model developers ise them without being able to see your proprietary definitions (if Hidden) or being able to modify them (when locked as browse-only). When using locked libraries, certain operations involving objects in those modules are restricted. You cannot embed an encrypted sub-module within a non-encrypted module, unless it is a separately filed module. You can embed an encrypted module in an encrypted parent model. Various operations that might allow a user to gain access to your hidden definitions are disallowed, such as moving an object with a hidden definition from an encrypted module to a non-encrypted module.