Difference between revisions of "Links or URL in model attributes"

(eval option)
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
[[Category: Models]]
 
[[Category: Models]]
 
[[Category: Attributes]]
 
[[Category: Attributes]]
<breadcrumbs>Analytica User Guide > Creating Interfaces for End Users > {{PAGENAME}}</breadcrumbs>
+
<breadcrumbs>Analytica User Guide > User Interfaces for End Users > {{PAGENAME}}</breadcrumbs>
 +
{{ReleaseBar}}
  
 +
A '''''description''''', or other text attribute of a variable or other object, can contain a hyperlink to any web page{{Release|6.0||, 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. {{Release||5.2|In [[browse mode]], hyperlinks appear convention- ally underlined in blue.}} When you click a hyperlink, your computer shows the indicated web page in your default web browser.
  
A '''''description''''', or other text attribute of a variable or other object, can contain a hyperlink to any web page. This is useful for linking to detailed explanations, data, or references for a model, or even to related downloadable Analytica models. In browse mode, hyperlinks appear convention- ally underlined in blue. 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 {{Release||5.2|use a standard HTML link syntax of the form  
 
+
<code><nowiki><a href="http://www.analytica.com/">Click here</a></nowiki></code>}}{{Release|5.3||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).
To define or edit a hyperlink, enter edit mode, and use a standard HTML link syntax of the form  
+
:[[image:Edit Hyperlink dialog.png]]
<code><nowiki><a href="http://www.lumina.com/">Click here</a></nowiki></code>
+
Select either <code>http://</code> or <code>https://</code>, enter the target URL (in this example, [https://Analytica.com https://Analytica.com]) and press OK. The text displays as a hyperlink.}}
 
+
{{Release||5.2|
 
When you switch to browse mode, the HTML code displays as a hyperlink.
 
When you switch to browse mode, the HTML code displays as a hyperlink.
  
Line 16: Line 18:
 
:[[File:Chapter9 21.png]]
 
:[[File:Chapter9 21.png]]
  
'''In browse mode''':
+
'''In browse mode''':}}
  
 
:[[File:Chapter9 22.png]]
 
:[[File:Chapter9 22.png]]
 +
 +
{{Release|5.3||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.
 +
:[[image: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'''.
 +
:[[File: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.
 +
 +
:[[image: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).
 +
 +
== 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==
 
==See Also==
 
* [[OpenURL]]
 
* [[OpenURL]]
 
* [[ReadFromUrl]]
 
* [[ReadFromUrl]]
 +
* [[Read data from URL on internet]]
 +
* [[Retrieving Content From the Web]]
 +
  
<footer>Graphics, frames, and text in a diagram / {{PAGENAME}} / Analytica Free 101</footer>
+
<footer>Graphics, frames, and text in a diagram / {{PAGENAME}} / Analytica Free Edition</footer>

Latest revision as of 13:56, 15 March 2024



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

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

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


Comments


You are not allowed to post comments.