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 ... 541
7126
Automation Interface, Add-Ins and Tools / Re: Connection strings
« on: November 23, 2011, 11:57:24 pm »
Have you tried the "Save As" suggestion?

Geert

7127
Automation Interface, Add-Ins and Tools / Re: Connection strings
« on: November 23, 2011, 09:21:38 pm »
Best to create a "shortcut" eap file (use "Save As") and open that file with a text editor.

Geert

7128
Lario,

I've written a small tutorial on how to write add-ins for EA:
http://geertbellekens.wordpress.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/
and I have an open source EA addin framework for you to use:
https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework and an example add-in (EA Navigator) built on top of this framework:
https://github.com/GeertBellekens/Enterprise-Architect-Toolpack
Another great source for examples is the sparx community site
If feel more comfortable in VB(A) then the Simple VBA Excel EA importer might be useful.

Geert


7129
Patrick,

IIRC there's a difference between VS MDG Integration and VS MDG Link

Geert

7130
Automation Interface, Add-Ins and Tools / Re: SQL Api for EA
« on: November 29, 2011, 05:20:15 pm »
Hi,

This morning I downloaded the code (I had to install SVN to be able to do that, isn't there an easier way? Github automaticallly offers zip/tar files containing the full source)
After resetting the path of the Interop.EA.dll it compiled without issues (using SharpDevelop 4.1)

I'll be trying out the code in the next few days.
Have you ever thought about calling the original EA.Repository for operations that you can't do with SQL?
That would make it a fully functional replacement for the original EA.Repository. If I were to replace EA.Repository by your analog right now that would yield quite a lot of NotImplementedExceptions.

Geert

7131
Automation Interface, Add-Ins and Tools / Re: SQL Api for EA
« on: November 28, 2011, 05:30:09 pm »
Wow,

Looks promising. I'm definitely going to check this out.
It could be a nice addition to my own open source UML tooling framework https://github.com/GeertBellekens

Geert

PS. Ever thought of changing to GIT iso SVN?

7132
Automation Interface, Add-Ins and Tools / Re: Connect Connector to Method
« on: November 28, 2011, 09:28:23 pm »
Alex,

I knew what you meant, but this was the closest I got with my code.
I think adding the tagged value (using the api) should be enough to link the message to the operation, just make sure you use the correct operation_guid and make sure the tagged value is saved correctly.

If all that is correct then I would try to figure out what else is different in the database when you do it versus when EA does it.

Geert

7133
Automation Interface, Add-Ins and Tools / Re: Connect Connector to Method
« on: November 28, 2011, 05:43:03 pm »
Here's the code I use to get the sequence messages starting from an operation:

Code: [Select]
       /// <summary>
        /// returns all messages that call this operation
        /// </summary>
        /// <returns>all messages that call this operation</returns>
        public List<UMLMessage> getCallingMessages()
        {
            //this one we will try to find with a cunning sql query directly
            //sometimes the guid of an operation is not the same as the guid mentioned in the tag
            //to be sure the try to get both.
            string sqlQuery =
                "select c.Connector_ID  from ((t_connector c "
                + " inner join t_connectortag ct on ct.ElementID = c.Connector_ID) "
                + " inner join t_operation o on ct.VALUE = o.ea_guid) "
                + " where c.Connector_Type = 'Sequence' "
                + " and ct.Property = 'operation_guid' "
                + " and ct.VALUE = '" + this.wrappedOperation.MethodGUID + "'"
                + " Union "
                + " select c.Connector_ID  from ((t_connector c "
                + " inner join t_connectortag ct on ct.ElementID = c.Connector_ID) "
                + " inner join t_operationTag ot on ct.VALUE = ot.VALUE) "
                + " where c.Connector_Type = 'Sequence' "
                + " and ct.Property = 'operation_guid' "
                + " and ot.ElementID = " + this.wrappedOperation.MethodID;
            return this.model.getRelationsFromQuery(sqlQuery).Cast<UMLMessage>().ToList();
        }

Hope this helps

Geert

7134
Automation Interface, Add-Ins and Tools / Re: Add-In Description
« on: November 22, 2011, 07:53:03 pm »
I don't think I've ever seen anything else then just the name of the add-in there.

Geert

7135
I've added a feature to my free and open source add-in EA Navigator to select an element in the project browser based on its node path (FQN).

See http://geertbellekens.wordpress.com/2011/11/22/select-a-model-element-from-its-node-path-fqn-with-ea-navigator-1-3/ for more info or go directly to https://github.com/downloads/GeertBellekens/Enterprise-Architect-Toolpack/EANavigator_Setup_1.3.msi to download the msi setup file

Geert

7136
Automation Interface, Add-Ins and Tools / Re: COM Exception
« on: November 19, 2011, 01:13:37 am »
Luc,

You can't create a new EA.Repository because the constructor is not public.
Using a workaround.
In VB I've used this:
Code: [Select]
'-------------------------------------------------------------
' Author:   Geert Bellekens
' Date:     17/12/2007
' Description: Return the currently opened EA Model
'-------------------------------------------------------------
Public Function getCurrentRepository() As EA.repository
    Dim EAapp As EA.App
    Dim EArepository As EA.repository
    Set EAapp = GetObject(, "EA.App")
    'Warning when EA not open
    If EAapp Is Nothing Then
        MsgBox "Please Open Enterprise Architect"
        'try again
        Set getCurrentRepository = Me.getCurrentRepository
    End If
    'Warning when no repository is opened.
    Set EArepository = EAapp.repository
    If EArepository Is Nothing Then
        MsgBox "Please open a Model in Enterprise Architect"
        'try again
        Set getCurrentRepository = Me.getCurrentRepository
    End If
    'return the found repository
    Set getCurrentRepository = EAapp.repository
End Function

And yes, the interop.EA.dll needs to be registered for COM. Using regasm with option /codebase might just do the trick (otherwise you can install the free EA lite, which is probably a better idea)

Geert

7137
There's also a operation on Repository that tells it something has changed: AdviseElementChange (long ObjectID), but that doesn't seem to work all of the time.
Selecting something else, and then again selecting the element in question might also help ShowInProjectView (object Item)

Geert

7138
Automation Interface, Add-Ins and Tools / Re: Connector question
« on: November 10, 2011, 04:58:22 pm »
I think that will only work for things like sequence diagram messages, which are "bound" to a specific diagram.

Shouldn't be too hard to cast a long to an int should it?

Geert

7139
Automation Interface, Add-Ins and Tools / Re: EA Tab minimize
« on: November 10, 2011, 01:07:43 am »
I don't understand your question. Is that something you can do in the EA GUI?

Geert

7140
Chris,

Where exactly in the code does it fail?

Still looks like some kind of user related issue. Have you looked in the registry for {67F4E0FA-46A7-4255-B084-69A9433D08C3}?
Maybe that entry only exists for your current user... or something like that.

Geert



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