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 - Geert Bellekens

Pages: 1 ... 474 475 [476] 477 478 ... 525
7126
I'm not sure if there is an API function to read/write the paths, but you can find them in your profile at:
\Application Data\Sparx Systems\EA\paths.txt

Geert

7127
Automation Interface, Add-Ins and Tools / Re: build a diagram from code
« on: February 10, 2011, 11:21:09 pm »
Ami,

Some places to look for C# code:
- community site.
- You installation folder: C:\Program Files\Sparx Systems\EA\Code Samples\C#_Sample
- Google ;D

Geert

7128
Mithal,

What happens if you have two (or more) elements with the name "CustomerName" in your package?
Which one will be returned? -> result is unpredictable.

Geert

7129
Mithal,

I don't ever use Collection.GetByName as it doesn't work on all collections, and the results are random when there are multiple elements with the same name.
You better do a foreach and check the elements yourself. (or use an sqlQuery if performance is an issue)


Geert

7130
Automation Interface, Add-Ins and Tools / Re: getting partition color
« on: February 08, 2011, 06:23:28 pm »
Probably in the Element.StyleEx or DiagramObject.Style attributes.

Geert

7131
Automation Interface, Add-Ins and Tools / Testing and Debugging C# add-in
« on: February 08, 2011, 03:50:14 pm »
I've developed a small tool to test and debug your add-ins without having to shut down EA for each build.
See my blog or the Sparx Community Site for more details.

Geert

7132
Ami,

I'm seeing your code now, but I still don't know what you want it to do, and where the problem is.

Geert

7133
Ami,

You need to make sure the connector exists between the two elements (use Element.Connectors.AddNew() to create one) and then add the elements to the diagram.
This should be done by adding DiagramObjects to the Diagram.DiagramObjects collection.
If both elements are shown on the diagram the relation between the two elements will automatically be shown.
You only need Diagram.DiagramLinks to add specific formatting to (or hide) the connectors.

If you post your code it will be easier for us to help you.

Geert

7134
Automation Interface, Add-Ins and Tools / Re: Copying elements
« on: January 25, 2011, 05:26:45 pm »
This topic might be of help.

Geert

7135
Automation Interface, Add-Ins and Tools / Re: How to copy an element?
« on: February 03, 2011, 10:55:49 pm »
Simon,

I'm afraid that approach won't work, as copying an element is not a build-in function of the API.
So the only think you can do is create a new element, and copy all the properties of the original element to the new element, one-by-one :'(

Geert

7136
I'm sure it is, but I'm not sure if there is another way then comparing the location of the message with the position/size of the fragment.

Geert

7137
Now also available as pdf download from the Community Site

Geert

7139
Sometimes Repository.GetLastError() provides some useful information.

Geert

7140
Ami,

If normally you shouldn't set the ClientID, only the supplierID (since the connector was added on newElem.
You better check if indeed the ClientID == newElem.ElementID

Geert

PS. What version are you on? There could have been a fix for this issue...


Pages: 1 ... 474 475 [476] 477 478 ... 525