Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Stephen

Pages: 1 2 [3] 4

Look at the automation docs for Diagram Objects.
A diagram object will be found in the elements collection the same as anything else. Armed with the elementID you can add diagrams in the same way that you add any (say) class element.
Search by Type. For diagrams Type is undocumented (in the help file) "UMLDiagram"

BTW - Thanks for the tip about embedding diagrams, I hadn't discovered the feature!

Automation Interface, Add-Ins and Tools / Re: Open source add-ons?
« on: May 24, 2004, 02:03:49 am »
I'd second this.

Sourceforge would work, but I think we might get more buy-in if it could get its own forum directly linked to Sparx.


Might get me to tidy up a few of my utils

Wow - big posts.

Looking in after the dust has settled it appears that what you're after could be possible, but (and its a bit of big but) only if this analyst community could agree a set of naming conventions and practices that intrnsically linked use-cases, the level of detail within them and "screens" (mentioned in your second mail).
It may just be possible within a company with a rigorous quality dept (or a single developer!) and as such is a candidate for your own custom add-in (big job!), however in general we're just not going to all do it the same way - which leads to no automation in the manner you hope for.

I've been travelling in the oppposite direction (as hinted at in my earlier posts) - and I'm trying to strip all but the most basic processes flows out of my use-cases. The UML provides a rich set of descriptive representations. We should make more effort to understand the subtleties of expression that are possible and create suites of models to describe our software. (In so far as they are valuable - don't throw out the XP baby with the bathwater, as we might say in these parts)

I must re-invoke the campaign for simple use-cases!
Try this for a metric - if your client can't understand the jargon, don't put it in a use-case.

If you really want to define everything in one place take a look at the OMG spec. That's how much stuff you'd need as a minimum (and that's not in a single diagram format either...)

[Now what was the difference between a callaboration diagram and a state machine....]

In summary, I agree that its unfortunate that it won't work (your first mail), but I'm not surprised.. :P

I'll second that!

It is reasonable to request as a new feature though.
However, there are may common artifacts that EA cannot yet swallow (SQL Server views and stored procedures being my current bugbear), so I ended up coding a reverse engineering utility of my own anyway.

This does mean that I can create artifacts the way I want them. The most useful feature I added was to build a complete set of dependency links. Now I know exactly what fields are used in all my stored procedures etc. Great for impact analysis.

I started to write similar utilities for the middle tier for a legacy app (VB6), but it does start to get a bit complicated. Being able to leverage the existing code engineering routines would be useful - save having to parse all those declarations. Would still need to parse the code in detail to build the dependencies though - Looks like a bit too much SQL string building has leaked into the middle tier.....

Bit off topic(!) but I'd be interested in your experience with CruiseControl.Net. Just about to embark on that route also (But now writing set of Nant utilities, nothing's ever quite perfect is it?)


Hi there,

Your first port of call is the help file (damn, got to rtfm, what sort of programming is this...)

There is a sample for adding diagrams [Automation and Scripting,Reference,Code Samples]. This example includes adding a table (an element in automation speak).
You may want to create new elements and change the attributes etc in the copies before adding those items to the diagram - Elements don't have to be placed on a diagram to exist, diagrams hold references.

You may even just want to hack the access database in the background. Your tables are in t_object (I hope, haven't checked - something like that). Your table detail are held as Attributes and Methods, more samples for those too.

I haven't automated code generation

Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 31, 2004, 12:37:25 am »
Not a very good tester, but as I said in another thread, bit too much of hacker (1980's game programming background).

I wasn't testing, I was reverse engineering!

(I've raised the bug)

Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 30, 2004, 09:08:51 am »
Just tried all bits set as well - powers of two minus one.
Still no effect.

I'm trying this on a class diagram with three classes on it.
When I change the Direction setting in the diagram layout options for this diagram it significantly affects the layout. I was hoping to see the same change when I hit on a useful value.

Ok - one last test while I write this message.
Changed the layout settings in the GUI.
Didn't say apply to whole project.
Re-running the all bit set test.....

And the result is...

All diagrams same in revised layout.

Damn - just thought of another test.
Change the direction in the GUI, but don't manually apply the layout....

Ok - running that with all powers of two and the all bits set tests.....
All output as per the settings I made by hand in the GUI
And the diagram has changed in the Model...

But I don't think LayoutStyle has much of an impact.
Should we raise a bug?? Or do you think this will be noticed anyway...

Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 30, 2004, 08:52:26 am »
Looks like you're right.

Just tried all values 0 - 128 and all powers of 2.

All diagrams laid out according to settings I set by hand in the GUI.

Me thinks the feature doesn't work...! ;)

Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 30, 2004, 08:19:47 am »
There are lots of options from the GUI aren't there.

Can't find any obvious data tables to store the values in, nor anything in the registry, yet they can be stored for each diagram... must be in the database.

I wonder if they're encoded into a single database field...

Even so I've yet to find a layout that "adds value" for me as a user. Only benefit appears to be that the diagram objects won't overlap.

Have you tried any values?


Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 30, 2004, 05:20:01 am »
Right - Haven't looked at Project, thought it was just for xmi handling.

Hmmm, quite a bit to catch up on...

Thanks Bruno! :)

Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 30, 2004, 01:43:54 am »
Ahh! - You're ahead of me there. I thought the automation interface provided calls to create diagrams and add object to them, but it was left as "a problem for the user" to decide where the object should be placed.

What's the interface for layout

Automation Interface, Add-Ins and Tools / Re: Diagram Automation
« on: March 30, 2004, 01:32:57 am »
AFAIK you have to come up with your own layout algorithm. (I assume you want your diagrams to look "pretty")

I'm struggling with the same issue - more at the level of deciding if I want to bother. I've done a bit of this before for another app.

Probably best to come up with a basic relaxation process that iterates over all artifacts. Simple rules that control how much space should be around each item.
Then add rules to control which sort of object want to rise to the top of the diagram &etc. Can modify the space rules to help with the layering.

If you want to share the output with all here I'll make a bit of non-work time available to work the thing through.
Perhaps we could come up with an add-in for "straightening up" diagrams....

Automation Interface, Add-Ins and Tools / Re: Element Automation
« on: April 01, 2004, 12:22:11 am »
Thanks there - certainly looks like it'll help

I must read all of the documentation
I must read all of the documentation
I must read all of the documentation


Automation Interface, Add-Ins and Tools / Re: Element Automation
« on: March 17, 2004, 02:37:28 am »
Tiny Documentation Bug (?)
Documentation for Collection.AddNew indicates two string parameters and lists [Type] above [Name].

Code samples "Add and Manage Elements" has example of
element = package.elements.AddNew("Login to Website", "UseCase")

which appears to use the parameters in the opposite order.
Code sample appears correct.

Still interested in the enum...

Pages: 1 2 [3] 4