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 - michielper

Pages: [1] 2 3 ... 10
1
How do I get project or report data like Title, Project name etc. in a Linked Document? This is easy in a Template document but strangely enough not possible in the same way in a Linked Document.

Any suggestions? Thanks in advance!

Michiel

2
I found the solution in an old reply from Dermot on this forum. You have to insert an element with a Linked Document via DocumentGenerator.InsertLinkedDocument.

3
When I generate a report via a script (DocumentGenerator), how do I get page numbers, headers and footers in the generated report?

Thanks for any tips!

4
Automation Interface, Add-Ins and Tools / load script from file?
« on: August 28, 2020, 07:42:58 pm »
In the EA script editor, one can rather easily save a script to a file. However, there seems to be no similar way to load a script from a file (other than copy/paste). Am I missing something? Is there a way to load a script from a file? This is certainly a much needed feature for anyone writing non-trivial scripts.

5
Thanks again Uffe! I will do some experimentation.

Another, though somewhat elaborate, way to accomplish something useful in this area might be to have an EA script create a “concordance” file that you can then use to let your word processor generate an index. This of course might be impossible to automate completely but can be acceptable if new versions of documents are not required very often.

6
Hello,

I am working on a (complex) VBScript to generate a (complex) report from a (complex) model.....
A person after my own heart. :)
Quote
We have the requirement to add page-number references in certain tables. Is this possible? Can I insert some sort of reference that will then automagically be translated into a page number when the report is finalized (like apparently is being done for the Table of Contents)?
Don't think so. ToC templates are highly magical, to the point that I don't think you can actually create one in the built-in editor but must construct it in Word and then import it. The EA editor just doesn't allow you to express cross-references.

Quote
If no, I might try to use Hyperlinks instead of page numbers. There is a method docGenerator.InsertHyperlink but I don't know how to insert a BOOKMARK to refer to in the hyperlink.

I went down the BOOKMARK rabbit hole a couple of months ago, and can report that there's nothing down there. You can't create the bookmarks through the API, and while you can create them in a template, any repeated applications of the same template (you know, the whole friggin' point of using templates in the first place) breaks the whole thing since only the bookmark from the last of those applications survives to be targetted by the hyperlink.
Looks like this is another one of those functions that got included as a feature demo a loooong time ago, then never got made to actually work because nobody ended up using it.

HTH,

(Actually, I know it doesn't. It just adds to your frustration. But maybe it'll save you spending stupid amounts of time looking for a function that's implied by the documentation, but simply isn't there.)

/Uffe

Allright, thanks for sharing these insights. It looks like indeed I wont be able to accomplish exactly what I want.
However, in my case, there are actually some one-time templates because I use them for certain section headers in the document that occur only once. In some of these cases, it might be useful to include a hyperlink reference to these one-time templates.
 So, how do I create and reference a bookmark in a template then?

Regards, Michiel

7
I am working on a (complex) VBScript to generate a (complex) report from a (complex) model.....

We have the requirement to add page-number references in certain tables. Is this possible? Can I insert some sort of reference that will then automagically be translated into a page number when the report is finalized (like apparently is being done for the Table of Contents)?

If no, I might try to use Hyperlinks instead of page numbers. There is a method docGenerator.InsertHyperlink but I don't know how to insert a BOOKMARK to refer to in the hyperlink. The documentation says

InsertHyperlink (string Name, string URL)
Notes: Inserts a hyperlink at the current location. If you use a URL with the  #BOOKMARKNAME syntax, the hyperlink will link to another part of the document.

but it is not clear to me what the refered bookmark should look like.

Thanks for any help.

8
I have to create a number of different reports where it would (I think) be necessary to use nested fragments. The reason is that I first have to filter elements based on their inheritance relationship and then have to print various elements related to the selected ones.
Such nested fragments (with custom queries) are not very easy to maintain so I wondered if a product like EADOCX would make life much easier here. Is EADOCX primarily concerned with making the report look good or can it also help with these kinds of complex selections?

Regards, Michiel

9
Hi,

The AddIns key only gets created by Add-In installers, not by the EA installer. If it's there, EA scans it during startup; if not it doesn't.
But that only tells EA there are Add-Ins to look for. You must also register the Add-In DLL correctly so EA can actually load it.

/Uffe

Ok, thanks, it works now!

10
You can always create the key if it doesn't exist.

Geert

Yes, but where does EA 15 look for the key?
It is not only the key that is missing but also a directory. Possibly EA15 expects the key in another place?!

11
Another problem creating an Addin:

The registry key HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins
does not exist in my installation of EA 15.0. There is no key called EAAddins at all. So where and how should I register my Addin?

12
Hi folks,
does anyone know a good documentation for the Enterprise Architect Automation API?? Looking for days but haven’t found a good documentation.

Thanks Manu

https://sparxsystems.com/resources/user-guides/15.1/automation/automation.pdf

13
You shouldn't try to add object nodes to Activities, or link Activities with other stuff.
On Activity diagrams you should only use Actions. This is similar to State Machines and States. You don't use State Machines on State Diagrams either.

Geert

Well, but what about interacting state machines? A very useful concept to model real-world situations. It would seem logical to be able to draw a diagram with state machines interacting through intermediate states, similar to what one does with Petri Nets. Wouldn't the resulting diagram be called a State Diagram?

14
Hi Geert,

I compared my solution with yours and the problem seems to be that I chose the project as .NET Standard instead of .NET Framwork Class Library.
Now the Add-In works as expected.
Thanks for help!

Raya

I have the same problem and cannot find where to choose the project type in "Blend for Visual Studio".....

15
Is there a manual on how to create EA plugins?

I wrote a couple of articles about writing add-ins: https://bellekens.com/writing-ea-add-ins/

Geert

I am using "Microsoft Blend for Visual Studio" on Windows 10. Your instructions seem to use another version, e.g. there is no "System.Windows.Forms" in my configuration.

Pages: [1] 2 3 ... 10