DiagramStyles - Helmut-Ortmann/EnterpriseArchitect_hoTools GitHub Wiki
Diagram Style (bulk change)
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 with one Click Diagram Styles - recursive package and more. Your library of Styles is stored in Settings.Json and hoTools ships with a reasonable default library you can easily access and adapt via the File Menu.
You can change:
- Diagram Style/Theme
- Diagram Nodes/Objects Style
- Diagram Link/Connector Style
- Show hidden connectors in e.g. cromson and later easily hide them by:Diagram Link/Connector Style
- Mark nodes with missing links
by
- Do Menu, Bulk Change..
- Button on Toolbar (configurable)
- Key (configurable)
for
- 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.
If you want to use different Diagram Styles in different circumstances you can bulk change Diagram Style by hoTools. The features are:
- Select Package, Element, Diagram
- Menu, Do, Bulk change Diagram/Theme Recursive
- Menu, Do, Bulk change Diagram/Theme
- 2 General Diagram Styles to use with Toolbar(Buttons)
- 2 General Diagram Styles to use with Keys
- Define arbitrary amount of Diagram Styles
- Define Diagram Styles in Settings.json
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 two services
- Bulk change Diagram to 'Style 1'
- Bulk change Diagram to 'Style 2'
by
to a Key to quickly apply the changes.
Configure
- Diagram Styles on Toolbar
- Diagram Styles on Key
- c:\users\user\AppData\Roaming\ho\hoTools\Settings.json Styles for Diagram, Diagram Nodes, Diagram Links
- EA: Layout, Style (EA Layout Styles you may use for Fonts, Colors, )
Example
{
"Name": "Diagr1 (simple, with Notes)",
"Description": "Simple:\r\n-Notes\r\n-No Attributes\r\n-No Operations\r\n-Don't show Namespace\r\n- Alias\r\n- Scale diagram to fit one page",
"Type": "Types=Component,Logical; Stereo=ab; Cust=Block;",
"PDATA": "PPgs.cx=1, PPgs.cy=1, ScalePI=1,PSize=1, HideAttr=1, HideOps=1, UseAlias=1",
"StyleEX": "ShowNotes=1;",
"Property": "ShowForeign=False;Orientation=P;ShowBorder=True;ShowDetails=1;"
},
{
"Name": "Diagr2 (elaborate, without Notes)",
"Description": "No Attributes, Notes\r\n- Show Namespace\r\n- No Alias",
"Type": "Types=Component,Logical; Cust=Block;",
"PDATA": "HideAttr=1, HideOps=0, UseAlias=0",
"StyleEX": "ShowNotes=0",
"Property": "Orientation=P;ShowForeign=True;ShowBorder=False,cx=160,cy=220;ShowDetails=0;"
},
{
"Name": "My Requirements",
"Description": "No Attributes, Notes",
"Type": "Cust=Requirements",
"PDATA": "HideAtts=0, HideOps=0, OpParams=2, ShowOpRetType=1, PPgs.cx=1, PPgs.cy=1, ScalePI=1",
"StyleEX": "ShowNotes=1",
"Property": ""
},
{
"Name": "My Test Domain",
"Description": "Theme=Parchment\r\n- Hide operation\r\n- Scale to fit one page\r\n- No Notes",
"Type": "Cust=Test",
"Pdata": "HideAtts=1, HideOps=1, PPgs.cx=1, PPgs.cy=1, ScalePI=1, Theme=Parchment:113",
"StyleEX": "ShowNotes=0",
"Property": ""
},
{
"Name": "My special Diagrams (User, Documents)",
"Description": "My special Diagrams:\r\n-User\r\n-Documents",
"Type": "Cust=User, Cust=Document",
"Pdata": "HideAtts=1, HideOps=1, PPgs.cx=1, PPgs.cy=1, ScalePI=1",
"StyleEX": "ShowNotes=1",
"Property": ""
},
{
"Name": "My special Diagrams (User, Documents)",
"Description": "My special Diagrams:\r\n-User\r\n-Documents",
"Type": "Cust=User, Cust=Document",
"Pdata": "HideAtts=1, HideOps=1, PPgs.cx=1, PPgs.cy=1, ScalePI=1",
"StyleEX": "",
"Property": ""
}
Location
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 for:
- Type Diagram Type
- PDATA Column PDATA in t_diagram
- StyleEx Column StyleEx in t_diagram
- Properties EA Property (somehow redundant to PDATA/StyleEx)
Sometimes you can achieve the same effect with PDATA/StyleEx or Properties.
hoTools apply diagram styles in the following sequence:
- PDATA/StyleEx
- 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
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
Diagram type:
A list of comma(semicolon separated strings to match the EA/MDG Diagram Type. Customer Diagrams have the prefix: 'Cust='.
Nothing means all diagrams. You only need to use a matching part of the whole Diagram name. E.g.:
- 'Cust=Requirement' instead of 'Cust=MDGDgm=Extended::Requirements'.
You can find the full Customer Diagram Type in the column 'StyleEx' of table 't_diagram'.
Some EA Diagram Types:
- Standard
- Activity
- Logical
- Sequence
- Custom
- Cust=MDGDgm=SysML1.4::BlockDefinition
- Cust=MDGDgm=SysML1.4::InternalBlock
- CustMDGDgm=Extended::Business Modeling
- Cust=MDGDgm=Extended::Test Domain
- Cust=MDGDgm=Extended::Dashboard
- Cust=MDGDgm=Extended::Data Modeling
- Cust=MDGDgm=Extended::Maintenance
- Cust=MDGDgm=Extended::ModelDocument
- Cust=MDGDgm=Extended::Requirements
- Cust=MDGDgm=Extended::User Interface
Properties
The Property styles are linked to EA API functions or SQL. For details see the EA API Description of 'Diagram Class'.
- cx=nnn; X deminsion of the diagram (default=800)
- cy=nnn; Y deminsion of the diagram (default=1100)
- HighLightImports=bool; (true or false)
- Orientation=x; (L=Landscape, P=Portrait)
- Scale=nnn; (default=100=100%, looks that it needs a reload of the project)
- ShowBorder=bool; (true, false)
- ShowDetails=n; (1=Show, 0=Hide)
- ShowForeign=n; (Namespace: 0= don't show if foreign, 1= show if foreign
- ShowPackageContents=bool; (true, false)
- ShowPrivate=bool; (true, false)
- ShowProtected=bool; (true, false)
- ShowPublic=bool; (true, false)
PDATA
Have a look in the table t_diagram column 'PDATA' for possible values. If there is also an 'Advanced' Style prefer this one.
Note: hoTools update the existing content in columns PDATA/StyleEx. It don't add not existing styles to the columns PDATA/StyleEx.
Currently you can put the styles in PDATA or StyleEx. This maybe change later.
- "HideAtts=1" Hide Attributes
- "HideOps=1" Hide Operation
- "HideProps=1" Hide Properties
- "HideParents=1"
- "HideRel=1" Hide Relationships
- "HideStereo=1 Hide Stereotypes
- "HideEStereo=1 Hide Extended Stereotypes
- "OpParams=2" 0=no Type, no Name, 1=Name, 2=Type and Name
- "PPgs.cx=1" Pages in x direction
- "PPgs.cy=1" Pages in y direction
- "ScalePI=1" Scale to fit one page
- "ShowCons=0"
- "ShowIcons=1"
- "ShowShape=1"
- "ShowSN=0"
- "ShowTags=0"
- "ShowReqs=0"
- "SuppCN=0"
- "UseAlias=1"
StyleEx
Have a look in the table t_diagram column 'StyleEx' for possible values.If there is also an 'Advanced' Style prefer this one.
Note: hoTools update the existing content in columns PDATA/StyleEx. It don't add not existing styles to the columns PDATA/StyleEx.
Currently you can put the styles in PDATA or StyleEx. This maybe change later.
- "AdvancedElementProps=1"
- "AdvancedFeatureProps=1"
- "AdvancedConnectorProps=1"
- "AttPkg=0"
- "DocAll=0"
- "ExcludeRTF=0"
- "HideQuals=1" Hide Qualifier
- "ShowAsList=1"
- "ShowMaint=0"
- "ShowNotes=1" Show Notes
- "ShowOpRetType=1"
- "ShowTests=0";
- "SuppressedCompartments=
- "SuppConnectorLabels=0"
- "Theme=:119" Thema and the list of applied features (119)
- "VisibleAttributeDetail=0" Type+Name"
- "VisibleAttributeDetail=1" Name"