Enterprise Architect version 13.5

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook google plus twitter youtube linkedin

We have often to do with EA models we’ve never seen before. In such cases, you have either to click through the project tree (can be confusing and time-robbing) or you use some pre-defined Model Views.

The picture bellow shows how it could look like on your machine when you’ve read the article to the end.

Model Views - Diagrams

The feature could be very helpful also in other situations and we wonder why it’s used so rarely. Using Model Views you can create access points to any elements you want independently from its position in the project browser. It can be compared with database views if you are familiar with databases.

The only thing which is a bit annoying while creating a view, you have to create a model search first. If you use the Query Builder, the created search can be used as a basis for a view without any problems. In case the functionality of the Query Builder is insufficient and you need to create an SQL query, it has to fulfill some criteria. Within your query, you need to define three fields: CLASSGUID, CLASSTABLE and CLASSTYPE, as shown in the following example:

SELECT ea_guid AS CLASSGUID, 't_diagram' as CLASSTABLE, Diagram_Type AS CLASSTYPE, Name, [Version], Author, Stereotype, CreatedDate, Diagram_Type, ModifiedDate
FROM t_diagram
WHERE t_diagram.Diagram_Type = 'Statechart'
ORDER BY ModifiedDate ASC

Diagram Views help a lot to explore unknown projects. Thus, we have created views for all common diagram types.

Feel free to download and to use them: Searches and Views

First step – open Model Search / Find in Project dialog and import the xml file that contains the definition of searches:


Model Views - Import Searches

 

Second step – activate Model Views window and import the xml file that contains the definition of views:


Model Views - Import Views

Enjoy!

Published in Community Resources
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,
Published in Community Resources