DiagramGeneralStyles - Helmut-Ortmann/EnterpriseArchitect_hoTools GitHub Wiki

Diagram Style General

Sounds familiar?

  • You have some standardized Diagrams
  • You want to ensure same look and feel of your different Diagram types
  • You want to highlight something by Color, Font, LineWidth,
  • Mark nodes with missing links
  • Visualize Hidden Links in e.g. red and let the Links disappear after scrutinizing them
  • Setting Style based on conditions like Type, Stereotype,

Ensure your Look and Feel by just a few clicks.

General

Change Layout Styles with one Click from your library of Styles - for selected .. or for a whole package.

Your library of Styles is stored in Settings.Json and hoTools ships with a reasonable default library you can easily access and adapt. For Styles regarding Font, Color, reference your existing EA Layout Styles.

Edit EA Layouts for Nodes and Links with EA and apply them to a bunch of nodes or links.

You can change the Style:

by

  • Do Menu, Bulk Change,
  • Button on Toolbar (configurable)
  • Key (configurable)

for selected

  • Diagram, Package, Element, Node, Link
  • Recursive
  • Selected only (direct or indirect)
  • Type to specify what to change (Type, Stereotypes)

It's like:

  • Changing the EA Diagram Properties (F5, Double Click) in Diagram
  • Diagram Object Features (Shft+CTRL+Y on Node/Diagram Object)
  • Appearance and more for a Link/Connector

You can define your library of Styles in Settings.json to apply standard visualization.

Diagram Style/Theme via Menu

Diagram Style/Theme via Button

You may assign the two services

  • Bulk change Diagram to 'Style 1'
  • Bulk change Diagram to 'Style 2'

by

to a Button to quickly apply the changes.

Diagram Style/Theme via Key

You may assign the services

  • Bulk change Diagram to 'Style 1'
  • Bulk change Diagram to 'Style 2'

by

to a Key to quickly apply your changes.

Configure

Example

Example for Diagram Objects/Nodes:

{
  "Name":        "Notes, Public Operations, Class",
  "Description": "Notes\r\nNo Protected,Private Operations\r\nTags",
  "Type":        "",
  "Style":       "Notes=1000;OpPro=0;OpPri=0;OpPkg=0;",
  "Property":     ""
},
{
  "Name":        "Tags",
  "Description": "No Notes\r\nNo Operations\r\nNo Attributes\r\nTags",
  "Type":        "", 
  "Style":       "HideIcon=0;AttPri=0;AttPkg=0;AttPro=0;AttPub=0;AttCustom=0;OpCustom=0;OpPro=0;OpPri=0;OpPkg=0;PType=0;RzO=1;",
  "Property":    ""
},
{
  "Name":        "Wrap Features",
  "Description": "Wrap Features",
  "Type":         "", 
  "Style":        "HideIcon=0;RzO=2;",
  "Property":     ""
},
{

  "Name":         "Resize Features",
  "Description":  "Resize Features",
  "Type":         "", 
  "Style":        "HideIcon=0;RzO=1;",
  "Property":     ""
},
{

  "Name":        "ObjStyle1",
  "Description": "According to EA ObjStyle1",
  "Type":        "", 
  "Style":       "",
  "Property":    "EaLayoutStyle=ObjStyle1;"
},
{

  "Name":        "ObjStyle2",
  "Description": "According to EA ObjStyle2",
  "Type":        "", 
  "Style":       "",
  "Property":    "EaLayoutStyle=ObjStyle2;"
}

Location

EA Layout Styles

EA supports Layout Styles (Layout, Style) with:

  • Font
  • Colors (Line, Font, Background)
  • Bold, Underline, Italic
  • You can store them assign them to Diagram Objects/Nodes or Links/Connector.

hoTools

You find the configuration:

  • c:\users\<user>\AppData\Local\Apps\hoTools\Settings.json Delivery settings
  • c:\users\<user>\AppData\Roaming\ho\hoTools\Settings.json Current settings

General

You can use comma/semicolon separated lists in Settings.Json to define Styles:

Only Diagrams:

  • StyleEx Style according to EA StyleEx Style
  • PDATA Sstyle according to EA Extended Diagram Style

Sometimes you can achieve the same effect with PDATA/StyleEx or Properties.

hoTools apply diagram styles in the following sequence:

  1. Style
  2. PDATA/StyleEx (only Diagram, not Nodes and Links)
  3. Properties Proprties may change StyleEx or PDATA

My preffered way to find the right solution (if no obvious):

  • Make a new project
  • Change style with EA Diagram properties
  • SQL: select pdata, styleEx from t_diagram
  • Compare
  • Before Change in EA
  • After Change in EA

Try: File, Settings 'Bulk change Diagram Style' to see real world examples.

Name

hoTools shows the Name in dialogs to set the Diagram Style

Description

hoTools shows the Description as Tooltip. It's also a good idea to have a bit of documentation.

Use '\r\n' if you want LineFeeds.

Type

Define the Types for which you want to apply your Style.

Examples:

  • "Types=Association,Dependency;"
  • "Stereotypes=a,b;"
  • ""

Style

EA stores the Style of Nodes/Objects in t_diagramObjects and Links/Connectors in t_diagramLinks. Here you can define values for single styles to add or change to existing styles. EA stores Diagram Styles in t_diagram in column PDATA, StyleEx

Examples:

  • "LWidth=3, Color=green " Color
  • ""
  • Notes=1000,Formatted=1"

Diagram Styles

EA stores Diagram Styles i PDATA and StyleEx. See:

Be aware: The Database only supports a limited amount of styles. So, it's possible that you get an error message while changing.

PDATA

StyleEx

Properties

EA supports a lot of Styles via its API. I call them Properties. See:

Examples:

  • "Property": "EaLayoutStyle=ObjStyle2;"
  • "Property": "ShowPackageAttributes=True; ShowPrivateAttributes=false, ShowProtectedAttributes=false, ShowPublicAttributes=false"
  • "Property": "LineStyle=9, IsHidden=False, LineColor=#900, HiddenLabels=false, LineWidth=2"
  • "Property": "ShowPackageAttributes=True; ShowPrivateAttributes=false, ShowProtectedAttributes=false, ShowPublicAttributes=false"

For Colors & Fonts you may use the EA Layout Styles.

Color

You can express colors by:

  • Integer (Blue256256) + (Green*256) + Red, RGM scheme
  • Heaxadical #BBGGRR (B=blue, G=green, R= red), RGB scheme
  • Color names (red, crimson,..) see

Often it's easier to use the EA Layout Styles with the Property:

  • "Property": "EaLayoutStyle=ObjStyle2;"

References