Displaying items by tag: querybuilder

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