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 ... 517 518 [519] 520 521 ... 576
7771
No,

You use an sql query to get a list of all guid's of all diagrams ("select diagramguid from t_diagram"). You loop over each of those guid's and use Repository.GetDiagramFromGUID to get the actual diagram objects.

Geert

7772
The best way to go about is to use an sql query with Repository.SQLQuery() to get all id's of all diagrams, and then use Repository.GetDiagramByGuid() to get the actual diagram.

Geert

PS. Are you sure you need ALL diagrams? That might be quite a performance hit.

7773
Automation Interface, Add-Ins and Tools / Re: Generating C# code
« on: July 20, 2011, 05:06:28 pm »
Austinn,

You'll have to implement the interfaces features in EA first before you they will show up in the generated code.
Select Employee and press Ctrl-Shift-O to implement the interface features.

Geert

7774
Murat,

You can show an image of a diagram in a your own window, but I don't think you can re-use the actual EA graphical elements.

Geert

7775
Quote
Geert, this is a common problem and EA has had handling for it since before version 4.

os14, Look at Settings | Preprocessor macros.

Just add "far" into that list.

Oops I didn't know about that, sorry for the misleading answers :-[

Geert

7776
I'm afraid there's no way at all to interfere in the inner workings of the reverse engineering process.

Geert

7777
you can't.

Geert

7778
have you tried package.VersionControlGetStatus ()?

Geert

7779
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

7780
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

7781
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

7782
What exactly are you doing when trying to debug?

Geert

7783
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

7784
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

7785
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

Pages: 1 ... 517 518 [519] 520 521 ... 576