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

Pages: [1] 2 3 ... 72
Bugs and Issues / Re: Compartments and instances
« on: December 15, 2017, 10:51:48 pm »
Hej Mats,

The only solution I can see is to create an Add-In and call that in your shape script.

The problem, as you've identified, is that the classifier and instances are different elements, and while there is a unique classifier for each instance, the reverse is not true. So a shape script can find the classifier of an element, but not its instanceS.

What would be useful to resolve this is to extend the custom compartment feature of the shape script, so that in addition to ChildElement and RelatedElement, you could add a sub-script for InstanceElement -- worth a feature request, I think.

But as it is, you can't retrieve the instances without going through an Add-In.


Suggestions and Requests / Watermarks. Discuss.
« on: December 12, 2017, 09:14:52 pm »
Hi all,

This is a discussion post regarding watermarks.

There are two instances of watermarks in EA: document and diagram watermarks. A document watermark consists of an image which can be specified in the document generation dialog and which is then superimposed on each page of the generated document, while a diagram watermark consists of a single line of text which is superimposed on copied, printed and generated diagrams. The text is repeated diagonally lower-left-to-upper-right with a fixed typeface, size and line separation.

I'm OK with how the document watermarks work, except they're not in the API. So I think there needs to be an addition to the DocumentGenerator() class which allows you to set an image file for the document watermark.

Diagram watermarks are a different story.

First off, there's a bug which causes the watermark to appear in front of the diagram label (eg "class My Class Diagram"). The watermark should be behind everything else, including frames and labels.

More importantly, however, these watermarks are specified per workspace. That is to say, they're stored in the user's registry and not in the project. Meaning a modeller puts the same watermarks on diagrams from every project they access, while at the same time two modellers can print the same diagram at the same time with different watermarks.

This doesn't make sense to me. It would be more natural for a watermark to be dependent on some aspect of the diagram or the model of which it is a part, not on the user account that's exporting the diagram.

I therefore propose that the diagram watermark functionality is reworked as follows:
  • Diagram watermarks to be stored in the project, not in the user's registry. (If necessary, split them into "user (or workspace) watermark" and "project watermark".)
  • [Project] watermark content to be selectable: either the diagram's version; or its parent element's Status, specified tagged value or other property common to all elements; or a fixed string; or an image file (like a document watermark).
  • Watermark layout to be selectable: typeface, size, direction and line separation.



Well the thing is I want to automate it so I can control which, if any, watermark gets put on a document without the user having to remember to a) select a watermark when appropriate, or b) deselect it when not (since EA remembers the selected watermark between generations).

I already have linked documents which I use in calls to DocumentGenerator.InsertLinkedDocument() in my document generation scripts to get headers and footers. My idea was to duplicate these and add "draft" watermarks to the duplicates, and then in the script to select one of them based on the status of the model for which the document is being generated.


Bugs and Issues / Re: Default tag values do not work properly
« on: December 12, 2017, 01:53:41 am »

Have you reported it?


Hi all,

I'd like to stamp "draft" (or whatever) watermarks on certain generated documents. RTF doesn't actually support those, but according to this MSDN article you can achieve the same effect using a \shp.

I tried creating a watermark in a Word document and saving that as RTF (which works, Word can render it correctly when reopening the file), then importing that into a linked document in EA (by creating the linked document, then in the RTF editor selecting File - Import), the idea being that I could use that document in a call to DocumentGenerator.InsertLinkedDocument() to get the watermark to show up on all pages.

The EA RTF editor did not display the watermark, but not to worry, the RTF specification says you're allowed to ignore content you can't handle, but if I export the document, the \shp is gone. I'm not sure the spec says you can do that, but anyway, that means this approach doesn't work.

But is there another way to create a watermark like this?

I can script it, sure. But I was looking for a way to have it incorporated into the template.


you cannot use WITH directly in EA because EA just ignores it for whatever reason.
In principle all but SELECT statements are ignored.

I may be wrong here -- I'm no DBA -- but I think that's because EA basically uses a lowest-common-denominator SQL dialect, and Access doesn't support 'with' clauses.

Either of those contentions may be wrong. :)


Uml Process / Re: Action pins and instances of artifacts
« on: December 11, 2017, 08:53:49 pm »
I've heard back from the support team, and yes it is a bug and yes it will be addressed in a future release.

The current release at the time of writing is 13.5.1351.


Automation Interface, Add-Ins and Tools / Doc template: generalization set
« on: December 08, 2017, 10:36:57 pm »
Hey all,

I can't find anything that looks like a generalization set field in the connector section of an RTF template.
Is it available somewhere, or do I need to write a fragment?


Automation Interface, Add-Ins and Tools / Re: MDG - change diagram icon
« on: December 07, 2017, 11:23:36 pm »
Yes, exactly.

As to other characteristics, well there are three basic types of diagram in terms of behaviour: "normal", sequence and timing. This type is not represented in any way as far as I know, it's just there. I assume that's inherited.

Other than that, most diagram characteristics can be specified with the styleex, pdata and other attributes.


General Board / Re: Project MDG Technology options storage
« on: December 07, 2017, 11:14:26 pm »
Ah, genopt. Of course. Silly me.  ;D



Automation Interface, Add-Ins and Tools / Re: MDG - change diagram icon
« on: December 07, 2017, 03:09:53 am »

The icon is not configurable. Instead, extend the diagram type that has the icon you want.


General Board / Project MDG Technology options storage
« on: December 07, 2017, 02:57:08 am »
Hi all,

Anyone know where the project set of required / disabled MDG Technologies is stored?
Can't find an obvious candidate table.


General Board / Audit: document generation
« on: December 06, 2017, 02:43:58 am »
Hey all,

Auditing can audit XMI import/export. Can it also audit document generation? Who, what, when?
No, right?


qwerty's point is that the element structure is complex, and the API does not have a Clone() feature. The simple workaround is to create a temp package and clone that, as Q suggested.


I could use the diagram stereotype to show different tagged values. This shape script will go into a mdg profile later, so it may be better to use Type or MdgType.

If you use Type or MdgType, you can create custom diagram types which are preconfigured to show/hide relevant sets of tags. Downside with that is you have to change diagram type in order to change what's shown in it. If instead you use the diagram stereotype, you can change it on the fly, but you can't create a custom diagram type that only shows a specific subset of tags. So that's a question of how you prefer to work.

Either way though, changing diagram type or stereotype constitutes a modification of the diagram which may require you to unlock it etc.

Right now I am trying to find out the best way to do this. We can still change the way we work. Is custom compartments a better way?

With this approach, you move the different specialized sets of tags to different elements (either child elements or other elements connected to the core element), then select custom compartments in each diagram. You can also create linked notes which show custom compartments. Custom compartments are a bit wonky at least in version 11, and IIRC you have to select custom compartments individually for each element. So it's all down to how you want to work.


Pages: [1] 2 3 ... 72