Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: livewireumd on October 08, 2009, 05:28:44 am

Title: Hiding Elements
Post by: livewireumd 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...
Title: Re: Hiding Elements
Post by: Paolo F Cantoni 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
Title: Re: Hiding Elements
Post by: livewireumd 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!
Title: Re: Hiding Elements
Post by: Geert Bellekens 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
Title: Re: Hiding Elements
Post by: Dave.B 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.
Title: Re: Hiding Elements
Post by: Thelonius 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 .... ?
Title: Re: Hiding Elements
Post by: Eve 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.
Title: Re: Hiding Elements
Post by: Thelonius 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
Title: Re: Hiding Elements
Post by: Paolo F Cantoni 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
Title: Re: Hiding Elements
Post by: Eve on October 09, 2009, 09:37:42 am
You can dock the search view and drag onto a diagram.
Title: Re: Hiding Elements
Post by: Paolo F Cantoni 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
Title: Re: Hiding Elements
Post by: Paolo F Cantoni 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
Title: Re: Hiding Elements
Post by: RoyC 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.
Title: Re: Hiding Elements
Post by: Paolo F Cantoni 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
Title: Re: Hiding Elements
Post by: Thelonius 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:

(http://www.thelonius.com.au/ModelViews.jpg)

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.)
Title: Re: Hiding Elements
Post by: Paolo F Cantoni on October 09, 2009, 10:45:49 am
Quote
[size=18]...[/size]
As is "Gimme a ferinstance" as we used to say in the Bronx.
[size=18]...[/size]
Hey Thelonius,

I thought they used to say "Gimme a frinstance"   ;)

But I agree, with your comments (as you can see by my edit above)

Paolo
Title: Re: Hiding Elements
Post by: RoyC on October 09, 2009, 11:33:56 am
Jon,

You are right, and I periodically get into deep and meaningful conversations with various colleagues on the points you raised in your original posting.  Unfortunately, I have been wrestling with a totally different set of problems lately, and have not been able to translate "what we need to do is..." from the conversations into "what I have done is...". Soon, I hope.

WRT Simon's suggestion, you might get more from the Diagram Slide Show topic in that Model Views section. Basically, what Simon is talking about is having a set of diagrams illustrating either a developmental progression or a set of perspectives (with and without elements relating to a particular perspective). Each time you run the slideshow you draw in the current diagrams - that is, they always represent the latest saved changes.

Bringing in Paolo here, those changes will have been made manually, and the Model Views facilities would either be telling you that the diagram has already changed, or there have been developments in relevant objects that now need to be (manually) added to or removed from the diagram, depending on what you set up in the SQL search views.

I'm getting out of my depth here, but maybe it would be possible to create an Add-In or MDG technology that performed specialised searches, opened relevant diagrams and updated them automatically.

There is a possible role for a series of shortcuts too - it seems to me that there could well be a meshing of different EA tools and facilities here, but I just don't know how it would all work. And THAT is where we return to Jon's point about "what I want to do, how I could approach it, why these EA tools and facilities might be useful, and then what steps do I actually work through". This is the sort of area that the white papers are supposed to address, so maybe we should look into them.
Title: Re: Hiding Elements
Post by: Paolo F Cantoni on October 09, 2009, 01:27:16 pm
Quote
[size=18]...[/size]
I'm getting out of my depth here, but maybe it would be possible to create an Add-In or MDG technology that performed specialised searches, opened relevant diagrams and updated them automatically.
 [size=18]...[/size]
That's what we're working on with our autoupdatable diagram technology.

If there was interest, we might consider releasing it as a commercial product.

For the present, we're trying to figure out, how much EA can do for us along these lines and how much we have to develop ourselves.

Paolo
Title: Re: Hiding Elements
Post by: Thelonius on October 09, 2009, 01:39:20 pm
Quote
Jon,

You are right, and I periodically get into deep and meaningful conversations with various colleagues on the points you raised in your original posting.  Unfortunately, I have been wrestling with a totally different set of problems lately, and have not been able to translate "what we need to do is..." from the conversations into "what I have done is...". Soon, I hope.

WRT Simon's suggestion, you might get more from the Diagram Slide Show topic in that Model Views section. Basically, what Simon is talking about is having a set of diagrams illustrating either a developmental progression or a set of perspectives (with and without elements relating to a particular perspective). Each time you run the slideshow you draw in the current diagrams - that is, they always represent the latest saved changes.

Bringing in Paolo here, those changes will have been made manually, and the Model Views facilities would either be telling you that the diagram has already changed, or there have been developments in relevant objects that now need to be (manually) added to or removed from the diagram, depending on what you set up in the SQL search views.

I'm getting out of my depth here, but maybe it would be possible to create an Add-In or MDG technology that performed specialised searches, opened relevant diagrams and updated them automatically.

There is a possible role for a series of shortcuts too - it seems to me that there could well be a meshing of different EA tools and facilities here, but I just don't know how it would all work. And THAT is where we return to Jon's point about "what I want to do, how I could approach it, why these EA tools and facilities might be useful, and then what steps do I actually work through". This is the sort of area that the white papers are supposed to address, so maybe we should look into them.

Roy

I appreciate this information. It's giving me a sense of where EA is going to go in the future.

White papers - yes, please. I've been meaning to write one myself for my colleagues at work.

I know what you mean.

So much work. So many challenges. So many opportunities. So little time. So few resources.

Lateral thinking?

Think about your social network out here. The Community.

Hmmm.
Title: Re: Hiding Elements
Post by: Didier Fort on October 13, 2009, 03:47:57 am
Hello,

Although I'm rather new to the EA world it seems, to me at least, that the concepts expressed here are close to the viewpoints defined by Archimate:

http://www.opengroup.org/archimate/doc/ts_archimate/chap9.html

Which brings an interesting question, is there any plans for EA to support Archimate's viewpoints?

Corollary question, can EA claim Archimate 1.0 support without the support?

Best regards,
Didier
Title: Re: Hiding Elements
Post by: livewireumd on October 13, 2009, 04:42:52 am
Thelonius, you hit it on the head.