Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: david_wendelken on October 11, 2005, 09:22:15 pm
-
I'm brand new to EA. (Just bought it tonight.)
I really like the idea of the Project Guide that is in the example project.
Not necessarily enough to build it all by hand, though. :)
Has anyone built an automation interface that would automatically build a draft Project Guide?
-
You don't need the automation. Whenever you create a new project/repository you refer to a base project/repository and EA creates a copy.
-
I don't see how that's the same thing at all!
Why would I want a copy of some other project's guide in my new project? So I can re-write all the contents of each page in it by hand?
That's precisely what I want to avoid doing - I want the advantages of having such a guide without the bother (other than occasionally running a utility) of creating or maintaining it.
-
So probably I don't understand your question. The draft project guide is - from my point of view - the framework with package structures and some predefined elements. I maintain my template from time to time and use it as base for the next project. If it's something else you mean, either try to express it differently or you wait for someone else to answer.
-
Has anyone built an automation interface that would automatically build a draft Project Guide?
No, because as Thomas says...
The draft project guide is the framework with package structures and some predefined elements.
So by the time you have built a structure to suit your own environment, you have essentially built the projecty guide.
-
Thanks, but we are not communicating.
Let's say I want the following set of pages set up for each project:
Guide to the <fill in blank> Project
(The above document has a blurb about the project
and links to the following documents)
Main Business Objectives
Main Business Risks
Main Diagrams
Main Views
Main Models
Now, I'll grant that the stubs for these documents can be included in the base "empty" project one starts with.
I think that's the point you are all making?
But the contents of the stub "Main" documents won't represent the new project, I will have to remember (and take the time) to create links to the new project components in them. My team mates will (of course!!) forget to do this when they create new project components, so now I'll have a reconciliation problem to resolve in order to keep the guide up to date.
I'm looking for a tool that would automatically add the links to the project components to these stub documents.
Does that make it clearer?
-
Probably. But I can't imagine how to automate the reconciliation. To me this is a kind of "sit down, think and do what needs to be done". Due to this think you are lost with automation.
-
Probably. But I can't imagine how to automate the reconciliation.
I can. ;D
To me this is a kind of "sit down, think and do what needs to be done". Due to this think you are lost with automation.
Actually, the trick to it is to do one of the following:
Determine the patterns behind what you would think given a set of circumstances, and automate accordingly, or
Record what you thought as you go (i.e., adding, editing items) in a property of some sort, and automate gathering up and organizing those thoughts later.
Regardless, I'll re-frame my original request to a much simpler case.
I'm looking for an example of an automation interface program that reads thru a list of items in the project repository and adds them to a diagram in that project.
-
Are you looking for a certain language to do the job? Parsing the repository is quite easy and I could hand out a Perl example.
-
C# would be best, VB 2nd, Java 3rd, I can muddle thru others.
Thanks!
-
Here's a simple parser I've cut'n'paste. It might give you a start
use strict;
use Win32::OLE;
my $model = "C:\\Work\\...\\nameofmodel.EAP";
my $repos = Win32::OLE->new('EA.Repository', \&OleQuit) or die "oops\n";
$repos->OpenFile($model);
my $root = $ex->{Models}->GetAt(0);
docPackages($root);
sub docPackages {
my ($pk) = @_;
return unless defined ($pk);
for (my $i = 0; $i < $pk->{Packages}->Count; $i++) {
my $p = $pk->{Packages}->GetAt($i);
# do something with $p->Name
docElements ($p->{Elements});
docPackages($p);
}
}
sub docElements {
my ($el) = @_;
for (my $i = 0; $i < $el->Count; $i++) {
my $p = $el->GetAt($i);
# do something with $p->Name
}
}
sub OleQuit {
my ($self) = @_;
$self->Exit();
}