Coupling Microsoft Visio with NI Requirements Gateway Contents This document explains how NI Requirements Gateway interfaces with Microsoft Visio. Use this document to familiarize yourself with the Visio type in Requirements Gateway. Refer to Appendix A, Third-Party Types Overview, of the Getting Started with NI Requirements Gateway manual for more information about the elements of the Visio type. Selecting Visio Files to Analyze... 1 Variables of the Visio Type... 2 Requirements Traceability... 2 Capturing Information from Custom Properties (Visio 2003)... 2 Requirements... 3 References... 3 Capturing Information from Shape Data (Visio 2007)... 4 Creating References from Requirements Gateway... 4 Intermediate File... 5 Creating Custom Visio Types... 5 Selecting Visio Files to Analyze The Visio type captures traceability information from a single Visio drawing (.vsd) file. When you add a Visio document to a project, you must first specify the files to include in the document. Click the File Browse button in the File or Directory column on the Project pane of the Configuration dialog box to launch the Open dialog box, in which you can browse for the individual.vsd file you want to use.
Variables of the Visio Type Requirements Traceability When you add a Viso document to a project, no document variables exist for the Visio document. You can perform traceability analysis on Visio documents by capturing traceability information from the custom properties in Visio 2003 or shape data in Visio 2007 or by creating references in the Graphical View in Requirements Gateway. Capturing Information from Custom Properties (Visio 2003) You can capture traceability information from a document in Visio 2003 if the custom properties contain the proper syntax for requirements and references. In Visio 2003, select View»Custom Properties Window to launch the Custom Properties window, in which you can view the custom properties of a drawing. By default, the Visio type captures requirements and references from a custom string property named Requirements Traceability, as shown in Figure 1. Figure 1. Custom Properties Window By default, a drawing has no custom properties. You can add custom properties to a drawing by right-clicking the Custom Properties window and selecting Define Properties from the context menu to launch the Define Custom Properties dialog box, in which you can specify the Requirements Traceability custom string properties, as shown in Figure 2. Coupling Microsoft Visio with NI Requirements Gateway 2 ni.com
Figure 2. Define Custom Properties Dialog Box After you define the custom properties, you can enter the property values in the Custom Properties window. Requirements The default syntax for requirements stored in Visio custom properties is VISIOxx, where xx represents digits. References The default syntax for references to requirements in an upstream document is (Covers: reqid), where reqid is the requirement identifier. The reference statement must be enclosed in parentheses. In Requirements Gateway, right-click a requirement in an upstream document covered by a downstream Visio document and select Copy For»Visio Requirements Traceability Property from the context menu. Requirements Gateway copies the (Covers: reqid) syntax to the system clipboard, and you can paste this reference statement in a Requirements Traceability custom property for a Visio object. National Instruments Corporation 3 Coupling Microsoft Visio with NI Requirements Gateway
Capturing Information from Shape Data (Visio 2007) You can capture traceability information from a document in Visio 2007 if the shape data contains the proper syntax for requirements and references. Shape data corresponds to custom properties in Visio 2003. In Visio 2007, select View»Shape Data Window to launch the Shape Data window, in which you can view the shape data of the drawing. Use the Shape Data window in the same manner as you use the Custom Properties window. By default, the Visio type captures requirements and references from a custom data property named Requirements Traceability. By default, a drawing has no custom data. You can add custom data to a drawing by right-clicking the Shape Data window and selecting Define Shape Data from the context menu to launch the Define Shape Data dialog box, in which you can specify the Requirements Traceability custom data property. Use the Define Shape Data dialog box in the same manner as you use the Define Custom Properties dialog box in Visio 2003. Refer to the Capturing Information from Custom Properties (Visio 2003) section for more information about using custom properties in Visio 2003. Creating References from Requirements Gateway You can use the Graphical View to create references between a requirement and an Excel document or element of an Excel document. Refer to the NI Requirements Gateway Help for more information about creating references using the Graphical View. After you create a reference, you can click the Coverage Analysis View tab and select the covering document or element in the Selection column. The Upstream Coverage Information column shows all the requirements that the selected document covers. For references that you created in the Graphical View, Requirements Gateway identifies the covered requirements with an internal creation reference attribute. Coupling Microsoft Visio with NI Requirements Gateway 4 ni.com
Intermediate File The Visio type processes the drawing by capturing the image of the drawing and the names and values of the custom properties defined for the drawing. The Visio type also analyzes the custom properties to capture traceability information, and generates an ASCII intermediate file that contains the following information: Page The name of the page that contains the drawing. Image The path to the Windows Metafile (WMF) image that represents the Visio drawing. Requirements Gateway displays this image in the Associated Picture window when you select the picture element that represents the drawing in the main window. Shape The type of shape and the text in the shape. The intermediate file lists all the shapes in the drawing. Property The name and values of properties. The intermediate file lists all the properties in the drawing. Requirements Traceability custom properties that include requirements or references appear as Property: Requirements Traceability=VISIOxx or Property: Requirements Traceability=(Covers: reqid), respectively. Creating Custom Visio Types If a Visio file uses a custom property with a name other than Requirements Traceability and you want to capture traceability information from shapes with that property, you can create a custom Visio type. You must duplicate the default Visio type and modify the duplicate. The regular expressions the default Visio type uses to capture requirement and reference elements contain a string that matches the Requirements Traceability custom property, as shown in Figure 3. National Instruments Corporation 5 Coupling Microsoft Visio with NI Requirements Gateway
Figure 3. Requirement Element of the Visio Type Selected on the Types Pane When you duplicate the default Visio type, you can replace Requirements Traceability in the regular expression for the requirement and reference elements with the name of the custom property you want to use. If you do not specify requirements in Visio, you can delete the requirement element of the duplicated Visio type. Refer to Chapter 5, Customizing Types, of the Getting Started with NI Requirements Gateway manual and Chapter 2, Customizing Types and Type Elements, of the NI Requirements Gateway Customization Guide for more information about creating custom types. National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies. For patents covering National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents. 2009 National Instruments Corporation. All rights reserved. 372694A-01 Jan09