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.

Topics - qwerty

Pages: 1 ... 10 11 [12] 13
How do I do that? Println ("""") causes a compiler error. Println("\"") will print both the escaping backslash and the quote. Is there a #QT# or something crude alike?


Automation Interface, Add-Ins and Tools / Creating a custom toolbox icon
« on: October 04, 2013, 07:43:30 am »
I was asked by someone how to create a toolbox icon in a MDG. I thought having done that in the past but could not remember. So I started trying and reading the help. Neither worked :-(

The EA help states
To set the icon for a toolbox item, locate the item in the Toolbox Items list and click within the Toolbox Icon column. Click on the ellipsis (…) within this column.  The Select a Toolbox Icon dialog displays. Locate the image file and click the Open button
But there is no Toolbox Icon column in the Toolbox Items list. They are plainly displayed as simple attributes - which don't have something like an icon.

Any help available?


Automation Interface, Add-Ins and Tools / Wow!
« on: June 13, 2013, 04:26:14 am »
Instead of "Error - Missing" I now get "Error - Missing (0x80040154)"!

Which incredible step forward! An error code!

Would someone from Sparx be so kind to explain what this error code means? I mean, I'm no wizard nor a clairvoyant.

Honestly, I'm quite pissed off by the level of debug info we get from EA when it comes to automation or MDG deveolpment >:( >:( >:(




I have just published a new e-book about EA's API at

It starts with a help yourself section so beginners are introduced into the basics. Quite some "bits and pieces" summarize inside information which is not obvious. A final cross reference from GUI to API (not yet complete) ends it up.

Although this is "under construction" I think the current state is worth while to be published. I'm planing to complete it over the next one or two months. Next chapters to be completed: final cross reference; object creation/manipulation.

Hope you enjoy it.


I guess there are not many using just their own profile with everything else turned off. However, here's my observation: every now and then EA decides to enable the Extended profile. This can be seen when hitting the space key on a diagram. On top of Other/MyProfile the Extended menu is offered. Also the QL shows entries which are not from my profile but likely taken from the Extended profile.

I have no clue when this happens. For a time it did not happen but today it is turned on each time I start EA. After dis-/enabling my profile the situation is cleared but only after the next EA restart when the Extended profile is activated once again.

Before sending a bug report I'd like to know if anyone else experienced this behavior.


It seems that when you create a stereotyped package from a profile and EA fires OnPostNewPackage it does not seem to supply the stereotype. Can anyone confirm that (9.3)?


[edit:] I tried also to check for other profile data. The URI which appears in t_xref is created AFTERWARDS. At least I can not find it during OnPostNewPackage. A Tagged Value also seems to be created AFTERWARDS. Why, why, why? Should the method be called OnSomeWhereInbetweenCreatingPackage?

When you right click any element or connector in a diagram then EA offers the addin-menu in the context. I faintly remember a method to retrieve the selected element(s) in a diagram. But I can't find it now. How can I find out which element(s)/connector is/are selected in the diagram from an add-in?


I wanted to create some elements based on the name of an element. But OnPostNewElement is called BEFORE the properties window is closed. So I guess the method should actually be called OnPostNewElementButBeforePropertiesAreEntered.

Any geert-around for this? (Just a rhetoric question...)


Automation Interface, Add-Ins and Tools / Activating MDG vs. enabling
« on: April 06, 2012, 12:07:47 am »
Can anyone explain what Activating a MDG actually means. Once enabled the technology is visible an (I'd say) active. So what does Activating put on top of enabling (except for the asterisk in the list)?


When defining a connector in a toolbox it is possible to choose the type. But how can I specify the direction? I want to define an undirected association but the connector is always created Source->Target since there is no way to set this default.

(I tried setting the notes to direction="undirected" and direction="Unspecified" but that does not work.)



Automation Interface, Add-Ins and Tools / OnPostNewConnector
« on: March 31, 2012, 04:12:22 am »
Probably one more of those bugs where only a few get bitten. When I change the name during OnPostNewConnector this is reflected as expected. But as soon as I try to change the Stereotype or the Type EA simply ignores any change.

Will not send a bug report as I need a work around now.

OT: I used to program a completely different product. Not too long after starting I found that programming meant "find a way around the mines in the field" (aka API-bugs). EA is similar.


EA exports linked documents as base64 encoded zip. So far so good. But each time I export such a linked document the encoding is different although nothing has changed. Why? Does anybody know?


Automation Interface, Add-Ins and Tools / Repository.Execute question
« on: April 28, 2011, 11:40:45 pm »
Does anybody know a way to pass parameters? I tried
Code: [Select]
Repositotry.Execeute ("INSERT INTO table ('col1', 'col2') VALUES (?, ?)", val1, val2)but that did not work. Especially I want to insert a BLOB (image) which is probably not so nice using quoted values.


[edit:] I found a way to insert a BLOB by using 0x notation for the binary data (which is a workaround as this differs between databases).

[argh!] Now I get DAO.Database errors when trying to insert the BLOB. Jet 3 and 4 messages are different but none of them works. Bah! Mikeysoft!

[edit:] It now seems to be obvious that there is a 64k limit to the SQL string length. Who can be blamed for that? (I guess you need to tell Mikeysoft that BLOBs and the according SQLs are large - I have a faint remembering...) However, I'll report this as a bug to Sparx.

Automation Interface, Add-Ins and Tools / Annoying API change
« on: April 06, 2011, 01:31:57 am »
I was able to get around this up to now, but this is really annoying: The Elements method has changed behavior from 7.5 to (I guess it was already 8.0 but I'm testing with) 9.0. Package.Elements returned ALL elements of a package even those nested inside other elements. Definitely this behavior was wrong and needed correction. But simply changing the method's behavior is definitely the wrong way! As long as there is no way of versioning interfaces the new behavior should have been wrapped in another method named for example ElementsOnTop (or whatever). What I have to do now it to code something like
Code: [Select]
if rep.EAEdition < 4711
  use Elements the old way
  use Elements the new way
That sucks definitely.

Please, Sparxians: the next time you change an interface make it either during a beta testing phase for a new interface or introduce a new method for any changed behavior.


Pages: 1 ... 10 11 [12] 13