Enterprise Architect version 13.5

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook google plus twitter youtube linkedin

Helmut Ortmann

Helmut Ortmann

Helmut Ortmann

Freelancer (Consultant)
 
I'm a German freelancer in the area of Enterprise Architects and software/system engineering. A large part is embedded and Functional Safety with EA. But not only...
 
According to Albert Einsteins aphorism "Make things as simple as possible, but not simpler” I like to smoothen work with Addins and an easy to use EA Tool integration in a complex development environment. Another step in my opinium are lively workshops to get an enjoyable and long lasting launch of the daily EA work.
 
Well, of course that’s not all and you have therefore good reasons to contact me. See you….
 
See my hoTools WiKi at GitHub.
If you want to analyze your EA model with SQL, you should consider using LINQ to SQL. Write the query once for all your EA database types. Use the combination of SQL like syntax, modern .net languages like C#, VB, F# and the compiler to find your typos.
 
The main benefits are:
 
  • Combine SQL like query language with the power of C#, VB, or F#
  • Database independent
  • IntelliSense, AutoComplete
  • Let the compiler find your typos
Approaches
 
AddInSimple shows you:
  • How to leverage LINQ to SQL in your Add-In (Example SimpleAddIn of open source hoTools)
  • LINQPad, the off-the-shelf interactive Scratchpad
In both cases: Before you reap the power of LINQ to SQL, you have to invest some time learning.
 
 
 
Example with LINQPad:
 
The following example shows the result of a little query against the EAExample model to see the types of Requirements.

You find standard SQL somehow old, limited, difficult to learn and has a lot of dialects? You think a Compiler can find a lot of your typos, Then give LINQ to SQL a try. You have two possibilities:

  • LINQPad  as an interactive query and debugging tool, database independent, C#, F#, VB
  • Develop your Add-In with LINQ to SQL

The main advantages of LINQ for SQL are:

  • Database independent
  • Combines the benefits of SQL like and Code (C#, F#, VB)
  • IntelliSense, Autocomplete, let the Compiler find your typos
  • Powerful Debug as you know from C# & Co.
  • LINQ provides a rich Eco-System (SQL, XML to name a few)

The LINQPad:

Ready to use Scratchpad to run, debug and visualize your Find and Debug for all your EA Databases. Show the code for the above grid:



IntelliSense, Autocomplete:

Let the Compiler find your typos.



Export to Excel:

 

Steps with LINQPad:

  • Create a new connection to your EA Database
  • Assign the connection to the query at hand

 

Look inside:

  • Combine queries and Code
  • EA Databases supported
  • Arbitrary complex queries without the limitations of SQL
  • Edit, Debug, Visualize
  • C#, F#, VB, LINQ (XML, SQL,..)

Add-In with LINQ to SQL:

You find two examples to tinker with in AddInSimple (part of hoTools). In essence:

  • Determine Database and connection string
  • Run LINQ query to DataTable
  • Output DataTable to EA Model Search
  • Enjoy

The results:

Start with AddinSimple and EAExample.eap.

 

 

Control Code:

The Query:

Summary:

LINQ to SQL is the solution for complex queries:

  • Interactive query tool LINPad
  • In your Add-In to easily handle complex queries database independent
  • Database independent
  • IntelliSense and AutoComplete
  • Compiler verifies against EA Database (no typos, type safe)
  • Comprehensive debug features

From viewpoint EA user:

  • Find in EA - everything without SQL limitations
  • Verify your EA models
  • Make metrics of your EA models

Write it once and use it for all your EA databases - regardless of location or type. Just connect your query with the new Database.

References:

 

This and more you can see at https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki/LinqToSql.

 

I appreciate your experiences and feedback!

 

Kind regards,

 

Helmut

 

 

Saturday, 15 April 2017 20:35

Use C#, Java, for your VB Scripting

 Use C#, Java from your EA Context Menu:

This works for all EA Versions, even without Administration rights to install an Add-In or so.

EA Version 13 supports an IDE to develope in C# and Java with full EA API support and debugging. They name it Hybrid Scripting. You may use the EA 13 Hybrid Script environment or other IDEs. Going the first steps is easier with EA 13.

This article shows you with a little example how to use C# for your Scripting. After you have understood C#, it should be easy to use Java in a similar way. The main idea is to use a small wrapper you call within your VB Script. Of course, after you have understood it's also easy to write this little wrapper for JavaScipt/JScript. 

SPARX delivers two DLLs to use the EA API efficiently. With these DLLs, you can use the EA Hybrid development environment as well as any other IDE you like most. In other words: You can use the power of state of the art languages to perform your scripting. Integrating Scripting in EA is as easy as you know it from the well-known Scripting Languages VB Script, JavaScript, JScript. This without installing anything or needing Admin rights.

Just insert the line:

  • 'RunCommand("myLogic.exe, "", " ")'

in your VB Script and you are done with VBScript to call your C#. Java would be similar.

 

Let's make a quick example with EA Version 13 and C#:

Make an EA C# ConsoleApplication

  • Create a new EA Project
  • Create a Package ('Select and Apply Model Pattern')
    • C#, RepositoryInterface 4.0
    • c:\temp\hybrid
  • Build the Application
  • Have a look in the generated Application
    • c:\temp\hybrid\RepositoryInterface 4.0\

 

Import VBScript wrapper to call C# 

  • Configure, Transfer, Import Reference Data
  • Make EA Scripting visible 
    • Code, Scripting (you may have to refresh Scripts)
  • You see the new VB Scripts inside the ScriptGroup HybridScripting:
    • RunCommand
    • RunCommandTest

 

Run C# ConsoleApplication.exe

  • Adapt VBScript RunCommandTest
    • Adapt path to 'ConsoleApplication.exe'
  • See
    • Line:28/29 Needed references
    • Line:35      Path to *.exe which executes your logic
    • Line:36      The call of the wrapper, result contains the StandardOutput of the Script
  • Run VBScript RunCommandTest
    • Right Click on RunCommandTest
    • Run Script

 

How do you use it

There are two approaches: Generates you VB Script by inserting the the wrapper Call in the EA templates at the appropriate location. The other way is to remove the template and just call the wrapper like

'result = RunCommand("myLogic.exe, "", " ")'

instead of the using the template scuffold.

Under the hood

EA delivers the two dlls:

  • Interop.EA.dll
  • SparxSystems.Repository.dll

They expect the Process ID, first parameter, to know which EA Instance the *.exe wants to use. So, RunCommands makes:

  • Estiminate the own Process ID
  • Call 'RunCommand...'
  • Reads the Standard output from your *.exe
  • Returns to Standard output to the caller

Inside the *.exe you have full access to the EA API.

JavaScript, JScript, Java?

With this example it's easy to migrate 'RunCommand' to JavaScript or JScript. Remember, you can use every Language supported by EA and every IDE you like most.

References

 

Abstract

You have a diagram, and you want to show or hide:

  • Port, Activity Parameter, Action Pin
  • Label of Port, Activity Parameter or Action Pin
  • Type of Port

Select the nodes where you want to show or hide, click on the appropriate hoTools Button and hoTools will do the rest.

 

Description

Ports are powerful means to define a structure with specified points of interactions (Ports). The Port type is the specification of the interaction point. It also works for:

  • UML Port
  • SysML Block, Part, Port
  • Activity Parameter (no type hide/show supported)
  • Action Pin (no type hide/show supported)

Select:

  • Nothing on the diagram to run on the whole diagram
  • Nodes you want to perform the show/hide operation

Buttons

  • SP Show Port, Parameter, Action Pin
  • HP Hide Port, Parameter, Action Pin
  • SPL Show Port, Parameter, Action Pin Label
  • HPL Hide Port, Parameter, Action Pin Label
  • SPT Show Port Type
  • HPT Hide Port Type

Advanced Features

  • Move selected ports
  • Explore the WiKi for mode information.

 

 

 

 

Installation

The easiest way is to go to GitHub, and load the current release of hoTools. At GitHub you can also find a WiKi.

The procedure:

  • You need local administration rights to install an EA Addin
  • Load hoTools2.1.1.msi from Github or the attachment
  • Deinstall an older release of hoTools
  • Run  hoTools2.1.1.msi

References

 

I appreciate your feedback !!

 

 

Abstract

Build your EA SQL Query with a tabbed editor. Load and Save it to your file system. Use elaborate Macros to access EA features like #CurrentItemID#, DiagramSelectedElements_IDS#, .. Everything tuned to make it easy and to concentrate at the job of hand. Even Conveyed Items on a connector are easy to handle.

Just right click in the Editor and 'Insert Macro, Template, Recent File,..'.

You want to use your beloved Editor. Just do it. The SQL are saved to file and hoTools recognizes changes made outside.

 

Features

  • Tab editing
  • Macros, Insert Macro from a list
    • #Branch#, #Package#,#DiagramElements_IDS#, #DiagramSelectedElements_IDS#, #CurrentItemID#,#CurrentItemGUID#
    • #ConnectorID#, #ConveyedItemsIDS#, 
    • Comments // my lovely Comment
    • DB specific section easy without remembering the syntax
  • Templates, Insert Template from a list
  • Wild Card support without doind anything as to write your beloved '*' or so. It will be converted according to current DB
    • Just use *,?, %,_,^or ! (hoTools translate sit to your database)
  • Recent File
  • Undo/Redo
  • Keys
    • CTRL+L Load from File
    • CTRL+R Run SQL
    • CTRL+S Store
    • CRRL+SHIFT+S Store all
  • Help (just a click from you)
    • Tooltips
    • Get Error of SQL
    • Get SQL as sent to EA 
  • Configurable
  • A lot more to find out

Gallery

Main Window

Run SQL

If you have a <Search Term> enter it and run (Click on Button or CTRL+R). Remember: Unde Menu Help you find:

  • SQL Error with one click
  • SQL sent to EA with one click

The results are schown in EA Model Search Window.

 

Load Tab from recent files

 

Insert Macro

Insert Template

Insert Macro

Tooltips

Installation

  • run hoTools2.02.msi (attachment or GitHub)
  • .NET 4.5 or greate
  • Enterprise Architect 9.0 or greater
  • Local administration rights

More

Thanks to Geert Bellekens who gave me lot of ideas and code from his great NAVIGATOR!

Your advice is appreciated!

 

Sunday, 17 January 2016 16:42

Script move/delete items from Search Result

Delete or move elements to package which are found by Searches (SQL, Query Builder, Standard Searches). These vbscripts allow you to easily handle found elements and to develop your own vbscripts to manipulate found things. In effect these scripts use bookmarked or elements copied to clipboard. It's an extension fo Geert Bellekens VBScripting Library.  

Abstract:

  • Use SQL Searches to move or delete found elements, diagrams or packages copied to Clipboard
  • Use Bookmarked elements from e.g. Standard / QueryBuilder Searches to move or delete elements
  • Handle bookmarked or result of SQL searches with your individual script

These scripts are using Geert Bellekens Script Framework (powerful!, Open Source)

  • See also there for updates, folder ho

 

Standard Search / Bookmark:

  • Set bookmarks
    • e.g. by Standard Search
  • If move: Select target package in ProjectBrowser 
  • Run Script:
    • hoModelSearch, DeleteBookmarkedItems or
    • hoProjectBrowser, MoveBookmarkedToSelectedPackage

 

Standard Search / Clipboard:

  • Run SQL Search 
    • each row shall contain GUID of the items to handle
  • Copy wanted rows to clipboard (eg: CTRL+A, CTRL+C)
  • If move: Select target package in ProjectBrowser 
  • Run Script:
    • hoModelSearch, DeleteClipmarkedItems or
    • hoProjectBrowser, MoveClipmarkedToSelectedPackage

 

In Action: Delete item found by SQL Search or Query Builder Search

  • Run SQL Search with element GUID as result / Run Query Builder Search
  • Copy to Clipboard (SQL Search / Bookmark (Query Builder Search)
  • Run Delete ClipboardedItems /  Delete BookmarkedItems

Delete clipboarded items from a SQL search

 

Move items found by SQL Search to package

  • Copy found elements to Clipboard
  • Select Package, Right Click, Scripts,...

 

Move bookmarked items
(
bookmarked in eg. Diagram or found by Standard Search / Query Builder Search) to selected package)

 

  • Run Standard Search or Query Builder Search
  • Bookmark wanted elements
  • Select Package, Right Click, Scripts,...
  • It works 

Install

  • Project DataManagement, Import ReferenceData, Select File (Script.xml)
  • Select 'Automation Scripts'
  • Import
  • See the scripts for details:
    • ho (reusable groups to extend functionality according to your needs)
    • hoModelSearch Group of type ModelSearch
      • DeleteBookmarkedItems
      • DeleteClipboardedItems
    • hoProjectBrowser Group of type ProjectBrowser
      • DeleteBookmarkedItems
      • DeleteClipboardedItems

 

Bookmarks (see also EA help):

  • Search Window: Query Builder Results,  Right Click, Bookmark Element,
  • Diagram: Select elements, Shift + Space
  • Diagram: Select elements, Edit, Bookmark selected,
Sunday, 10 November 2013 07:57

Search & Replace

Abstract:
ho_Tools is a powerful "Find and replace" tool for texts in Elements, Diagrams and Packages. You can search recursive from a starting package or globally by a search.
It allows simple text search or powerful regular expressions to change name, note and more.

 

ho_Tools easily allows you to find & replace strings in your model. This is done by simple text comparison or with powerful regular expressions.
It works on EA elements, Packages and Diagrams and can change:
- Name
- Note
- Tagged Value
- Constraint
There are the following two operating modes:
- Search recursive from a selected package
- Use an EA Search like Simple or your own SQL search
First test the search. The Icons for the type need to be displayed to let ho_Tools work properly

If you have advices or questions feel free to contact me. 

Installation:
-Deinstall old release
-Run the ho_Tools_Setup.msi;
- Current release: https://dl.dropboxusercontent.com/u/66337741/ho_Replace/ho_Replace.zip

 

 

 Abstract:
A toolset to make every day life easier. The main functions are:

  • Set line style in diagram by just a click
  • Searches and services at Buttons / Keyboard keys
  • Navigate by click 
  • Change Author
  • Change *.xml file of a controlled package
  • Create / update Activity diagram for an operation
  • etc.

Description:

  • Quickly set line style to selected Diagram, Elements and/or Connector
    LV= Lateral Vertical
    LH= Lateral Horizontal
    TH= Tree Vertical
    etc., see tooltip
  • Quick search for class, attribute, operation
  • Navigate between structure and behavior
  • Specification (Open the links of file properties, source code, *.xml file)
  • Create Activities and Parameters for operations
  • Searches and services on buttons and keyboard keys
  • Sample Queries
  • Sample scripts at your finger tip
  • And a lot more to experience

    Have a look at the help and give it a try.

 

 

 

 

 

 

 

 

 

 

 

Installation:

You get the newest release from:

https://dl.dropboxusercontent.com/u/66337741/ho_Tools/ho_Tools.zip

  1. Run ho_tools_Setup_V1.035.msi (delete old release first)
  2. Copy ho_ToolsTechnology.xml to c:\Programme\Sparx Systems\EA\MDGTechnologies\
  3. With EA:
    Project,Import Reference Data, ... ho_Tools_Scripts.XML
Sunday, 27 January 2013 15:32

Usage of an element at your finger tip

Find Usage of an Element

The issue:

You have an element in

  • Browser
  • Diagram
  • Search Window

and you want to see where this element is used.

 

The solution:

  1. Right click on the Element (Browser, Diagram, Search Window)
  2. Scripts, Element Usage
  3. EA lists the usage of the element in the Search Window

Example Find usage of an enumeration

 

Which usages are detected?

  • class, instance, object, part
  •  type in attribute, operation
  •  usage in diagram
  • operation to Sequence, Behavior, Call Action
  • etc.

 

Which repositories are supported?

  • *.eap
  • Oracle
  • SQL Server

 

Installation:

  1. Copy hoTools.xml into ...\Sparx System\EA\MDG\Technology
  2. Open Scripting View (either in View or in Tools)
  3. Create New Scripting Groups of type: Project Browser, Diagram, Model Search
  4. Create in each group a VB Script (New VB Script) and name it “Element usage” or so
  5. Copy the Script in each group (Copy and Past the content of the existing "Find Usage" Script

 The Scripting View with the Scripts Groups and the Scripts (Copy+Paste)

 

Installation:

Set completeness marker for classes in diagrams

When seeing a class in a diagram it's unknown whether this class is shown with all its associations. This Addin modifies the  class border (bold,standard, red) of the diagram to visualize whether the class is :

  • visualized with all its model wide associations
  • visualized with all its associations of the diagram
  • incomplete visualized (hidden associations in diagram)

Prerequisites

  • Enterprise Architect 7. or later
  • Windows
  • NET Framework 3.5 or later
  • Windows rights for instalation

 

Installation 

  • Download Windows Installer
  • Unzip
  • DiagrIsComplete.msi installieren
  • Installer installs DiagrIsComplete as a Enterprise Architect Addin
  • EA, Restart, Addins, Manage Addins, Check 'Load on Startup'
  • You may explore functionality with attached EA model
  • Deinstallation like standard Windows

 

Functions

  • 'Set completeness markers..' sets the completeness markers for the choosen diagrams or all diagrams
  • 'Reset completeness markers..' resets the completeness markers for the choosen diagrams or all diagrams
  • 'Help' a short help
  • 'About'
  • The functions Set / Reset work on
    • Selected Diagram
    • Selected Package and all the diagrams contained in Package or Subpackages(recursive)
    • All diagrams of the model

 The command 'Set completeness markers' modifes the diagram:

The classifier has 'bold' border if: Classifier is visualized in diagram with all associations of the model.

The classifier has 'standard' border if: Classifier is visualized in diagram with all associations of the diagram (no hidden associations).

The classifier has 'red' border if: Classifier is visualized in diagram with hidden associations.

Involved classifier

  • Class 
  • Component
  • Interface
  • PrimitiveType
  • DataType
  • Signal

Involved associations

  • Association
  • Aggregation
  • Composition