Book a Demo

Author Topic: Instance Count  (Read 4413 times)

jdavid

  • EA User
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
Instance Count
« on: March 20, 2013, 05:05:52 am »
When you drop an object on a diagram and create an instance of that object is there any way that you can get a count of the number of instances.

Example: I have an component: MicroSoft Server 2012 R2, that I can create multiple instances of on my deployment diagrams. Can I get a count of the number of instances of MicroSoft Server 2012 R2 I have in the project.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Instance Count
« Reply #1 on: March 20, 2013, 07:51:16 am »
Select the element and press Ctrl-u. That will show the diagrams in which it is used.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13510
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Instance Count
« Reply #2 on: March 20, 2013, 06:36:47 pm »
The easiest is probably with an sql search.
I have an SQL search called "Instances by ClassifierName"
Code: [Select]
select instance.ea_guid as CLASSGUID,instance.Object_Type as CLASSTYPE,instance.name as Name,
classifier.name as ClassifierName ,package.name as PackageName ,package_p1.name as PackageLevel1,
package_p2.name as PackageLevel2,package_p3.name as PackageLevel3
from (((((t_object instance
inner join t_object classifier on instance.classifier = classifier.object_id )
inner join t_package package on instance.package_id = package.package_id)
left join t_package package_p1 on package_p1.package_id = package.parent_id)
left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
where classifier.name like '<Search Term>'

Geert

jdavid

  • EA User
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
Re: Instance Count
« Reply #3 on: March 21, 2013, 06:09:52 am »
Thanks Geert, that was just what I was looking for