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 ... 473 474 [475] 476 477 ... 576
7111
Automation Interface, Add-Ins and Tools / Re: Delete a connector
« on: February 10, 2014, 06:05:30 pm »
Maggie,

You are doing some weird stuff here.
* You are using a foreach loop, but then still want to use a counter... Why don't you simply use a for loop?
Code: [Select]
for (int i = 0; i< clientElement.Connectors.Count; i++)* When you are deleting from a collection you are looping then you should always start at the end. So the above loop should become
Code: [Select]
for (int i = clientElement.Connectors.Count -1; i >=0;i--) * right after you delete the connector from the element you save it again by calling conn.Update(). You should remove that call
* you don't need any of the update() and refresh() calls as qwerty already indicated.

Geert

7112
Quote
Hi Geert,

thanks for the information.

Could you give a link to the information about how to adapt the macro for reverse engineering.

It would close a gap.

Thanks,

Helmut
I would, if I knew where to find it  :D

Geert

7113
Apparently since v11 (which is now in beta stage) you can also adapt the macro's for reverse engineering.
This should then support full roundtrip engineering for whatever language or dialect you use.

Geert

7114
Automation Interface, Add-Ins and Tools / Re: debugging addins
« on: February 07, 2014, 10:52:22 pm »
It works for me, so you must be doing something wrong.
I always just attach Visual Studio/SharpDevelop to EA.exe and then it stops at my breakpoints.

What you could check
- Are you running your IDE as administrator (you should)
- Have you build your project in debug mode
- Have you build your project with "Register for COM Interop"

In general you have to make sure that the dll in your Project\bin\debug folder is the one that is used by EA.
You can easily test that by trying to delete it while EA is running. If you succeed then there's another dll that is being used.

Geert

7115
That is more or less how I do it.
I guess it returns null when there is no diagram opened

Geert

7116
Automation Interface, Add-Ins and Tools / Re: Getting clicked model
« on: February 04, 2014, 06:12:05 pm »
Quote
I can confirm. The ContextItems events aren't fired for root nodes.

Geert
According to the release notes that should now work in v11, but I haven't been able to test it yet.

Quote
EA_OnContextItemChanged now handles selection of project root nodes

Geert

7117
Automation Interface, Add-Ins and Tools / Re: Getting clicked model
« on: January 27, 2014, 06:31:43 pm »
I can confirm. The ContextItems events aren't fired for root nodes.

Geert

7118
Automation Interface, Add-Ins and Tools / Re: Getting clicked model
« on: January 23, 2014, 10:46:15 pm »
Quote
Thanks, I will try that. And how about visuals - is it possible to make my addin expand a list inside Sparx tool?
That's exactly what the EA Navigator does.
Since it's open source you can copy/paste/adapt for your own needs.

Geert

7119
Quote
Well Geert, I believe it is a possibility, but I can't make any promises.
Tell them it would make me happy, if that helps at all :D

Geert

7120
I would really love support for drag and drop as well, in both ways if at all possible..
So drag and drop from EA to an add-in window, and drag and drop from an add-in window to EA (mostly for diagrams, but also for project browser)


Geert

7121
Bill,

I didn't understand a thing of what you are asking; and I'm guessing I won't be alone.
You might need to elaborate a bit.

Geert

7122
Quote
As said: use Repository.Execute, not SQLquery.

q.
Execute is a hidden, non documented operation, but it does exist and works just fine.

Geert

7123
My preferred approach would be to save the name of the database in a user config file.
You can distribute the default name for the database in the default config file you install when the add-ins gets installed.
Then you could allow the user to change it in an Options form or something.

I've done exactly that with the settings for the EA Navigator.

See https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/blob/master/EANavigator/NavigatorSettings.cs

Another option would be to store that info in the notes of the model root package.
For some reason these notes never get shown in the GUI, but you can easily edit them using an add-in.

But I still like the config file option better.

Geert


7124
Automation Interface, Add-Ins and Tools / Re: Gererate XML Schema
« on: January 10, 2014, 09:16:04 pm »
Have you tried to import the xml schema you adjusted to see what EA makes of it?

Geert

7125
I think VB and C# use real properties, so you can indeed write
Code: [Select]
mystring = oPackage.Name or
Code: [Select]
oPackage.Name = mystringwhereas Java uses getter and setter methods.
So in Java that would be
Code: [Select]
myString = oPackage.GetName()or
Code: [Select]
oPackage.SetName(myString)
Geert

Pages: 1 ... 473 474 [475] 476 477 ... 576