Une image contenant texte, signe

Description générée automatiquement

Open Web Page

 

Overview

This helper provides an easy way for users to open web pages either inside or outside Rhapsody.

 

Applicable To

None

Menu Entry

User Defined

Demonstration

Watch the Video

 

This helper is a set of three helpers that have no menu entries of their own:

 

·       OpenWebPage

·       OpenWebPageInRhapsodyAsTab

·       OpenWebPageInRhapsodySidebar

 

 

To use them, define your own hep files with your own menu entries that invoke these helpers.

Overview

Rhapsody 10 can open web pages directly inside the Rhapsody UI – either as a tab in the diagram editing area or docked (left, right, top or bottom). These helpers make it simple to open such web pages (either local web pages or remote web pages) without the need to write any code yourself. For Rhapsody 9 users, there is a third helper that opens the web page in the default system web browser.

 

To use these helpers:

·       Define Rhapsody Web Pages.

·       Create a HEP file to invoke the Power Pack helpers to open them.

 

Details follow and a sample model is included in the Power Pack (Samples/OpenWebPage).

 

Rhapsody Web Pages

Plugin menu entries defined in a HEP file have no concept of arguments (they only have a menu entry) and so this is the only thing a helper plugin can process. To associate a menu entry with a web page (which may have a long name and may not be particularly user friendly) create Rhapsody Web Pages. These should be created in a profile (to allow relative paths – see below). The sample model contains three such elements:

 

A screenshot of a computer

Description automatically generated

 

Rhapsody Web Pages have a single tag to contain the actual path to the web page (path). The path may be:

 

·       A remote URL e.g. https://www.google.com

·       A fully qualified local path, e.g. C:/My Web Pages/My Web Page.html

·       A relative path:

 

Relative paths

Relative paths are relative to the owning profile unit, (that is the .sbsx file) e.g.:

 

·       MyHelp.html (in same folder as unit)

·       ../MyWebPages/MyHelp.html (look one level up then in a sub folder MyWebPages)

·       Doc/Help/MyHelp.html (look for a Doc folder in the same folder as the unit, then look for a Help folder inside that)

·       ./Doc/Help/MyHelp.html (look for a Doc folder in the same folder as the unit, then look for a Help folder inside that)

Either forward or backward slashes may be used.

 

The sample model illustrates the methods:

A screenshot of a computer

Description automatically generated

 

A screenshot of a computer

Description automatically generated

MyHelp.html is relative to MyProfile.sbsx

HEP Entries

To invoke the Power Pack helpers and open the Rhapsody Web Page, add an entry to a HEP file that your profile loads. The entry should invoke one of the three Power Pack helpers described above – this entry is from the HEP supplied with sample model:

 

name3=Open Checklist\Getting Started

isPluginCommand3=1

command3=OpenWebPageInRhapsodySidebar

applicableToNonStrict3=Project

isVisible3=1

helperTriggers3=

 

The name of the entry (that is the menu entry that appears in Rhapsody) should match the name of a Rhapsody Web Page. The helpers strip off the menu structure so you can define any menu structure you like (in the above example, the blue text ‘Getting Started’ should match the name of a Rhapsody Web Page).

 

How it Works

When the helper defined in your HEP file is invoked, it runs the associated Power Pack helper. That helper extracts the name part of the menu entry and then searches in every currently loaded profile for a Rhapsody Web Page with the same name (in the above case it would search for a Rhapsody Web Page called Getting Started). It then reads the path of that Rhapsody Web Page and opens the associated web page.