Links or URL in model attributes

Revision as of 21:06, 4 September 2025 by Lchrisman (talk | contribs) (html)
Release:

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

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).

Edit Hyperlink dialog.png

Select either http:// or https://, enter the target URL (in this example, https://Analytica.com) and press OK. The text displays as a hyperlink.


Chapter9 22.png

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.

Hyperlink options.png

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.

Chapter9 21.png

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.

Hyperlink eval.png

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).

Other markup

Bold and Italics

( New in Analytica 6.5 )

When viewing markup, you can insert <b>bold tags</b> and <i>italics tags</i>

Extended HTML markup

In a text node, you can insert appearance-only HTML tags by surrounding the full description with <html>...</html>. These will be honored when the text node displays in a diagram in ACP. You can include CSS styles inside styles attributes. In desktop Analytica, only some these HTML tags will have an effect.

As of Analytica 6.6, the HTML tags that have an effect in desktop Analytica (but in text nodes only when they display on a diagram) when the attribute is surrounded by <html>...</html> are as follows (these can be nested):

  • <a href="...">label</a>: Hyperlink
  • <b>text</b>: bold
  • <br/>: line break
  • <del>text</del>: strike-out (same as <s>)
  • <div>text</div>: A non-inline block.
  • <em>text</em>: emphasis (same as italics)
  • <i>text</i>: italics
  • <li> item </li>: An item inside an <ol> ... </ol> or <ul> ... </ul>.
  • <ol> ... </ol>: An ordered list of <li>item</li> tags.
  • <p>text</p>: paragraph block
  • <s>text</s>: strike-out

<span> ... </span>: An in-line block

  • <strike>text</strike>: strike-out (same as <s>)
  • <u>text</u>: underline
  • <ul> ... </ul>: An unordered list of <li>item</li> tags.

Any other tags that appear that it does not know about are treated as in-line blocks (same as <span> ... </span>)


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.

The bold and italics tags were added in Analytica 6.5.

The extended tags using <html> were added in Analytica 6.6.

See Also


Comments


You are not allowed to post comments.