Book a Demo

Author Topic: Find elements not used at any diagram to delete  (Read 5803 times)

Matej

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Find elements not used at any diagram to delete
« on: November 19, 2012, 11:45:39 pm »
Hi,

I would like to clean my model as it contains many "zombie" elements that aren't used on any of the diagrams that were created during initial phases of the analysis.

Is it somehow possible to get a summary list of elements with their use on diagrams and their relationships so I can figure out quickly which elements aren't used anywhere, do not have any special meaning for the project, and can be safely deleted?

Note: Recently I've learned that using Ctrl-Del on Diagram will completely delete the element from the diagram as well as from the model. That works for newly elements. Now I would like to clean-up the historical stuff.

Thanks and regards,
m

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Find elements not used at any diagram to delet
« Reply #1 on: November 20, 2012, 12:41:28 am »
Use the search "Find Orphans"

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Find elements not used at any diagram to delet
« Reply #2 on: November 20, 2012, 03:00:36 pm »
Geert has the answer, but be aware that it is perfectly valid to have elements in your model that do not appear in any diagram.
The Sparx Team
[email protected]

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Find elements not used at any diagram to delet
« Reply #3 on: November 20, 2012, 06:43:44 pm »
Be aware of:
  • used types (attribute, operations, parts, instances, ports, trigger..)
  • inheritance
  • etc.

Therefore I made a query to find all usages of an element. Usage in diagrams (orphanes) is often not enough.

It all depends on your modelling method.

Kind regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

bctm

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Find elements not used at any diagram to delet
« Reply #4 on: December 03, 2012, 10:58:37 pm »
Would be nice if you would share your solution, Helmut.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Find elements not used at any diagram to delet
« Reply #5 on: December 03, 2012, 11:21:04 pm »
Hi,

thanks for your advice.

I am going to share the solution in the community. It consists of a query and a little script to have the query on your finger tip.

Kind regards,

Helmut

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)