Author Topic: Hiding Elements  (Read 13189 times)

livewireumd

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Hiding Elements
« on: October 08, 2009, 05:28:44 am »
Good Afternoon all.

I'm currently working on a script that can run through a package and "hide" all elements that don't fulfill a set of criteria. Can anyone tell me what property of the element I need to access in order to "hide" it?

Thanks...

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hiding Elements
« Reply #1 on: October 08, 2009, 08:04:58 am »
Quote
Good Afternoon all.

I'm currently working on a script that can run through a package and "hide" all elements that don't fulfill a set of criteria. Can anyone tell me what property of the element I need to access in order to "hide" it?

Thanks...
In EA, EAElements (shapes) can't, generally, be hidden.

In what context are you referring to "hidden"?  

For example, do you have a diagram for ALL the elements in a package and you which to NOT see some elements in the diagram - based on your criteria?

If so, then you need to remove them from the diagram.

EAConnectors (lines), on the other hand, can be hidden.

Does that help?
Paolo
« Last Edit: October 08, 2009, 08:06:11 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

livewireumd

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Hiding Elements
« Reply #2 on: October 08, 2009, 11:02:53 pm »
Thanks Paolo for your quick reply!

When I say hidden I want to remove them to briefly so they become invisible. Currently the only way to do this is to use the element.DeleteAt(index) method and that removes the elements that I dont want but there is no way to undo this.

I either need a command that can push an element to the back or cause it to go away (but I would want to bring it back with an undo; there isnt an obvious way to undo a Delete that a script calls). I need this to be automated though so I cannot manually do any of this and I think a script is my best bet.

Any ideas?

Thanks!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hiding Elements
« Reply #3 on: October 08, 2009, 11:42:24 pm »
Why don't you create a package "Deleted" and move all "hidden" element in there.
Just make sure you remember where they came from. If you then want to "unhide" you could move the element back to its original package.

Geert

Dave.B

  • EA User
  • **
  • Posts: 94
  • Karma: +0/-0
    • View Profile
Re: Hiding Elements
« Reply #4 on: October 09, 2009, 01:02:12 am »
If you want to do this just for report generation purposes, then why not clone the package, with the export to XMI and import XMI with strip GUIDs method, and then delete from the clone the things that you want to prune from it. When you've generated the report you then simply delete the clone package. Thus leaving the original package unaffected.

Regards
Dave B.

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: Hiding Elements
« Reply #5 on: October 09, 2009, 08:21:09 am »
I think what livewireumd is asking for is to be able to use Sparx Enterprise Architect in an innovative manner - for direct communication of architecture knowledge.

As in - not creating an offline report - but standing up in front of a room full of decision makers - using Sparx EA live on a data projector - as a presentation and communication tool.

"Here are ALL of the <objects> ... "

"Here are ONLY the objects that relate to <domain A>"

"And here are ONLY objects that relate to <domain B>"

"And here we see objects that relate to BOTH <domain A | domain B>"

My customers love EA - and they're asking for me to be able to do this kind of presentation for them using Sparx EA in front of C-level executives. (Something I would not have thought possible 10 years ago...)

The visual impact of being able to do what livewireumd is asking for is something I've often thought would be useful.

If there is one point I wish I could get across to Sparx - it's that Sparx EA is a very powerful tool for communicating architectural knowledge to decision makers and stakeholders.

It's not only an MDA tool to be used in the back room by rocket scientist software engineers.

Ergo - more focus on assisting users to use Sparx EA as a tool for "presentation of knowledge capital". Which can include better report generation too. So far - I don't see this as a strategic goal for Sparx. Apologies if I'm missing something.

If I've understood you correctly, livewireumd .... ?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Hiding Elements
« Reply #6 on: October 09, 2009, 09:05:20 am »
Thelonius, what I would recommend for that kind of presentation is creating multiple diagrams.  To take matters further you can create a slideshow to automatically move through a sequence of diagrams.  (Look at the model views window)  Is that the kind of feature you are looking for?

As for your comments on what EA is good for, yes we know.

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: Hiding Elements
« Reply #7 on: October 09, 2009, 09:26:51 am »
Thanks, Simon - I'll go have a look at Model Views Window now ... get back to you on that ...

Jon

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hiding Elements
« Reply #8 on: October 09, 2009, 09:28:21 am »
Quote
Thelonius, what I would recommend for that kind of presentation is creating multiple diagrams.  To take matters further you can create a slide show to automatically move through a sequence of diagrams.  (Look at the model views window)  Is that the kind of feature you are looking for?

As for your comments on what EA is good for, yes we know.
Multiple diagrams is INDEED the way to go...  The problem, Simon, that all of us have identified, even if indirectly, is HOW to populate those multiple diagrams quickly (and hopefully repeatedly).

We already have a selection mechanism (the Manage Searches  dialog) that allows us to specify complex criteria.  We already have a mechanism to generate lists of elements for use in reports (Select ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE).  What we DON'T have is the ability to use THAT list as the basis for populating a diagram...

Seems to me a fairly easy leap from "Use the list to populate the RTF report" to "Use the list to populate a diagram".  

The Add Related Elements feature is very useful (and can be improved - as per my previous posting) but it is essentially localised.  What's needed in addition is a generic capability.

I'm happy to add a feature request.
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Hiding Elements
« Reply #9 on: October 09, 2009, 09:37:42 am »
You can dock the search view and drag onto a diagram.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hiding Elements
« Reply #10 on: October 09, 2009, 10:01:18 am »
Quote
You can dock the search view and drag onto a diagram.
Cool!  8-)  I'll give it a try!  

But I guess I can't "dock" the search to a diagram - THAT's what I'm really after...

If the search could be associated with the diagram, I could just refresh the search and get any new items added and any "orphans" removed...

NOW THAT Would be REALLY cool....   8-) 8-)

Paolo
« Last Edit: October 09, 2009, 10:11:26 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hiding Elements
« Reply #11 on: October 09, 2009, 10:07:55 am »
Quote
You can dock the search view and drag onto a diagram.
Had a go...  In principle, it looks like a VERY useful capability (Hey it's almost what I suggested  ;))

However, I'm finding it EXTREMELY problematic to drag only what I want onto the diagram.  The whole selection mechanism within the output window seems ODD?  

Using the copy to clipboard function generates an object error when pasting (as link) into the diagram.

Simon, can you describe how to select and drag (or copy and later paste) a disjoint set of elements returned by the search from the output window into a diagram?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Hiding Elements
« Reply #12 on: October 09, 2009, 10:16:58 am »
Paolo

Would Model Views do that for you? A search for each diagraqm, refreshing instantly as you open the relevant Search View? Or refreshing automatically at user-defined intervals and emailing you if there are changes to the status quo? See Model Views and the Monitor Events topic in the Help.
Best Regards, Roy

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hiding Elements
« Reply #13 on: October 09, 2009, 10:21:37 am »
Quote
Paolo

Would Model Views do that for you? A search for each diagram, refreshing instantly as you open the relevant Search View? Or refreshing automatically at user-defined intervals and emailing you if there are changes to the status quo? See Model Views and the Monitor Events topic in the Help.
Hi Roy,

I had a look at model views before, and they seemed useful but maybe I didn't go "the whole hog".  I'll have another look.  Thanks...

[edit]Roy, I've had another quick look (I need to get ready to cycle to work) and I'm obviously NOT getting it...  I can see how the views create sets of objects and they can be refreshed.  And I can drag from the list (without the problems I found in the Output Window in previous post)  

What I can't see is how to automatically relate them to a diagram so that as I open the diagram the set of objects on the diagram "tracks" the search.  Were you implying this was possible, or just that the Model View Search is a convenient place to "find" and "drag" these items from, manually?[/edit]

Cheerz,
Paolo
« Last Edit: October 09, 2009, 10:41:22 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: Hiding Elements
« Reply #14 on: October 09, 2009, 10:25:49 am »
Quote
Thelonius, what I would recommend for that kind of presentation is creating multiple diagrams.  To take matters further you can create a slideshow to automatically move through a sequence of diagrams.  (Look at the model views window)  Is that the kind of feature you are looking for?

As for your comments on what EA is good for, yes we know.

Simon

I must not be the smartest puppy in the litter.

I went to look at the Sparx documentation and found the following:



And after reading that little (very little) description ... I'm wondering "what would I actually do with this?"

"...encapsulate your model into the areas you are interested in." ?

This could mean just about anything to anyone, depending on context. It's a bit of a vague description, actually. And it's the only description I found in the user manual. "Encapsulate"?

If Roy is listening in, he'll be getting a bit of deja vu from this ...

The Sparx documentation / user manuals seem to provide a LOT of descriptive text about HOW to do something - but the documentation does not often seem to be written with consideration of the viewpoint of the user, who needs to first understand a bit more about what value or relevance or context a feature provides, or relates to.

As is "Gimme a ferinstance" as we used to say in the Bronx.

EG:

"If you need to define multiple views of a model to demonstrate specific knowledge about the model to stakeholders in a succession of views, you should consider the Model Views capability."

"In order to demonstrate what we mean by this, please watch the following (Camtasia Studio) demonstration ..."

And I would be willing to provide you with several worked examples of what I think would be relevant to many Sparx customers.

This does not require Sparx to anticipate ALL POSSIBLE uses that every customer in the universe may have -- but only a single 'most likely best instance' example that we can use to understand the potential value of certain capabilities of the tool. Just so the 'lightbulb comes on' for those of us - like me - who may be dragging the chain a bit ...

 :)

Please don't interpret anything I have said here as being negative or rude. I love all of you guys and I'm a keen evangelist for Sparx EA out in "the market place of ideas". (Which is near Footscray, actually.)