Table of Contents Previous Chapter 2 Editing SDL Diagrams

2 Editing SDL Diagrams

Managing Diagrams

This section describes the methods when performing the following tasks on SDL diagrams:

Creating a Diagram

Diagrams can be created from within other diagrams. When created, they form part of the current active system in the SDL Editor, and their presence is instantly reflected in the Diagram Structure Area or Associated Documents Area of the SDT Organizer. This is achieved by inserting SDL diagram reference symbols.

Diagrams may also be created as separate unrelated new entities. They will however not be incorporated in the diagram structure of the Organizer.

Examples of both diagram creation methods is given below.

Creating a Related Diagram from another Diagram

To create a related diagram from another diagram:

  1. Open the SDL diagram from where to start (see "Opening a Diagram" on page 44). Any page will do.
  2. Insert the SDL reference symbol.
  3. Assign the symbol the name of your choice. The symbol type and name must be unique within the SDL diagram; the SDL Editor performs this check for you.
  4. When deselecting the reference symbol, the Organizer's diagram structure is updated accordingly.
  5. Double-click the newly added reference symbol. SDT allows you to specify what action to perform. You have the option to
  6. The SDL Editor will now create a new buffer, possibly a new window, and display the newly created diagram.
  7. You should save both the parent and the child diagram later on in your editing session, to make changes permanent.
Example 1 : An Organizer Structure.  
As an example, in the Organizer diagram structure in Figure 8, a system is shown with only one block diagram.

Figure 8 : A Basic System shown in a Diagram Structure. 
-----
(fig)  
       
-----
Suppose the system diagram is being edited. We now add a new block reference symbol, name it Block_B and deselect it. The Organizer diagram structure becomes:

Figure 9 : Having added a Reference Symbol. 
-----
(fig)  
       
-----
SDT shows that the newly added reference symbol is not yet connected to any physical file with the [unconnected] identifier.

Now, double-click the Block_B symbol. (This can actually be done from within the SDL Editor or the Organizer, the two actions are the same). SDT prompts you to specify whether you want to create a new file or to connect the newly created block to an existing file.

Figure 10 : Creating a new Buffer. 
-----
(fig)  
       
-----
Make sure the New radio button is on and click Edit. A new dialog appears, where you are to specify the name of the first SDL page to add to the diagram (an SDL diagram must contain at least one SDL page).

Assign the page name of your choice (see "Adding a Page" on page 56 for more information the various options) and click OK.

A new block diagram with the name Block_B is created. The SDL Editor responds by issuing a window showing this diagram. Also, the Organizer's diagram structure is updated, showing the new diagram icon, inserted at the corresponding place in the SDL hierarchy.

Figure 11 on page 42 shows the result:

Creating an Unrelated New Diagram

To create a new, unrelated diagram:

  1. Select New from the the File menu in the menu bar of the SDL Editor and you are able to create every type of diagram shown in Figure 12.
    Figure 12 : Creating a New Diagram.  
    -----
    (fig)  
           
    -----
    
  2. Enter the required name of the new diagram in the Diagram Name field. The name should be in keeping with SDL naming conventions.
  3. Choose the type of diagram required from the selection available in diagram type menu. To see this menu, click on the Diagram Type button which will show the last type of diagram to have been created.
  4. When you have completed these actions, click on the New button. A new dialog box is shown inviting you to add a page, as each diagram must have at least one page. See the section "Adding a Page" on page 56 for this.
  5. The SDL Editor opens a window on the newly created diagram.

Appending a Diagram into the SDL Hierarchy

When a diagram has been created, it needs to be brought into the SDL hierarchy to be available for future selection in the Organizer. Otherwise, it will only be available by opening it from the SDL Editor (see "Opening a Diagram File from the SDL Editor" on page 44).

To insert a diagram into the SDL hierarchy:

  1. Create the diagram using the New command from the SDL Editor. Save the diagram on file (see "Saving a Diagram in the SDL Editor" on page 47).
  2. Open the diagram that will refer to the newly created diagram (see "Opening a Diagram" on page 44).
  3. In the diagram you just opened, add a diagram reference symbol with a type and name that matches the newly created diagram. A new icon appears in the Organizer diagram structure.
  4. With the Organizer Connect Diagram command, connect the new icon with the file on which the diagram is stored. See chapter 22, The SDT Organizer on page 1089 for a description of this command.
Once a reference symbol is placed in the newly created page of the new diagram in the SDL Editor, the SDT Organizer is updated to reflect this. This indicates that the SDL hierarchy is updated.

Opening a Diagram

There are several ways of opening a diagram for editing, depending on where you are and what you need to access.

Opening a Diagram File from the SDL Editor

To open a file:

  1. The Open menu choice allows you to open a file. It is selected from the File menu.
    ---------------------------------------------------------
    (fig)  
  2. Alternatively, click the quick button for Open. ---------------------------------------------------------
  3. The menu choice issues a Standard File Selection Dialog (see Figure 13). The general properties of the file selection dialog are described in chapter 21, The SDT Graphical User Interface.
    Figure 13 : Opening a File from the SDL Editor. 
    -----
    (fig)  
           
    -----
    
To select a file to open:

Using the Filter Field

The filter field is set to *.s?? by default. This matches the default file extensions that we recommend for SDL diagrams. However, SDT does not force you to use these default file extensions.

Opening a Diagram from the Organizer

It is also possible to open a diagram from the SDT Organizer.

To open a diagram, there are several methods:

Opening a Diagram - via Organizer - to Show Analyzer Reports

When the Analyze command from the Generate menu in the SDT Organizer has been performed, it is possible to show the source of Analyzer error reports in an SDL Editor.

To do this:

Opening a Diagram via a Reference Symbol

It is possible to open a diagram from the SDL Editor with a simple double-click on a reference symbol.

To do this:

  1. Locate the SDL reference symbol referring to the diagram you want to open.
  2. Double-click the symbol. The SDL Editor opens the diagram.

Opening a Diagram from the Simulator

If a GR trace has been performed in the SDT Simulator, invoking the ShowNextSymbol or ShowPreviousSymbol simulator commands will display either the next symbol to be executed or the previously executed symbol in a diagram in an SDL Editor window.

Saving a Diagram

There are several ways to save a diagram. The effect is of saving any changes made to either one specific diagram, or all diagrams modified during the current session.

Saving a diagram can also be performed in conjunction to closing the diagram or exiting the SDL Editor. See "Closing a Diagram" on page 50 and "Exiting the SDL Editor" on page 37.

Saving a Diagram in the SDL Editor

In the SDL Editor, a request to save should be made from the window showing the diagram to be saved (see "Transferring to a Diagram" on page 50 for how to access and show a specific diagram) that is read by the SDL Editor.

To save a diagram:

Saving a Newly Created Diagram

When a diagram that is not connected to any file (i.e. a newly created diagram) is to be saved, you need to specify a file to store the diagram on.

To save a newly created diagram:

  1. Select the Save command from the File menu. A Standard File Selection Dialog is issued (see Figure 15).
  2. Specify the file to save the diagram on.
  3. Click OK to confirm the file name and to save the diagram.
    Figure 15 : Saving a New Diagram. 
    -----
    (fig)  
           
    -----
    

Saving All Diagrams in the SDL Editor

A global save can be made of all the diagrams that are open in the current session, and have had modifications done to them.

To save all diagrams:

Saving a Copy of an SDL Diagram

It is possible to save the diagram being edited into another file. You may either continue working with the original file or with the newly created copy.

Continuing Working with the New Copy

To save a copy of an SDL diagram and continue working with the new copy:

  1. Select Save As from the File menu. A Standard File Selection Dialog is issued.
  2. Click the OK button to confirm. The SDL diagram is copied to the specified file, the file containing the original is closed, and the window from where the save was made remains open for editing the newly created file.

Continuing working with the original

To save a copy of an SDL diagram and continue working with the original:

  1. Select Save As from the File menu. A Standard File Selection Dialog is issued.
  2. Click the OK button to confirm. The SDL diagram is saved on the specified file, and the window with the file from where the save was made remains open for editing.

Closing a Diagram

Closing a diagram also means closing all instances of all windows displaying any page contained in that diagram.

To close a diagram:

  1. Select the Close Diagram menu choice from the File menu. The command should be performed from a window showing any of the pages contained in the diagram to close.
  2. If modifications have been made to a diagram, an SDT Close dialog is shown providing the opportunity to save the modifications before closing the diagram - see Figure 16 below.
    Figure 16 : Prompting to Save a Diagram when Closing it. 
    -----
    (fig)  
           
    -----
    

Printing a Diagram

The SDL Editor allows you to print an entire SDL diagram or a selection of pages or objects contained in the diagram. To print multiple SDL diagrams, you should print from the Organizer.

How to print an SDL diagram is described in chapter 4, Printing Information, on page 258.

Transferring to a Diagram

This section describes how to transfer to a diagram that is currently read by the SDL Editor. (The diagram that you would like to see may reside in a window which is not on top of the screen.)

The Diagrams menu menu shows all SDL diagrams and pages (up to a maximum of the last nine to have been opened). If more than nine pages are open, a tenth menu choice, List All, provides access to a list dialog where all diagrams and pages are listed.

To transfer to one of the diagrams opened by the SDL Editor:

  1. Click the Diagrams menu to see the list of diagrams.
  2. Then, select the required diagram name and page (each menu choice contains the type and name of the diagram, followed by a slash and the name of the page, and finally the name of the file the diagram is stored on.) The window containing the page is instantly displayed.

Tidying Up a Diagram

You may order the SDL Editor to rearrange the layout of an SDL diagram, for instance if you run out of space on any of the pages that build up the diagram.

The algorithms that control how the new layout will be are described in "Automatic Layouting of Diagrams" on page 1269 in chapter 23, The SDL Editor.

To rearrange an SDL diagram:

  1. Make sure the diagram to rearrange is the active one.
  2. Select Tidy Up from the Tools menu. A dialog is issued, prompting you to confirm the operation:
    Figure 18 : The Confirm Tidy Up Dialog. 
    -----
    (fig)  
           
    -----
    
  3. You should inspect the diagram in order to check its appearance before continuing working with it (the SDL Editor allows you to Undo the operation from the Edit menu).

Managing Pages

This section describes the more important aspects of page handling.

Each diagram page must have a unique name for identification purposes. This name must be correct in accordance with the naming convention in SDL for pages. Each diagram must contain at least one page, and there is no maximum amount of pages that a diagram may contain.

The autonumbering facility available for pages relates to automatically updating the sequential numbering when pages are added or deleted.

When diagrams are opened, the default way of presentation is that the first page of the requested diagram is shown (first in accordance to order in which pages have been added). This default can be overruled, and you can go directly to a specific page that has been predetermined.

Most of the page managing functions are available through the menu choices on the Pages menu.

A number of functions are available through the Edit menu choice in this menu (see Figure 19 on page 54):

Other page functions are available in the SDL Editor:

Ordering Pages

Within an SDL diagram, page locations are set according to the order in which they are added (see "Adding a Page" on page 56). This order is reflected in:

The SDL Editor allows you to change the order of pages. To re-order pages, you use the Cut Button and Paste Button. See "Cutting a Page" and "Pasting a Page" on page 61.

Naming Pages

Whenever you name a page, the names that you use must strictly adhere to SDL naming conventions. If you use unacceptable notation (e.g. blank spaces or a semi-colon), you receive a message that shows the name you have typed in, and says that it is illegal.

Applying Autonumbering on Page Names

If autonumbering is required, a nice feature can assign numeric names to the pages in the diagram. The page names will be assigned 1, 2, 3 and so forth.

To apply autonumbering on a page:

  1. Select the Edit menu choice.
  2. Select the page to autonumber in the page list.
  3. Toggle the Autonumbered toggle button to on in the Edit Pages dialog. You are then prompted if you want to autonumber the selected page only or all pages, or to change your mind (see Figure 20).
    Figure 20 : Specifying what Pages to Autonumber. 
    -----
    (fig)  
           
    -----
    

Removing Autonumbering on Page Names

The autonumbering feature can be turned off if required. This must for instance be done if you want to assign a specific name on a page.

To remove autonumbering on a page:

  1. Select the Edit menu choice.
  2. In the page list, select the page to remove autonumbering on.
  3. Toggle the Autonumbered toggle button to off in the Edit Pages dialog. You are then prompted to confirm the operation (see Figure 21).
    Figure 21 : Confirming to Remove Autonumbering. 
    -----
    (fig)  
           
    -----
    

Adding a Page

To add a page to an existing diagram:

  1. Select the Edit menu choice.
  2. In the list of existing pages, select the page to precede or succeed the new page to be added.
  3. Click the Add button. The Add Page dialog is issued.
    Figure 22 : Adding a Page. 
    -----
    (fig)  
           
    -----
    
  4. Enter the required page name in keeping with SDL conventions (remember, the name must be unique within the diagram). Otherwise, select Autonumbered on if you want the pages to be automatically renumbered to incorporate the new page. See "Applying Autonumbering on Page Names" on page 55 for more information on this topic.
  5. Select the position where the new page must go - either before or after the current page.
  6. Select the type of page required. The dialog box automatically shows the page options that are available to you under SDL rules. This action is not possible to perform on diagrams that can have one page type only.
  7. When all is entered, click OK. After completion of the Add Page dialog, control is returned to the Edit Pages dialog, allowing you to for instance add additional pages.
  8. Terminate the operation by clicking Done.

Designating the Page to Open

When a diagram is opened without specifying a particular page, the default is that it is opened at the first page that has been added to the diagram, showing the upper left part of the page.

It is possible however to open a diagram at a specific page in the SDL Editor.

To specify the page to be opened first:

  1. Bring up the Edit Pages dialog (see "Adding a Page" on page 56 for how to do this.
  2. The Open this page first field, below the toggle button, reflects what page is specified as to be opened first (page 1 in Figure 23).
    Figure 23 : Specifying what Page to Open First. 
    -----
    (fig)  
           
    -----
    
  3. To specify another page, select the page to be opened first in the Edit pages dialog.
  4. Turn the Open this page first button on. The identification of the page to be opened is then placed under the Open this page first button.
  5. Click Done to close the dialog.

Renaming a Page

To rename an SDL page:

  1. Select the Edit menu choice.
  2. Select the page to rename in the page list. Auto-numbered pages cannot be renamed.
  3. Click the Rename button. The Rename Page dialog is issued.
    Figure 24 : Renaming a Page. 
    -----
    (fig)  
           
    -----
    
  4. Fill in the required new name in keeping with SDL naming conventions. Page names must be unique within the diagram.
  5. Click OK. After completion of the Rename Page dialog, control is returned to the Edit Pages dialog. You can now for instance rename other pages.
  6. Terminate the operation by clicking Done.

Clearing (deleting) a Page

To clear a page:

  1. Select the Edit menu choice.
  2. Select the page to be deleted in the page list.
  3. Click on the Clear option and the following confirm dialog appears - see Figure 25, where two options are available:
    Figure 25 : Clearing (deleting) a Page. 
    -----
    (fig)  
           
    -----
    
  4. When you have deleted the pages of your choice, click Done.

Copying a Page

To copy an SDL page:

  1. Select the Edit menu choice.
  2. Select the required page to be copied in the page list.
  3. Click on the Copy Button. The page is copied to the clipboard and is from now on available for pasting.
  4. Click Done to close the Edit Pages dialog.

Cutting a Page

To cut an SDL page:

  1. Select the Edit menu choice.
  2. Select the required page to be cut in the page list.
  3. Click on the Cut Button. The page is copied to the clipboard and disappears from the page list.
  4. You may now paste the page into the same or into another diagram. Click Done to close the Edit Pages dialog.

Pasting a Page

To paste an SDL page:

  1. Open the SDL diagram where to paste the page (an SDL page must have been copied or cut into the clipboard during the current SDT session. Otherwise the Paste button is dimmed).
  2. Select the Edit menu choice.
  3. In the list of existing pages, select the page to precede or succeed the new page to be pasted. Click the Paste Button. The Paste Page dialog is issued.
    Figure 27 : Pasting a Page. 
    -----
    (fig)  
           
    -----
    
  4. Enter the required page name in keeping with SDL conventions (remember, the name must be unique within the diagram). Otherwise, select Autonumbered on if you want the pages to be automatically renumbered to incorporate the page to be pasted. See "Applying Autonumbering on Page Names" on page 55 for more information on this topic.
  5. Select the position where to paste the page - either before or after the current page.
  6. When all is entered, click Paste. After completion of the Paste Page dialog, control is returned to the Edit Pages dialog.
  7. Terminate the operation by clicking Done.

Transferring to a Page

There are several ways to transfer to another page of the current diagram. When you transfer to a page, that page becomes current, and is placed on the top of the stack in the window if you are using one window only. Otherwise, that page will be displayed in a window of its own which pops up.

Transferring to a Specific Page

To transfer to any of the pages of the current SDL diagram by specifying it:

Transferring to the Referring Page

To transfer to the page where the current page is referenced from (i.e. where the SDL reference symbol referring to the current diagram is located):

Transferring to the Next or the Previous Page

You may transfer to the next or previous page in the diagram. The order is specified according to the listing order in the Edit Pages dialog (see Figure 19 on page 54).

To transfer to the next or previous page:

Transferring to the First Page

To transfer to the first page of the diagram:

Select the First menu choice from the Pages menu. You are transferred to the first page of the diagram.

Transferring to the Last Page

To transfer to the last page of the diagram:

Select the Last menu choice from the Pages menu. You are transferred to the last page of the diagram.

Printing a Page

SDT allows to print individual pages from the SDL Editor. You can also restrict the scope of printing to a part of the page. A number of options which affect the resulting printout are possible to specify.

How to print SDL pages is described in chapter 4, Printing Information, on page 260.

Resizing a Page

If the current size of the page does not fit your needs, you can resize it.

To resize a page:

  1. Make sure the SDL Editor is showing the page you want to resize. If not, transfer to the page to resize (see "Transferring to a Page" on page 62).
  2. Select the Drawing Size menu choice from the Edit menu. A dialog is issued, showing the current width and height:
    Figure 28 : Adjusting the Page Size. 
    -----
    (fig)  
           
    -----
    
  3. Type in the new values. You must specify new values that are at least as large as stated. Click OK to apply the new values.
    ----------------------------------------------------------------------
    Note:                                                                   
    If you enlarge a page so that the page size becomes wider or larger     
    than the physical page size defined in the Print Options, your print    
    outs will require more pages than before, if you use a fixed printout   
    scale.                                                                  
    We recommend you to enlarge pages with restraint.                       
    ----------------------------------------------------------------------
    

Managing Windows

Each SDL Editor window shows one SDL page. The SDL Editor is a multi-window tool, allowing you to open new windows on a page and close windows that are no longer needed.

A newly opened window is a mirror image of the window from which the selection to open a window was made. Multiple windows may be opened (one at a time) and are all the same as the original. Any subsequent modifications made will reflect the same in either the original window, or any of the newly opened window(s). This option affords the possibility of viewing in more than one window, and can ideally be used in conjunction with the scaling factor when looking at a detailed page.

The window managing functions you can perform are:

Opening a New Window

To open a new window:

  1. Go to the window from which you want to open a window.
  2. Select New Window from the Window menu. The replicated window is opened almost instantaneously, and its screen position is offset from the window from where it was activated.
This command overrides the Always new Window option of the Editor Options dialog from the View menu, when it is toggled to the off position.

Closing a Window

To close a window:

  1. Go to the window you wish to close.
  2. Select Close Window from the Windows menu.

Hiding and Showing Parts of the SDL Editor Window

The various component parts of the SDL Editor window can be shown or hidden as required. If they are hidden, it increases the drawing area available to be used in the creation or modification of pages of a diagram.

All the available options for hiding and showing parts of the window can be found in the dialog box accessed via the Window Options command on the View menu - see Figure 29. All of these options can also be set as preferences.

Figure 29 : Selecting Window Options. 
-----
(fig)  
       
-----

Opening a Grammar Help Window

See "Opening the Grammar Help Window" on page 130 for this operation.

Opening a Signal Dictionary Window

See "Opening the Signal Dictionary Window" on page 135 for this operation.

This page intentionally left blank

 
Table of Contents Next Chapter