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

Pages: 1 ... 5 6 [7] 8
Automation Interface, Add-Ins and Tools / Package Icon
« on: April 07, 2011, 07:15:25 pm »
HI All

I am developing an Add-In which integrates EA with another Tool. I have noticed in the add-ins for DOORS integratation and Visual Studio Integration that when a package is connected to a DOORS server or a Visual Studio Project, then the package icon in the project browser has an addition indcator (or the icon changes)

I need a similar functionality. Changing the Icon for a view is easy, (package flags VICON) but how is it achieved for a package?

I have looked at the underlying database structure, and user guide but no clues?

Any help would be most appreciated



Hi All,

How do you remove a connector from an element. I have tried using the Delete and DeleteAt methods followed by a Refresh for the Elements's connectors collection.

Examine the size of the collection confirms that something has in fact been deleted, but examination of the Element's propery dialog Links tab shows the connector to still be there!

It is also present on all diagrams where this element is present.

Do I also have to remove the connector from the Diagram's DiagramLinks collection as well?

The code examples in the User Guide show the creation of a new connector (no diagram is necessary), but do not show the removal of a connector.

Any advice will be most appreciated



Automation Interface, Add-Ins and Tools / Interfaces (IDual vs I)
« on: January 11, 2011, 04:05:52 am »
Hi All

Probably a question directed at the Sparxians, but in the object model API the Interfaces appear to be duplicated, IDualElement, IElement, IDualCollection, ICollection etc

Is there any fundamental difference between the IDual version and the I version?

If not why are both supplied? If there is what is the difference and when should each be used?

If have written Add-ins using IDual and I have written Add-ins using I, and I cannot see any noticable difference

Any thoughts?

Hi All

I have a need in an Add-In to obtain the current repository values for the following:


I can obtain the values in Status by using the Repository method GetReferenceList("Status")

However what about the other two?

Yes I could "hard code" the values, but I am seeking a more elegant solution where I can obtain the Language settings (as shown in the code generation toolbar) directly from the repository, similarly with the Complexity.

If this is not possible, is there a way I can detect if the user has set the "Extend Complexity" option on?

This would allow me to use one of two "hard coded" settings if obtaining the values directly is not possible.

I have checked the EA version 8.0 User Guide and have examined the Enumerations but cannot find what I require there

Any suggestions?



Hi All

Does anyone know how a symbol can be drawn in front of the text present in a label in a shapescript?

The effect I am after is similar to the "reading direction" black triangle for an association.

There appears to be no way to affect the text position, I can get the symbol, but the text is placed on top rather than alongside


Hi All

Does anyone out there know the meaning and cause of the following message appearing in an Add-In?

Code = 0x0
Source - Line : 0; Char : 0;
Error Description = (null)

It is appearing after executing the command


The query does in fact return the correct the result, but the error dialog is incredibly annoying and I cannot make it go away! :-[



Hi All

I have a requirement for and Add-In in which I need to access the tagged values defined in a UML profile.

Question is how do I access a UML profile and hence its tagged values defined on a stereotype within the profile using the SDK and Add-In?


Hi All

Does anyone out there know if its possible (and if so how), to generate RTF from a Model Documemet using a Script?
I have a number of Model Documents, and would like to write a script that iterates a selection of Model Documents and generates the RTFs. This would much quicker than using the menu every time.

The closest I can get is the RunReport(string, string, string) methid for the Project Interface, but this uses a package GUID in XML

I tried passing the GUID of the Model Document (in XML) to this methd, but the RTF dialog is blank in the top text field and hence fails.

I could get the attribute of each Model Element, find the package, get its GUID etc, but this would only work if a Model Document had a single attribute.

Any assistance appreciated!



Automation Interface, Add-Ins and Tools / Visual Studio 2010
« on: April 16, 2010, 08:18:47 pm »
Does anyone know if Sparx have plans to updgrade the current MDG Visual Studio Integration (full version for Visual Studio 2008), to support the recently released Visual Studio 2010?

Automation Interface, Add-Ins and Tools / Adding to Collections
« on: August 22, 2009, 12:03:13 am »
Hi All

In the Object Model Collections (obtained via an Element property) are read only. However new items can be added by using the method AddNew.

When the Collection is refreshed, then the elements in the collection appear to sorted alphabetically by name. (This is also true using the EA GUI interface)

On the EA GUI interface there are Up Hand and Down Hand icons which you can use to modifiy the order of items in a Collection (for example changing the order of scenarios by name rather than alphabetcial)

Can this re-ordering of Collections be achived in the Object model for Add-Ins. If so how?

Automation Interface, Add-Ins and Tools / EA from the Command Line
« on: July 22, 2009, 12:29:32 am »
Hi All

Does anyone know if it is possible to give the filepath of the floating license store as a parameter to ea.exe in much the same way as you can give the filepath of a ea project file?

for example

ea.exe %1 %2

Where %1 is the filepath of the project (or connection string)
and %2 is the filepath of the floating license store

Cheers and thanks

Hi All

I have developed a large UML profile for a client which contains numerous stereotyped elements and assoicated tagged values.

All works just fine.

Is there any way on the UML Profile export/import process to preserve the order of tagged values so that they agree with the order of the attributes of the elements on the UML profile, instead of arranging them alphapbetically as EA does at present?

This occurs when the profile is imported and used in an EA project

Thanks and regards

Does anyone know of a method using the Object Model how to obtain the diagram to which a Diagram reference (UML Diagram Element)?

I am looking to obtain either the diagram ID or the diagram GUID


Automation Interface, Add-Ins and Tools / Cloning a Root Node
« on: May 29, 2009, 11:35:02 pm »
Is it possible to clone a project root and its subsequent View/package structure?

If I export a Root, and attempt to re-import into the same project the process fails with a "Root with the samer name already exists" message.

The reason for this is for modelling variations of a model all adhering to a common structure

I would like to be to export the root to xmi and import the xmi into the same project.

How is this achieved?

Hi All

I am developing an add-in which produces customized documentation in Word using the EA object model and MS Word Interop.

Output into Word of the Notes property of an element is easy as below


However, if the Notes field contains RTF formatting, the output appears similar to below:

This group of users has access to <font color="#ff0000"><b><i>all</i></b></font><b><i> </i></b>functionality of the application

Copying and Pasting directly from the element property dialog into Word works just fine, preserving all the formatting.

But using the Windows clipboard as:

Clipboard.SetText(element.Notes, TextDataFormat.Rtf);

Outputs the text as if the notes were written directly (ie with the tags)

Using the below produces a Word error, persumably since the Html is incomplete (no <html><body> tags):

Clipboard.SetText(element.Notes, TextDataFormat.Html);

Adding the missing <html><body> ... </body></html> stiil produces a word error.

Does anyone know:

1) How to get the notes property form an element with ALL the formatting so that it will output/paste correctly?


2) How to copy/paste elemen.Notes so as to preserve the formatting?


Pages: 1 ... 5 6 [7] 8