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 ... 795 796 [797] 798 799 ... 806
11941
Tagem,

To get you started, there are some examples of addins on the website.

To create the relations between the elements you will probably need something along the lines of:

  • Loop requirements
  • if you found the correct one add a connector to via Element.Connectors.Add()
  • set the appropriate properties for the new connector: aggregationkind, clientID, supplierID,...
  • save the connector the to model: Connector.Update()
  • refresh the connectors collection (Element.Connectors.Refresh)
  • new Requirement

Geert

11942
Well, if I were you I wouldn't waste too much time trying to get EA to do what you want (like opening windows and stuff like that).
I think you'll find it faster to just write your own windows, that you can make to behave exactly like you want.
Even if at first you think you can get by by using the EA windows, chances are that you will not get them to do 100% what you want, and then you'll have to start all over again to build your own GUI anyway. (or later requirements can have this effect).

Geert

11943
Quote
Thank you Geert. :)

About the 1st question,
I've read that by using ActivateTab() I can switch the tab currently active.
If I wrap my add-in control into a EA tab (for example, by placing it in the bottom of EA interface), can I use some indirect way to let users access to properties tab (usually located in the bottom right space of EA interface? ).

(For example by opening a diagram, selecting an element and switching tab to properties).
I doubt it's going to work that way, but if it does please let us know.
Quote

Moreover, I was reading about MDG technologies, but I have a couple of doubts about using them:
 ¬†- What MDG tech. can do that a combination of UML profiling & coustom addins cant;
 ¬†- Do I need to develop an MDG tech?


Thanks to all,
/D
I'm not sure about that, I haven't really looked into the MDG stuff yet.

Geert

11944
Quote
...............................
- ability of easily modify elements retrieved by the add-in:
...............................
is it possible to call the EA "Properties panel" (that is usually accessiblefrom users by selecting "Properties..." from the context menu) from my add-in, i.e. by giving in input the elemetid of the desidered element to be modified?
No unfortunately you can't. There are very limited possibilities to interact with the EA GUI. The only ones I know are:
  • Select in projectbrowser
  • Open diagram
  • Run search
  • Open custom view
Quote
...............................
- custom listing of requirements:
...............................
I need a sort of view that lists requirements showing some selected set of taggedvalues...
can I create it as an user view (without coding & reinventing the weel)?
eventually could it be possible to call that by the add-in?
You might be able to use the built-in search facility from your addin to get the specific list of items.
Quote
...............................
- custom relationship matrix:
...............................
we need to build a this matrix should:
1. support filtering (for example byhiding lower level requirements) and
2. should offer a sort of discrimination beetween different types of links.
for example we use a taggedvalue "link_status" to characterize link status, and we need to get user easily able to understands in wich status the link is (is. by displayng red arrows for links that have conflicts, and green arrows for links that are ok).
I haven't used the matrix functionality all that much, but I'm guessing that won't be possible.

Geert

11945
It could be that you have to set the aggregationKind of the connectorEnd to the appropriate value ("Composite").

Geert

11946
I would try to create a DiagramLink and set the layout options on that one.

Geert

11947
look into the DiagramObject and its properties.

Geert

11949
No sorry, I don't use the autolayout functions so I wouldn't know.
But isn't there a mapping somewhere in the documentation between the numbers and the layout styles?

Geert

11950
through the repository object.

Geert

11951
I think its located in the project interface.

Geert

11952
To get the relations between elements you need the
"Element.Connectors". These contain all kinds of relation between different elements.
Each of those Connectors has a Type field which indicates whether it is a "Generalization", "Association", etc..
To find all Connectors between two given Elements you loop all the connectors of an element and compare the "SupplierID" and "ClientID" with the Element.ElementID.
Once you have found a Connector which you wish to show on your diagram you add a DiagramLink to the Diagram.DiagramLinks collection.
Set the DiagramLink.ConnectorID to the Connector.ConnectorID.

The multiplicity of association can be set in the ConnectorEnd of the Connector.
The field ConnectorEnd.Cardinality contains this information in a string format.

Hope this helps

Geert

11953
Hmm, should have read you question more carefully. (I thought you needed to create a class, not a class diagram)
Anyway the same principle is used but not you are not adding an Element in the Elements collection, but a diagram in the Diagrams collection:
Code: [Select]
EA.Diagram myDiagram = (EA.Diagram)myPackage.Diagrams.AddNew("myDiagramName","Logical")
myDiagram.Update()

11954
It's really not that hard to create a class using the API.
Here are the steps you should take to create a class in a package.
- get a reference to the  repository: If you are using an add-in you get the Repository in the "EA_MenuClick" operation.
- select the package you want:
Code: [Select]
EA.Package myPackage = Repository.Repository.GetPackageByID(123)- add a class to the package
Code: [Select]
EA.Element myNewClass = (EA.Element)myPackage.Elements.AddNew("ClassName","Class")- save the class
Code: [Select]
myNewClass.Update();
Hope this helps

Geert

11955
Automation Interface, Add-Ins and Tools / Re: t_xref & t_xrefsystem
« on: November 09, 2009, 07:39:43 pm »
I think the client/supplier works just like a regular relationship.
A relation alway's goes from client to supplier.
Depending what the t_xref is actually representing I guess that could be anything from an object to a stereotype.

Geert

Pages: 1 ... 795 796 [797] 798 799 ... 806