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 - Oliver F.

Pages: 1 ... 34 35 [36] 37 38 39
526
Quote
PROBLEM: I want to trigger document generation from the master doucment level so that each virtual document is recursivly called. Output would be one rtf documentation.

Select the master document package and press F8 to open the documentation dialog.
If everything is ok then the template selection field should be grayed out. After generating the document you will have one RTF.

Oliver

527
Quote
I'm still trying to figure out how to bind reporting templates with desired models so that I could trigger reporting from the master document and all of the child packages (Requirements, Use cases, etc.) would 'know', which reporting template to use.

Each ModelDocument in a virtual document package can have its own template- look for the tagged values.

So if you create ModelDocuments and put in the corresponding packages (Requirements, UseCases, etc.) then you assign the corresponding templates for each and there you go.

Oliver

528
Take a look at virtual documents.  It is documented well in the online help and the rtf whitepaper from Sparx.

Basically it allows you to create a master document containing several model documents including packages or search results each in arbitrary order.

Might not be exactly what you want but I believe comes close.

Oliver

529
Quote
This looks promisinga nd I'm going to try to implement it this weekend.  But where do I find the java packages to use on this (i.e. org.sparx.Repository)?

From the SparxSystems directory go to EA/Java API
There is a ReadMe which will help you further.

Oliver

530
Quote
Thanks so much oliver, Would you mind briefly explaining how you set this up to run as a system tray app or a service?
This goes beyond EA so it is going to be offtopic.

I can only speak for JAVA apps at the moment, as I did not do it for other languages.

Basically you can search sourceforge.net for a software which encapsulates the windows service API and lets it run as a Windows service.
Search for the terms "JAVA" and "Windows service".

To run it in the system tray SUN has introduced the abstract System.SystemTray class to get access to the instance and the java.awt.TrayIcon API.
If you look in a recent JAVA API documentation you can easily find how to accomplish this. I believe some GUI tutorials from SUN also cover this issue.

Hope this helps.

Oliver

531
Quote
I would really like to write an app that would enable my team to kick a report generation off without needing access to the server (through a web interface) or likewise set it up to do a generation based on a schedule.

I saw a while back that a gentlemen was working on this in the forums, i dont know if any of you remember. If not then could you point me to the right place to start investigating the EA api's.

Not sure whether you are refering to me but I did it.
I wrote a daemon in JAVA which sits in the system tray and waits for a scheduled time, then (besides some other tasks) creates a HTML report. In fact it can even be run as a Windows service.

Basically you will have to connect to the repository, identify the root package as a starting point for the export and then trigger the HTML reporting method.

Connect to the repository:


eaRepository = new org.sparx.Repository();        
        if (eaRepository == null)
            {
                errorMessagePopup("No repository available");
                return false;
            }

        if (!eaRepository.OpenFile(CONNECTION))
        {
            errorMessagePopup("EA repository not accessable");
            return false;
        }

        eaRepository.ChangeLoginUser("admin", "...");


We have to change the current login user to be able to have the appropriate rights.

Get the first root package:

         Collection<Package> c = eaRepository.GetModels();

            for (short i=0;i<cp.GetCount();i++)
            {
                pck = cp.GetAt(i);
                pck.ApplyUserLock();
                                        eaProjectInterface.RunHTMLReport(pck.GetPackageGUID(), EXPORTPATH, "png", "<default>", ".html");
               }


This is basically it. I omitted try/catch blocks here for readibility but make sure you catch possible exceptions as often as possible.

I hope this  helps.

Oliver

532
I am afraid this is not possible at the moment.
If you file a feature request to SparySystems you can add yourself to a growing list of supporters for that feature ;)

Oliver

533
Quote
As to launching your AddIn, I'm not sure what you mean. If the AddIn is registered, EA will load it at startup anyway.

He is propably refering to calling it externally from the outside.
In that case opening the repository via the EARepository.OpenFile method will load up an EA process. However this will require to fetch the GUID of the element you want to process.

A different approach is to start your external program from inside the EA Tools menu and give it the GUID as a parameter.

See the online help for information regarding automation integration, both options are described there.

HTH

Oliver

534
Automation Interface, Add-Ins and Tools / Re: Export diagrams to word
« on: November 21, 2008, 10:12:16 pm »
Quote
Is there a function available to iterate over the whole model, and export every model diagram as a gif file to filesystem with the same directory structure as the model packages?

Could this be done using the automation interface?

You could generate a HTML report and then just remove anything else :)
Automation interface is your friend here.

Note that you can also create a RTF document which only includes the diagram images.

Oliver

535
Automation Interface, Add-Ins and Tools / Re: Export diagrams to word
« on: November 20, 2008, 06:52:08 pm »
Quote
Hi@all

I want to export selected diagrams to word. As soon as the diagrams were changed in ea, i want to rerun the export again, so the diagrams are overwritten in word.

Create a RTF template which only contains diagram information, then run the report over it.
You can now import the RTF into a master Word document as link so if you rerun the report you are able to just update the reference.

For selecting diagrams you have several choices:

  • Have all diagrams in one model tree package which you are interested in
  • Tag the diagrams you are interested in with a tagged value and create a search on those. The search results can then be documented (through search dialog or model views)
  • Write an external program which is handling the selected diagrams (though the multi selectio features are limited anyway so I do not know whether it is reflected through automation)

Hope that helps.

Oliver


536
Shape scripts associated with stereotypes will do this.

Take a look in the online help and search for shape scripts.
Basically you would call the standard drawing method and then conditionally add a some icon.

Hope this helps.

Oliver

537
Automation Interface, Add-Ins and Tools / Re: Deploying MDG technologies
« on: October 23, 2008, 09:53:08 pm »
Indeed these are the two methods provided by EA: Copy it manually into the local file system or deploy it on a web server/network share.

Another option could be to use a versioning system (CVS, SourceSafe, ClearCase, SVN, etc.) and put the technology under version control so people could check it out into a default location configured in the MDG settings dialog and then use it offline.
Then it would be a matter of updating it and benefit from the latest version.

Oliver

538
Quote
How and where do I find/write/modify quick link rules?

In your stereotypes diagram (of the UML profile) you have to create a document artefact which includes the quicklinking rules for the elements in CSV format.
It takes some time to become comfortable with it but it is not that of an issue.

Basically you define a source element and stereotype and associate it with a target element and stereotype, then you can define what relations(s) are available for this combination from the quicklinker menu. More can be read from the online help.

There is btw a good reason why some relations are not allowed by EA and this is called "consistency". If everything is available to be related anything else without rules then you will soon come to a point of confusion.

HTH.

Oliver

539
Quote
Quote
Quote
- How can I define which element stereotypes accept which connector stereotypes? Can this be done thorugh profiles? Through an add-in?
You will need to write an add-in to intercept the "Project > Model Validation > Validate Selected" command. There is some sample code here.
broadcast and implement your own dialog.

Not sure whether I got the intention of the question right but maybe you want to take a look at the QuickLink feature also.
QuickLink definitions let you define what is available as a connector between certain elements based on stereotypes.
This is no validation and limited to the quicklinker only (the small arrow on the upper right elements which pops up a context menu) but maybe this is enough for the purpose.

Oliver

540
Automation Interface, Add-Ins and Tools / Re: Generate sub diagram
« on: October 28, 2008, 07:02:23 pm »
Create a diagram, add a table.
Then go to the table's context menu and choose "Add related elements", choose the level of depth and there you go.

HTH

Oliver


Pages: 1 ... 34 35 [36] 37 38 39