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 ... 552
7126
I don't get the role of the diagram here.
Do you want to limit your calculation to only elements shown on the diagram? Or even only the connectors shown on a diagram?

Why? What importance does the diagram have? I could understand doing a calculation like that for a package, or a whole model, but for a diagram?

Anyway, second thing to look for is how to determine is which type of connectors you are going to use. Only associations, or also dependencies, generalizations, messages,...
And what are you going to do with exotic things like n-ary associations and association classes?
Then one you have established that you will have to determine, for each type of connectors how to determine the "functional" client and the "functional" supplier.
For associations, to give you an example, the client/supplier fields are based on the direction the association is drawn, which doesn't really bear any meaning.

Then when you've defined all of that you might want to think further for   other types of dependencies. Think type of attributes and parameters, reference in tagged values,...


So it looks you've still got some work to do :-X

Geert

7127
Are you sure this is wrong?
It is perfectly possible that for some reason you have double relationships. If everything would be doubled then you would not be able to have :
Quote
the client is:16
the suppliers are:
[highlight]PB[/highlight]
Co1
Co1

Maybe try to add the id of the connector iso the name of the supplier, then see if you still have duplicates

Geert

Geert

7128
Yep,

I't quite logical. You will see each connection twice since it appears in both the client.Connectors as the suppliers.Connectors collection.

But you haven't posted the code of getSupplierList()
That might be the one containing the error.

Geert

7129
Automation Interface, Add-Ins and Tools / Re: Test Description
« on: June 28, 2012, 03:39:10 pm »
Martin,

I think you first need to write some text, then select that, and only then use the link icon to make it a hyperlink.

Geert

7130
Quote
This is nearly identical with my idea, but we are different from the startpoint:
You are selecting one element als start, while i use all elements from a package.
Well, that's the beauty about SQL, in that case you just change your query
 
Code: [Select]
select c.End_Object_ID as Object_ID from t_connector c
inner join t_object o on c.Start_Object_ID = o.Object_ID
                                    and o.Object_Type = 'UseCase'
where c.Connector_Type = 'Realisation'
and o.Package_ID = <MyPackageID>
union
select c.Start_Object_ID as Object_ID from t_connector c
inner join t_object o on c.End_Object_ID = o.Object_ID
                                    and o.Object_Type = 'UseCase'
where c.Connector_Type = 'Realisation'
and o.Package_ID = <MyPackageID>
No need to change any C# code.

Geert

7131
If you are looking for something like that: I have similar code in my Add-In framework in the Model class:
https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework/blob/master/EAAddinFramework/EAWrappers/Model.cs
Code: [Select]
   /// <summary>
    /// returns the elementwrappers that are identified by the Object_ID's returned by the given query
    /// </summary>
    /// <param name="sqlQuery">query returning the Object_ID's</param>
    /// <returns>elementwrappers returned by the query</returns>
    public List<ElementWrapper> getElementWrappersByQuery(string sqlQuery)
    {
      // get the nodes with the name "ObjectID"
      XmlDocument xmlObjectIDs = this.SQLQuery(sqlQuery);
      XmlNodeList objectIDNodes = xmlObjectIDs.SelectNodes("//Object_ID");
      List<ElementWrapper> elements = new List<ElementWrapper>();
      
      foreach( XmlNode objectIDNode in objectIDNodes )
      {
            ElementWrapper element = this.getElementWrapperByID(int.Parse(objectIDNode.InnerText));
        if (element != null)
        {
              elements.Add(element);
        }
      }
      return elements;
    }

If you call that operation using the query
Code: [Select]
select c.End_Object_ID as Object_ID from t_connector c
where c.Connector_Type = 'Realisation'
and c.Start_Object_ID = <myUseCaseID>
union
select c.Start_Object_ID as Object_ID from t_connector c
where c.Connector_Type = 'Realisation'
and c.End_Object_ID = <myUseCaseID>
(or use both queries separately if the union is problematic)
you should be able to get the required objects rather quickly.
This might be faster then simply looping all connectors, especially if you have a lot of connectors.

Geert

7132
You'll probably need either clientID or supplierID
depends on which is the source and which is the target of your connector.
What I would do is check the id of one, if it's the ID of your use case then you should look at the other end.

Geert

7133
Javier,

The Connectors connect your use case to the requirements (which themselves are elements).
The connector contains the object_id's of both source and target.
You then have to get the your requirement from the repository using Repository.GetElementByID (long ElementID)

Geert

7134
I was indeed talking about the manual as in RTFM  ;)

Geert

7135
Manu,

Have you read the manual?
Each and every property and operation is documented in the help file.

If that doesn't suffice, you can buy these e-books:
http://leanpub.com/ScriptingEA
http://leanpub.com/InsideEA

Geert


7136
Automation Interface, Add-Ins and Tools / Re: XPDL file import to EA
« on: June 25, 2012, 11:09:30 pm »
Nick,

Are you having the same, or the reverse problem?
Do you want to import EA models into Tibco or Import Tibco models into EA?
Anyway, I don't think there's a specific adaptor for xpdl files, so I guess xmi import/export is your best bet.

Geert

7138
You can't see it, but you can still use it.
Just type it out in full and it should work.

Somehow this is a kind of "gray area" undocumented operation.

Geert

7139
Please define "Project Name".
Do you mean
- the filename of the .eap file (does it change when I rename my file)
- The name of a root package in the model
- The name of the database
- The name used in the connection string to the database
- The name of the .eap shortcut file

In other words, what do you need it for?

I usually don't use "project" in relation to EA things.
I use "Model" to denominate a root package and I use "Repository" to denominate the database (or .eap file) that contains the models.

Names of shortcuts I don't really care about.

Geert

7140
RefreshOpenDiagrams should do the trick, so it that doesn't work (and manually closing and opening the diagram does) then you can report that as a bug
As a temporary workaround you could try to close the diagram with Repository.CloseDiagram (long DiagramID) and then reopen it with Repository.OpenDiagram (long DiagramID)
(which seems like a better solution then the RefreshOpenDiagrams(true) anyway since now you only update what is really necessary)

Geert
Geert


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