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 - Bhupinder

Pages: [1]
1
Suggestions and Requests / Delphi Add In Example?
« on: May 09, 2004, 06:05:37 am »
Any chance of getting a simple EA add in example written in Delphi?


2
Although I agree that EA can handle the requirements, you may wish to look at CaliberRM from Borland.

I am not sure of its costs.  But it certainly covers what you are asking for.

Bas

3
have you reimported the type library after updating to the registered version?

I had a similar problem in my delphi apps.

Bas

4
Thank you

I had missed that!

5
I know I can get all the connector types used in the current diagram through the AI, however is it possible for me to get a list of all the VALID connector types that MAYBE used in a diagram?  (Likewise with diagram types and their associated VALID element types.)  

I would also like to know if it possible to get hold of the valid element types that can normally be placed on a particular diagram type.

The reason for me asking is I am trying to write some useful addins using Delphi 7.  I guess it is fair to say as EA and UML develop, there will be new diagram, connector and element types added.

While I am typing, is it possible to add new elements types to EA?   (ie, a new type of note or other non standard diagram element withs its own visual appearance.)  I realise I can extend the UML language, but my goal is to add extensions to EA.

Thanks in advance for any help.


6
Hi

can anyone tell me the recomended way for looking at data in the system tables when acting thorugh an Addin?

Options are I guess to create my own ODBC link to the EAP file, and open it.  

(for instance the connector Types or the Diagram types table.)

Have i missed something in the AI that could provide these?

Thanks in advance

7
Some more info.

The Reload Diagram (&SaveDiagram) only fails to display the newly inserted diagram objects if the elements being added are not contained within the same package as the diagram.

Here is the sample Delphi code I am working on


var i, q : integer;
   Diagram     : IDualDiagram;
   DiagramObjs : IDualCollection;
   DiagramObj : IDualDiagramObject;
   Proj       : IDualProject;

   Exists     : Variant;

begin
 inherited;

 Diagram := Repository.GetCurrentDiagram;
 DiagramObjs := Diagram.DiagramObjects;

 //iterate through tree adding all the selected elements
 for i := 0 to pred (ElementList.Count) do
 begin
       

        //check if element has already been added
        q := 0;
        Exists := False;
        while ( q<= pred(DiagramObjs.Count)) and (Exists = Null) do
        begin
            Exists := IDualDiagramObject( DiagramObjs.GetAt(q) ).ElementID = Integer( ElementList.Objects );
            INC (q);
        end;

        if NOT Exists then
        begin
         
     //create the new diagram object and link to element / diagram

DiagramObj := DiagramObjs.AddNew(
                       format ( 'l=%d;r=%d;t=200;b=270;' ,[(130*i), (130*i) + 120 ]) , '')
                                                                         as IDualDiagramObject;

          DiagramObj.ElementID := Integer(ElementList.Objects);
          DiagramObj.DiagramID := Diagram.DiagramID;

          if not DiagramObj.Update then
             Showmessage( DiagramObj.GetLastError );

          if not Diagram.Update then
             Showmessage( Diagram.GetLastError );
        end;

 end;

 Repository.CloseDiagram (Diagram.DiagramID);
 Repository.OpenDiagram (Diagram.DiagramID);

 // Repository.ReloadDiagram(Diagram.DiagramID);


//layout the diagram
 Proj := repository.GetProjectInterface;
 Proj.LayoutDiagram(Diagram.DiagramGUID, 64);


Thanks in advance for any explainations.

8
Hi,

Can anyone one let me know why I am getting this stange behaviour?

I am adding (through an EA Addin) several new DiagramObjects linking Existing Elements to Current diagram.

But the current diagram does not show my new elements - I am calling Update on both the new DiagramObject and the Diagram.

However if I ask EA to reload the same diagram (from context menu on diagram tabs in the diagram window) my newly added elements appear.

I have also tried calling Repository.ReloadDiagram but this makes no difference.


Would appreciate any help

thank you
Baz












Pages: [1]