Book a Demo

Author Topic: dragging and dropping  (Read 4868 times)

robmir

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
dragging and dropping
« on: July 23, 2007, 11:35:45 pm »
Hello,

I want to drag a diagram in EA and to drop over my form. Is it possible?

I need 4 events like: ItemDrag, DragOver, DragEnter and DragDrop

regards

robmir

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: dragging and dropping
« Reply #1 on: July 24, 2007, 01:48:59 am »
I really don't know, but my guess is that it probably won't work. Try it, and see if your form can get the bitmap or metafile from the drop action.

Meanwhile, if you only need the image of the diagram, use control-B to copy the picture and then paste it onto your receiving application (this works really well in word processors). You can play around with settings like whether to frame the diagram, just look through Tools | Options | Diagram dialog.

David
No, you can't have it!

robmir

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: dragging and dropping
« Reply #2 on: July 24, 2007, 02:27:42 am »
Hey, thanks for your answer.

I need the link to the diagram and the name of the diagram. By means of the link I can select a diagram in EA. The next question is, how can I get an event of EA?

robmir

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: dragging and dropping
« Reply #3 on: July 24, 2007, 02:33:24 am »
Robmir,

I you mean how can you get it from outside, then you have a dilemma. EA broadcasts several events, but to subscribe to them I believe you must write an add-in. [By that I mean that your program must operate from 'within' EA rather than being an 'external' automation application.]

I have not actually attempted to capture the EA events. If you want to try, remember that they are COM events. You'll have to create an appropriate wrapper for your environment. If you are using a COM-aware interface (say through VBA or Python) you might try the capture directly.

If you want to go the add-in route, check the Sparx white papers, and the Automation section of the documentation (look at the add-ins section for events). Also, search this forum for a reference to the EA SDK. It is currently in beta, but you'll find a reference if you search back 2 weeks.

David
No, you can't have it!

robmir

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: dragging and dropping
« Reply #4 on: July 24, 2007, 03:06:24 am »
My application is an add-in.
But the events what I know are:

EA_Connect, EA_Disconnect, EA_GetMenuItems, EA_MenuClick, EA_GetMenuState, EA_ShowHelp, EA_OnOutputItemClicked, EA_OnOutputItemDoubleClicked,
EA_FileOpen, EA_FileClose, EA_OnPreDeleteElement, EA_OnPreDeleteConnector, EA_OnPreDeleteDiagram, EA_OnPreDeletePackage, EA_OnPreNewElement, EA_OnPreNewConnector, EA_OnPostNewElement, EA_OnPostNewConnector, EA_OnDeleteTechnology, EA_OnImportTechnology, EA_OnContextItemChanged, EA_OnContextItemDoubleClicked, EA_OnNotifyContextItemModified

sadly, no OnClickDiagram or similar  :'(