Author Topic: Class without relationships  (Read 5928 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Class without relationships
« on: March 05, 2016, 01:48:25 am »
Is there a way to automatically higlight (change its colour) classes in diagram without relationships to any other classes?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Class without relationships
« Reply #1 on: March 05, 2016, 02:03:28 am »
Not OOTB, but you could of course write a little script to do that.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Class without relationships
« Reply #2 on: March 05, 2016, 02:28:38 am »
Or a query which looks for elements in t_object which have count 0 for their object_id in either end of t_connector.

q.

P.S. Try
Code: [Select]
SELECT * from t_object o WHERE (select count(c.Start_Object_ID) from t_connector c where c.Start_Object_ID = o.Object_ID) = 0 AND (select count(c.End_Object_ID) from t_connector c where c.End_Object_ID = o.Object_ID) = 0You might wish to reduce to certain object types.
« Last Edit: March 05, 2016, 02:34:29 am by qwerty »

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Class without relationships
« Reply #3 on: March 10, 2016, 02:21:09 am »
Not OOTB, but you could of course write a little script to do that.

Geert
Or a query which looks for elements in t_object which have count 0 for their object_id in either end of t_connector.

q.

P.S. Try
Code: [Select]
SELECT * from t_object o WHERE (select count(c.Start_Object_ID) from t_connector c where c.Start_Object_ID = o.Object_ID) = 0 AND (select count(c.End_Object_ID) from t_connector c where c.End_Object_ID = o.Object_ID) = 0You might wish to reduce to certain object types.
Thanks to both, where can I find an example of how to do this with a script?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Class without relationships
« Reply #4 on: March 10, 2016, 03:07:15 am »
Depends on what you want to do with the script. To create a search you can simply create this with the search builder.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Class without relationships
« Reply #5 on: March 10, 2016, 05:16:31 am »
There isn't really a script that does what you need, but I have open sourced all of my scripts here:
https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library

Also look at the EAScriptLib MDG technology and the samples provided by Sparx.

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Class without relationships
« Reply #6 on: March 19, 2016, 03:53:30 am »
There isn't really a script that does what you need, but I have open sourced all of my scripts here:
https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library

Also look at the EAScriptLib MDG technology and the samples provided by Sparx.

Geert
Thanks Geert very useful.