Cradle from 3SL, the complete Model Based Systems Engineering Toolsuite, specialising in requirements management, requirements capture, model based systems engineering and for systems engineering software, support and consultancy, the logical choice: Cradle from 3SL.
login Register forgot password or username?
Search:         

January 2012 [Cradle 6.5.1]

How to Link Cradle to Visio Diagrams

Visio® is a popular drawing tool from Microsoft. It has a very wide range of diagram styles, ranging from simple block diagrams to notations from a range of engineering and other disciplines. For example, Visio supports data flow diagrams, BPMN and UML diagrams from software engineering.

Cradle provides two methods for linking to Visio diagrams:

  • Linking to an entire Visio drawing
  • Linking to individual symbols or groups in a sheet inside a Visio drawing

Both of these methods use the Cradle frame type mechanism to create data types that provide the link from an attribute in Cradle item(s) to Visio.

When linking to a Visio drawing, the frame type makes a link to the entire Visio file that is either stored inside the Cradle item’s attribute, or the attribute references the Visio drawing as an external file or at a URL or as an object in an external environment. When linking to a symbol or group of symbols in a sheet in a Visio drawing, the frame type makes a link from the Cradle item’s attribute to the symbol or group and the Visio file is referenced externally in a file, at a URL or in an external environment.

Cradle supplies the means to link Cradle items to Visio drawings. The following sections will show how to use this mechanism to create a link from a requirement in the as-supplied demonstration project DEMO to an external Visio file.

The VISIO Frame Type

Cradle provides the VISIO frame type that can link to an entire Visio file. To see this frame type, login to your Cradle project as a user who has the privilege PROJECT so you can modify the project schema. Select Admin → Project Setup to start the Project Setup tool, ensure that Item Definitions is selected in the Options pull-down list and select the Frame Types tab:

Frame types are the attribute types (data types) in Cradle. The VISIO frame type is part of the default schema used in the demonstration project DEMO supplied with all Cradle systems. If your project does not have the VISIO frame type, select Update… to update your project’s frame types from the default schema. Selecting this button produces the Update Frame Types dialog:

Use this dialog to update your frame types, optionally overwriting any in the list that may already be in your project schema.

Select VISIO and select Edit… to see the details of the frame type in the Frame Type Details dialog:

You can ignore most of the contents of this dialog. For now, the only important aspect is the Storage: field. This has the value In PDB, meaning ‘in project database’. This means that frames (attributes) of the VISIO frame type are intended to store Visio files inside the Cradle database.

If you want attributes of type VISIO to reference Visio drawings in external files, change this attribute to As File and select OK. If you want attributes of type VISIO to reference Visio drawings via a URL, then change the Base Type: field to be URL, which will automatically set the Storage: field to As Reference, and then select OK.

Select OK or Cancel, as appropriate, when you are done.

Create Attribute of Type VISIO

The previous step has ensured that the VISIO frame type is available. Now you need to create an attribute of this type in a Cradle item type. You can, of course, create multiple attributes in multiple item types, without restriction.

Select the Item Types tab in the Item Definitions group, select the item type to be modified (such as the pre-defined item type Requirement) and select Frames… to display the Frame Setup dialog:

Select New… to create a new attribute (called a frame in Cradle), enter a name for the attribute such as VISIO DRAWING and select OK. The new frame is shown in the list and is automatically selected:

Without an explicit frame type, the new VISIO DRAWING attribute will be a text frame that can store plain text. Select the Type: drop-down list and choose the frame type VISIO:

Select OK to close the dialog and then select OK to save your modified schema.

Link to a Visio File

The previous step created a VISIO DRAWING attribute in the Requirement item type. This means that items of the pre-defined Requirement item type can now have Visio files linked to their VISIO DRAWING attributes.

To make such a link, open a Requirement, either in a view or in a form. In this example, a Requirement has been opened in a form:

The problem here is that the new VISIO DRAWING frame is not shown, so you cannot link the Requirement to a Visio drawing. This is because this form was created before the VISIO DRAWING attribute was added, so you will need to update the form definition to show the VISIO DRAWING frame.

However, Cradle provides an Automatic scope form that is automatically updated whenever attributes are added to, or deleted from, the schema. Select the Requirement – Full form from the Form: drop-down list at the top of the WorkBench UI. As it is an Automatic scope definition, it is coloured purple and appears between the Project scope definitions (coloured blue) and the System scope definitions (coloured black):

When you select the Automatic scope Requirement – Full form, the VISIO DRAWING attribute becomes visible:

The VISIO DRAWING frame is shown as a button. The frame is empty. Select it to show the pop-up menu and select Import Content… so that you can specify a file whose content will be loaded into the frame:

Once the file is loaded into the frame, the frame button is shown with an icon to show that it has content:

This has created a link between the Visio drawing and the Requirement.

In this case, the Visio drawing is stored inside the VISIO DRAWING attribute in the Requirement. Therefore, the only way to access this drawing is through Cradle itself.

If you want the link between the Visio drawing and a Cradle item (the Requirement in this case) to be a link to a file so that you can still access the Visio drawing independently of Cradle, then change the VISIO frame type as described in the previous section.

Using the Visio Link

Once you have loaded a Visio drawing into the VISIO DRAWING frame, you can access it from any Cradle view or form that displays the frame.

When you select the button, the pop-up menu presents options to View and Edit the frame:

If you select View, Visio will be opened to display the drawing. Any changes that you make to the Visio drawing will be discarded. So even if you save the Visio drawing after your edits, these changes will be discarded because the updated Visio drawing will not be reloaded into the Cradle item.

If you select Edit, then Visio will opened to display the drawing and any changes that you make to the drawing will be reloaded into Cradle when you save and exit from Visio.