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

Pages: 1 ... 31 32 [33] 34 35 ... 37
Automation Interface, Add-Ins and Tools / Re: EA_GetMenuState In EA 9.1
« on: September 15, 2011, 01:07:26 am »
Yes I can concur I get exactly the same behaviour, the menu items for an add-in should enable/disable in the same irrespective of where the menu option is selected. This used to be the case.

I have used the selection of an item in the Project Browser to control add-in menus items many times, and in my latest ad-in more users are likely to be using the add-in menu by right-clicking an item in the project browser.

This inconsistency is both suprising and annoying!  >:(



Automation Interface, Add-Ins and Tools / Re: Where is StereotypeEx held?
« on: October 12, 2011, 02:01:27 am »
It's OK guys, I've found it!

Just for your information, it's buried away in the Description field for the t_xref table.



Automation Interface, Add-Ins and Tools / Where is StereotypeEx held?
« on: October 12, 2011, 01:23:17 am »
Hi All

There is an API functional called StereotypeEx which returns all applied stereotypes for an Element, Connector etc

But where is this information held in the underlying repository? I have a need to extract this information using a SQL query, particularly the StereotypeEX for a connector

It is not in the t_object t_connector tables not can I find in t_xref, it must be somewhere!

Any help most appreciated.

Cheers Phil

As far as I know, and as far as I can discover this information is not available in the API.

However it can be discovered with a little work, well at least in .Net is can

Here is a one line pice of C# .net code

string licenceFilePath = Application.UserAppDataPath;[/b]

The contents of licenceFilePath for my installation running Windows 7 is

C:\Users\pchudley\AppData\Roaming\Sparx Systems Pty Ltd\Enterprise Architect 9\9, 0, 0, 908

If I change version of EA to say Version 8, the same line of code yields

C:\Users\pchudley\AppData\Roaming\Sparx Systems Pty Ltd\Enterprise Architect 8\8, 0, 0, 864

Split the string using \ as the delimiter and the last entry in the string [] will contain (for the first example) 9, 0, 0, 908

That is the version and build number of the EA version that is running your add-in.

Hope this helps in some way.



Right-click the element
Select Advanced from the context menu
Select Make Composite from the flyout menu



Automation Interface, Add-Ins and Tools / Re: Package apparence
« on: September 21, 2011, 06:13:11 pm »
Weel, you are supposed to be able to do it, as far as I know, using an MDG Add-in, when the MDG Add-In "connects" to a package.

I have never got this to work, despite numerous attempts, however I have seen it work in Add-Ins supplied by Sparx for example the VS integration and the DOORS import. Where the connected package as an "indicator" icon attached. (Similar to the namespace root, and version control indicators)

I would really like to know how this is achieved in an add-in, I am afraid the usert guide isn't much help as the example quoted is for VB and in now way will work for C#

MDG_GetProperty provides miscellaneous Add-In details to
Enterprise Architect. This function is called byEnterprise Architect
to poll the Add-In for information relating to the PropertyName.
This event should occur in as short a duration as possible as
Enterprise Architect does not cache the information provided by
the function.
Values corresponding to the following PropertyNames must be

IconID - Return the name of a DLL and a resource
identifier in the format #ResID, where the resource ID
indicates an Icon; for example,

c:\program files\myapp\myapp.dlll#101

Language - Return the default language that Classes
should be assigned when they are created in Enterprise

HiddenMenus - Return one or more values from the
MDGMenus enumeration to hide menus that do not apply
to your Add-In. For example:

i f ( Pr o p e r t y Name == " Hi d d e nMe n u s " )
r e t u r n mg Bu i l d Pr o j e c t + mgRu n ;

How do you get the resource icon id (any number I choose just gives me the namespace root indictaor - I do have an icon as a resource in my project, but it has a name and not a number) and as far as I know you cannot add enumerations in C#, so the second line of code won't work

Any advice?



Automation Interface, Add-Ins and Tools / Re: Addins
« on: September 16, 2011, 10:54:20 pm »
Hi Maggie

One option is to set EA.exe as the external program on the Debug tab for your add-in solution project.

When you build / debug your add-in, Visual Studio will launch EA and then you will be able to test your add-in.

The option is, after building, launch EA as usual and then you should be able to access your add-in

For more info, goto the Sparx Community site, where you will find excellent add-in tutorials and other resources by Geert Bellekens

Also the EA user guide is pretty good at getting started with add-ins
Don't forget to create the registry entries that EA needs since Visual Studio won't do that for you.

Best of luck



Automation Interface, Add-Ins and Tools / Re: t_diagram.HTMLPath
« on: September 15, 2011, 06:21:00 pm »
Thanks Paolo for the tip

Automation Interface, Add-Ins and Tools / t_diagram.HTMLPath
« on: September 14, 2011, 09:39:10 pm »
Hi All

Does anyone know what the field t_diagram.HTMLPath is used for, was used for, or will be used for?

I need to store some extra info regarding diagrams and looking for somewhere to put it that will not interfere with other commonly used properties.

It would be nice if Diagrams had tagged values  ;)



Automation Interface, Add-Ins and Tools / EA_OnPreDelete events
« on: September 13, 2011, 08:08:59 pm »
Hi All

I am writing an add-in which responds to the broadcast events


I have observed (by writing a very simple add-in) that if a CTRL+DEL is peformed on multiple elements, diagrams, or packages ... then this event is broadcast once for item in the selection. So far so good.

My intention (and indeed inferred by the User Guide) is that I can override this event and let the add-in decide whether or not each item in the selection is in fact to be deleted by returning true or false accordingly.

This works, BUT as soon as my Add-in returns false , the entire delete activity is abandoned and no further broadcasts are received.

Is this the behaviour intended by Sparx? Or is it a bug?

I would like to continue to receive a broadcast for all items in the selection, not abandon upon the first return of false.

Anyone else experienced this?



Right-click and select Advanced | Make Composite  - this creates a linked BPMN Business Process diagram and displays the + sign

You may also change the TaggedValue activityType to Sub-process

Please note that in order to create a linked BPMN process diagram, you must make the activity a composite, just setting the tagged value merely displays the +



This is a common question, it is possible that it is not your add-in that is missing, but another dll that your add-in is refering to.

Make sure that all dlls that your add-in uses are installed in the same folder as your addin dll.

Check that the Registry Entry for your add-in, is correct. It shiould refer to your add-in as


There is a utility called Procmon which will help you track down the missing dll



ClearCase does indeed offer an SCC client, which can be used for version control, procedures explain very well in Help or User Guide

I know several large organisations in the UK who use both ClearCase and EA successfully



Automation Interface, Add-Ins and Tools / MDG_MDGGetProperty Method
« on: May 21, 2011, 01:06:23 am »
Hi All

I am writing an MDG Add In and all works well so far, however I am having a little trouble in implementing the method MDG_MDGGetProperty which in C# returns an Object type

According to the user guide THREE items have to be returned:

1) IconID (used to change the project browser icon)
2) Language
3) HiddenMenus

The user guide does make it at all clear how these values are to be returned, are they one string and if so how are the values identified?

The skimpy example in the user guide implies THREE returns under the control of if statements, does EA call this event three times?

In addition, is the IconId an actual ico in the sense of an Icon resource in a Visual Studio project?

Any assistance would be gratefully appreciated



Hi all

Does anyone know if it is possible to automate the synchronisation of tagged values held within a UML profile?

The idea is automate the process of opening the resources view, righ-clicking on an element within a UML Profile and selecting Sync Tagged Value and Constraints...

Cannot find any clues within the EA User guide and I am using EA version 8.0 (the latest build)



Pages: 1 ... 31 32 [33] 34 35 ... 37