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 ... 478 479 [480] 481 482 ... 536
7186
you can't.

Geert

7187
have you tried package.VersionControlGetStatus ()?

Geert

7188
Does IBM clearcase offer the SCC interface?

If so, just follow the instructions in the help. Clearcase should come up as a provider when setting up package control.

Geert

7189
Ashley,

Here's what I use in C#. I'm sure you'll understand the idea
Code: [Select]
/// <summary>
        /// search the model using an sql query
        /// </summary>
        /// <param name="SQLQuery">the query to be performed</param>
        /// <param name="searchTerm">the searchterm to be looked for</param>
        /// <returns>a list of EA wrappers matching the required criteria</returns>
        private List<object> SearchSQL(string SQLQuery,string searchTerm)
        {
            List<object> searchResults = new List<object>();
            // add the searchTerm in the query
            SQLQuery = SQLQuery.Replace("<Search Term>", searchTerm);
            string searchResult = wrappedModel.SQLQuery(SQLQuery);
            //parse string (xml format) to find out which objects are returned
            List<string> guids = XMLParser.getTagValues(searchResult, "CLASSGUID");
            List<string> types = XMLParser.getTagValues(searchResult, "CLASSTYPE");
            for (int i = 0; i < guids.Count; i++)
            {
                object objectToBeWrapped = null;
                if (types[i] == "Attribute")
                {
                    objectToBeWrapped = wrappedModel.GetAttributeByGuid(guids[i]);
                }
                else if (types[i] == "Connector")
                {
                    objectToBeWrapped = wrappedModel.GetConnectorByGuid(guids[i]);
                }
                else if (types[i] == "Operation")
                {
                    objectToBeWrapped = wrappedModel.GetMethodByGuid(guids[i]);
                }
                else if (types[i] == "Diagram")
                {
                    objectToBeWrapped = wrappedModel.GetDiagramByGuid(guids[i]);
                }
                else
                    //must be an element then
                {
                    objectToBeWrapped = wrappedModel.GetElementByGuid(guids[i]);
                }
                if (objectToBeWrapped != null)
                {
                    searchResults.Add(EAWrapperFactory.createEAWrapper(this, objectToBeWrapped));
                }
            }
            return searchResults;
        }

Geert

7190
Ashley,

I don't know the answer, but what I do in such cases is:
- create a new (empty) model
- add only the things that I'm interested in
- Open the database and figure out how EA stored the information I'm after
- Then try to figure out whether (or not) the API exposes that particular piece of information.
- If it's not exposed by the API I use Repository.SQLQuery() to get that information.

Geert

7191
What exactly are you doing when trying to debug?

Geert

7192
By the way, package is a special case. Some of its properties are stored in the package.element object.
So for each package you will find a record in both t_package as t_object.
The are related by package_id in the pdata1 field.

Geert

7193
Mario,

Often the related table is mentioned in the documentation of the API

The rest you'll have to work out by trial and error.

Geert

7194
Andy,

I just tested this on SQL Server 2008 and I got a result just fine :-/

My exact query was:
Code: [Select]
select * from t_object o
where o.pdata4 like '2143504841'

Geert

7195
If you know the connector id then this:
Code: [Select]
select * from t_object o
where o.pdata4 like '<connector_ID>'

If you want to join the t_object with t_connector then you'll need some type casting magic to make it happen since pdata4 is a text field, and connector_ID is an integer field.
This code works on SQL Server (2008)
Code: [Select]
select * from t_object o
join t_connector c on cast (cast(o.pdata4 as nvarchar(max))as int) = c.connector_id
where o.name like 'AssociationClassName'

Geert

7196
Automation Interface, Add-Ins and Tools / Re: Obtaining long input
« on: July 08, 2011, 04:37:21 pm »
Rouven,

You cannot open the properties dialog of an element from within your add-in.
You can however show your own GUI to allow users to enter data.
I don't know which language you are using, but i'm sure there's plenty of GUI controls you can use that accept more then 255 characters.

Geert

7197
I just searched all my old posts using the top left search button.
searchstring: package.elements
forums: Automation Interface... and Bugs/Issues
period: all

That returned (after a while) all posts about that specific issue.

Geert

7198
I think that is a warning, and not an error, so it should have registered your dll anyway.

Geert

7199
Since no-one had something available I've published my own example at
https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework

Geert

7200
Hi,

I got it working.
I had set the default constructor for my control private, which prevented it to be registered in COM.
Making the default constructor public solved the issue.

I hope to be able to publish a working example myself in a couple of days.

Geert

Pages: 1 ... 478 479 [480] 481 482 ... 536