How to change or set default style or size for a symbol or depiction on a diagram in Rational System Architect

Technote (FAQ)


Question

How do you change or set the default symbol or depiction style or size on a diagram to display as "conventional" or "Adornment" or "depiction" in IBM Rational System Architect (SA)?

Cause

Cause #1: Your symbol size or style or depiction may have changed after an upgrade. Since SA version 11.4.2 the default depiction style for existing or newly drawn symbols is a rectangle or square shape as referred to in the flash alert, 1632185: Upgrade causes existing symbols to not display as depictions in Rational System Architect
Cause #2: Prior to SA version 11.4.2 there was no way of setting the default symbol or depiction style. There is a new feature since the release of SA version 11.4.2 that will gives you the ability to change this.


Answer

For cause #1:

If your existing symbols on existing diagrams have changed after an upgrade you may run the following code in a Microsoft Visual Basic for Applications (VBA) macro. Please ensure that you have a backup of the encyclopedia before proceeding so that you can reverse the changes if desired.

If you are not familiar with running VBA macros in SA; the guidelines may found in the Running VBA Macros help page.

Private Sub SetSymbolDepictionStyle()

    Dim oDgms As SAObjects
    Dim oDgm As Diagram
    Dim oSyms As SAObjects
    Dim oSym As Symbol
       
    Set oDgms = Application.Encyclopedia.GetFilteredDiagrams("", 88) '88 = Network Concept
    oDgms.ReadAll
   
    For Each oDgm In oDgms
        oDgm.Show
        Set oSyms = oDgm.GetAllSymbols
        oSyms.ReadAll
        For Each oSym In oSyms
            oSym.SetField SYMFLD_BOTHERSYMBOLOGY, "1" 'Set the symbol style to: depiction (1) stereotype (-1) adornment (0)
            oSym.Save
        Next
        oDgm.Save
        oDgm.Hide
    Next
    End Sub

This is coded to open all Network Concept diagrams and change all symbols on it to use the depiction symbol style. (For new symbols by default it will still be the rectangle, so you would have to set the depiction, and save and impose the style, or run the macro again). You may of course modify and use the above example code for other diagrams.

For cause #2:

For general maintenance: There are many parts to this depending on what you wish to achieve.

  • To modify the default depiction for the current symbol.
  • To modify the default style for the current symbol.
  • To modify the default style or depiction for all new symbols of the same type.
  • To modify the default for the current and any future sessions.
  • To modify the entire diagram for all symbols of the same type.
  • To modify other diagrams to impose the size and/or style.

To modify the default depiction for the current symbol.

  1. Right clicking on a symbol (also by Format\Symbol\Symbol Style\Depiction Style button)
  2. Select the Symbol Style
  3. Notice the new button depiction style and push it
  4. Set the depiction style to one of the following
    • Normal
    • Adornment
    • Depiction
  5. Click OK
  6. Save the diagram.

To modify the default style for the current symbol.

  1. Right clicking on a symbol (also by Format\Symbol\Symbol Style\Depiction Style button)
  2. Select the Symbol Style
  3. Click OK
  4. Save the diagram.

To modify the default style or depiction for all new symbols of that type.

  1. Select your symbol style or depiction style
  2. Tick the box in "set" in "Symbol Style or "Depiction style"
    This will set the depiction style for that symbol and for any new symbols of that type that are drawn onto the diagram. In other words, the default setting is changed by that action. When you draw a new symbol of the same type, that depiction style will be used. The depiction style will be recorded in the style sheet (AUTOEXEC.STY file in the encyclopedia) - you will be prompted to save it when you try to close System Architect or before opening another encyclopedia. The setting for the style sheet is effective immediately but will only persist for the next use of the encyclopedia if it is saved.
  3. click OK
  4. Save the diagram.

To modify the default for the current and any future sessions.

  1. Modify the style as above.
  2. When you try to close System Architect or before opening another encyclopedia you will be prompted to save the AUTOEXEC.STY file so save it because the setting for the style sheet is effective immediately but will only persist for the next use of the encyclopedia if it is saved.

To modify the entire diagram for all symbols of the same type:
  1. Select one symbols
  2. Right click
  3. Click "Select all symbols"
  4. Click the "Display all symbols conventionally" (or the option you require)
  5. Save the diagram.

To modify other diagrams to impose the size and/or style you set : You can also set the symbol size and optionally do it for all symbols (both depiction and/or size) and apply to other diagrams as follows:
  1. Open a diagram.
  2. Adjust a symbol size.
  3. Right-click the symbol and select "Symbol Format \ Symbol Style..."
  4. Check: 'Set - Size' (and for example 'Set - Depiction style' can be done at this time too)
  5. Press "OK"
  6. Repeat steps 2-5 for each symbol type
  7. Open a diagram
  8. Use 'Ctrl-A' (this will select all symbols on a diagram)
  9. Select "Format \ Stylesheet \ Impose style'
  10. Repeat step 7-9 for each diagram

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational System Architect
Documentation

Software version:

11.4.2, 11.4.2.1, 11.4.2.2, 11.4.2.3, 11.4.2.4, 11.4.2.5, 11.4.2.6, 11.4.2.7, 11.4.3

Operating system(s):

Windows

Reference #:

1600114

Modified date:

2014-07-22

Translate my page

Machine Translation

Content navigation