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 ... 476 477 [478] 479 480 ... 536
7156
Automation Interface, Add-Ins and Tools / Re: XMI IDs of Model Elements
« on: August 12, 2011, 06:31:34 pm »
Dave,

Creating an EA xmi file won't do any good.
EA doesn't work of xmi files. The content is stored in a repository. So you you will have to use the xmi import function to get an EA model.
You can however use the API to import the XMI file.
So the process could be
- create (or copy) empty EA repository
- Import MagicDraw XMI file into repository using EA API
- done

Geert

7157
Automation Interface, Add-Ins and Tools / Re: XMI IDs of Model Elements
« on: August 12, 2011, 05:46:02 pm »
Dave,

If the XMI created by magicdraw is valid XMI then EA will import it, regardless of the format of the id's. I'm not even sure the xmi needs id's at all..
While importing EA will create GUID's for those elements that don't supply an EA_GUID in the XMI.

Geert

7158
Automation Interface, Add-Ins and Tools / Re: XMI IDs of Model Elements
« on: August 12, 2011, 05:20:00 pm »
Dave,

If you XMI is valid then EA will import it, regardless of whether the GUID's are there or not.
If it doesn't find an GUID in the xmi then it will create a new one.
So I really wouldn't worry about the GUID's.

Geert

7159
Automation Interface, Add-Ins and Tools / Re: XMI IDs of Model Elements
« on: August 11, 2011, 05:17:27 pm »
Dave,

EA uses standard GUID's to uniquely identify elements.
If you are transferring from another tool with xmi then you don't need those GUID's. They are only used to be able to synchronize an element being imported by xmi with an element already existing in the model.
If there's no GUID present then EA will consider it a new element and assign it a new GUID.

Geert

7160
Automation Interface, Add-Ins and Tools / Re: multiple stereotypes
« on: August 09, 2011, 04:16:20 pm »
Hmm, the reason I suggested to use StereotypeEx is because that is the property in the API that is used to store multiple stereotypes. The Stereotype property only returns the "first" stereotype.
And for some strange reason I thought EA would apply that paradigm consistently.... silly me  :-[

Geert

7161
Automation Interface, Add-Ins and Tools / Re: multiple stereotypes
« on: August 08, 2011, 09:14:29 pm »
Use the property StereotypeEx

Geert

7162
It's there trust me, it's just a hidden operation.
Try it out and you'll see

Geert

7163
Marcus,

I would check the values in Style and StyleEx. If those don't contain the values you are looking for then I'm afraid they only option you have is to go to the database directly.
Use Repository.SQLQuery() for retrieving and Repository.Execute() for updates.

Geert

7164
Marcus,

Do the necessarily in EA, and then check in the database what changed.
That is usually the best way to figure out these things.

Geert

7165
This is the code I use in my EA Navigator:

  
Code: [Select]
/// <summary>
    /// returns all CallOperationActions that call this operation
    /// </summary>
    /// <returns>all CallOperationActions that call this operation</returns>
    public HashSet<UML.Actions.BasicActions.CallOperationAction> getDependentCallOperationActions()
    {
          string sqlCallOperationActions =
                @"SELECT a.Object_ID FROM t_operation op
                  inner join t_object a on op.ea_guid = a.Classifier_guid
                  where op.OperationID = " +this.wrappedOperation.MethodID;
          return new HashSet<UML.Actions.BasicActions.CallOperationAction>(this.model.getElementWrappersByQuery(sqlCallOperationActions).Cast<UML.Actions.BasicActions.CallOperationAction>());
    }

Geert

PS. Yes you read that right! They abused the fricking Classifier_guid to store the operations GUID ::)

7166
EA.Method

Geert

7167
What do you mean with retrieve? Using the API or?
Since this question was posted in the Automation forum i'll assume your question is about automation.
To start you'll have to get a reference to the Repository object.
If you are using the this through scripting or an Add-in this should be given to you. If not you should either connect to the running instance of EA, or connect to the repository using the connection string.
Once you have the Repository object you use Repository.Models to get a list of the top level packages.

Geert

7168
Use Repository.Execute(SQLUpdateString)

Geert

7169
How about Element.ApplyUserLock() and Element.ReleaseUserLock()?

Geert


7170
Automation Interface, Add-Ins and Tools / Re: More than one toolbox
« on: July 27, 2011, 09:19:49 pm »
It is. If you're looking for more info on extending EA with add-ins you might want to take a look at my blog: http://geertbellekens.wordpress.com/tag/add-in/

Geert

Pages: 1 ... 476 477 [478] 479 480 ... 536