Book a Demo

Author Topic: <<block>> definition stereotype & it's usage search  (Read 9905 times)

SystemsTinkerer

  • EA User
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
<<block>> definition stereotype & it's usage search
« on: February 05, 2022, 10:35:01 pm »
Hi Friends,

Hope all is well.

I need some idea on how to search for say a <<block A>> and it's usage location of which diagram it has been utilised in?

I know CTRL-u for a particular block on the diagram gives that information but how can this be done for all the block stereotypes of a model(s)/ package (recursively to include all subfolders) using SQL/JavaScript (or another)?

Thanks,
Oz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: <<block>> definition stereotype & it's usage search
« Reply #1 on: February 06, 2022, 12:25:34 am »
Sure, you can make an SQL search to search for it.

You'll want to query both direct uses, as uses where the element is used as the classifier of an instance.

Geert

SystemsTinkerer

  • EA User
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #2 on: February 06, 2022, 01:14:38 am »
Hi,

Thanks for your input! The classifier is the same as a class definition, right? and the element of usage is the instance or object so what are the reserved words for these in the DB & repository?

Thanks,
Oz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #3 on: February 06, 2022, 02:34:04 am »
A classifier is what classifies an instance. Usually that's a class. When you instantiate a class the object has this very class as classifier. Can be found in EA by Ctrl-L with the instance.

q.

SystemsTinkerer

  • EA User
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #4 on: February 06, 2022, 04:48:59 am »
Hi,

Thank you for your guidance. So when I select an element on my diagram & press CTRL-u, I get all the usages of that block element. It is showing under Usage Type: 3 cases of Classifier, and 1 of Link. I get the former (3 Classifier) is saying I am using 3 instances of same Type Class BUT what is the latter one of Link mean - isn't that also usage of an instance?

CTRL-L is showings me the main definition block, which is a cool feature - thanks.

Cheers

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #5 on: February 06, 2022, 08:19:10 pm »
The type Link is the classifier (the class) itself and the type Classifier is where the link is used as classifier for an instance.

q.

SystemsTinkerer

  • EA User
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #6 on: February 06, 2022, 10:13:11 pm »
The type Link is the classifier (the class) itself and the type Classifier is where the link is used as classifier for an instance.

q.
Hi q, thanks for your input. Thank you for confirming the Link as being the link to the class itself. About the typed Classifier showing up in the CTRL-U search, it is showing all "instances" which are typed by the same Class - so these are all elements of usage! The Link in contrast is strictly speaking not an element of usage but another reference (from multiple diagrams) pointing to the same class defined in one place in the project browser.
Correct?

Cheers

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #7 on: February 07, 2022, 02:48:37 am »
Almost. Ctrl-U shows usages in diagrams. The Link will shows a usage of the class. From there you can use Alt-G to locate is in the browser. To find a classifier from the diagram you need the context menu Find/Locate Classifier.

q.

SystemsTinkerer

  • EA User
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #8 on: February 07, 2022, 06:01:02 pm »
Hi q,

Thanks for the interesting discourse  :)

Thank you for confirming. One more thing the CTRL-L function on a particular instance of usage or object is really handy as, however, instead of showing it to be where it is in the project tree on the left within the main EA space, a pop-up window shows up and shows the defined class element of that object - is there a way that it shows the location in the default project/model tree within EA?? I need this, as the reason being, from the pop-up, I cannot do anything to that element, e.g. cut and paste it at another location.

Thanks,
Oz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: <<block>> definition stereotype & it's usage search
« Reply #9 on: February 07, 2022, 06:31:17 pm »
You can use Ctrl-Alt-G to select the classifier in the project browser.

Geert

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: <<block>> definition stereotype & it's usage search
« Reply #10 on: February 07, 2022, 08:03:17 pm »
Hello SystemsTinkerer,

Just for your infomation (ad of my Add-In), the following ElementUsageEx Add-In maybe solve all your request, i.e., showing all usage of a Block or a Type, and showing in the Browser.

https://www.sparxsystems.jp/en/trace/ElementUsageEx.htm
--
t-kouno

SystemsTinkerer

  • EA User
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: <<block>> definition stereotype & it's usage search
« Reply #11 on: February 08, 2022, 04:06:48 am »
Geert, Takeshi,

Many thanks for your tips - really appreciate it! I just tried the short cut key which works and just what I was looking for.

The add-in looks really cool, so I hope the installation is straightforward and there are no licensing issues. I have an issue of getting past IT guys whenever anything needs installing so I hope the add-in is not an issue.

Best,
Oz