Links or URL in model attributes
Release: |
4.6 • 5.0 • 5.1 • 5.2 • 5.3 • 5.4 • 6.0 • 6.1 • 6.2 • 6.3 • 6.4 • 6.5 |
---|
A description, or other text attribute of a variable or other object, can contain a hyperlink to any web page, or even to an expression that gets run when it is clicked. This is useful for linking to detailed explanations, data, or references for a model, or even to related downloadable Analytica models. When you click a hyperlink, your computer shows the indicated web page in your default web browser.
To define or edit a hyperlink, enter edit mode, and type the text you want the user to see. Select that text then right-click on the selection and select Add/Edit Hyperlink from the context menu (or use keyboard shortcut Ctrl+Alt+H).
Select either http://
or https://
, enter the target URL (in this example, https://Analytica.com) and press OK. The text displays as a hyperlink.
When you click on the link in browse mode, it opens the web page. When you click on the link in edit mode, you are given options to go to the page, change the link or remove the link.
The Change option re-opens the Edit Hyperlink dialog shown above.
You can also view the HTML-like "markup" text in edit mode by right-clicking within the attribute text and selecting Toggle show markup.
Eval links
You can create a link that evaluates an Analytica expression when you click on it. To do so, select "eval:" in the dropdown.
Eval opens up numerous creative options, including:
- Calling ShowPdfFile to open a PDF file.
- Calling ShowWindow to show a particular object view (such as a result table, graph, and edit table, or to an object on a diagram, etc.).
- Display a MsgBox with some computed information (as in the example shown).
History
The Edit Hyperlink dialog (a GUI for editing the hyperlinks) was added in Analytica 5.3. Prior to that, markup displayed in edit mode, hyperlinks in edit mode.
The ability to evaluate an arbitrary expression when the hyperlink is clicked was added in Analytica 6.0.
See Also
Enable comment auto-refresher