Book a Demo

Author Topic: Position of dropped Element in Diagram  (Read 5802 times)

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Position of dropped Element in Diagram
« on: April 27, 2016, 05:05:09 pm »
Hi,
Im dropping Elements from a Library to a Diagram.
This Creates a new Element in the diagram Package and adds the new Element to Diagram.

My Problem is :
 
 Is there anway to create the Diagramobject on the Position where it is droppedĀ“?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Position of dropped Element in Diagram
« Reply #1 on: April 27, 2016, 08:44:32 pm »
Mine does it (V12.1.1224)

q.

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Position of dropped Element in Diagram
« Reply #2 on: April 27, 2016, 10:39:35 pm »
I have to Change my question a Little bit  :o

I have loaded a Library.

first i drop an element from my library (ondropfromtree Returns false !);

now my procedure starts

the dropped element is copied then
added to diagram package then
added to diagram as link.

by Code .

Im Able to Change the Position by

diagramObject.top bottom etc.

but i want to get the coordinates of the drop event?

Is it clear ?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Position of dropped Element in Diagram
« Reply #3 on: April 27, 2016, 10:50:36 pm »
Have you read the documentation here:
http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/automation_and_scripting/ea_onpredropfromtree.html
According to that you should have an x and y coordinate to use.

Geert