How to remove each command line with onMouseMove Event ....

Started by stephan_35, September 20, 2009, 03:46:24 AM

Previous topic - Next topic

stephan_35

Hello,

I needed to know where is the mouse (coord) on an Treeview control.

The only way for this , is to use OnMouseMove Event with Treeview control, now, but i meet a new problem :

For each event call, a new command line (in AutoCAD) is inserted.

With OnMouseMove, a lot of lines are inserted : maybe One undred or more .... !

I understood that OpenDCL send AutoCAD order on an Event, wich is defined in Studio.

So, could it be possible to call directly lisp order without send AutoCad Order ?

Or anyway else to remove these Autocad Command lines ....

Or, is ther another way to get coords of mouse over a treeview ?

Hope i explain correctly my problem  ;D

Best regards.

Thanks
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

Set the tree control's Event Invoke property to 'Synchronous' to call the handler directly.

stephan_35

#2
Quote from: owenwengerd on September 20, 2009, 06:38:24 AM
Set the tree control's Event Invoke property to 'Synchronous' to call the handler directly.

Here is an example with MouseMove Event, full fail with 'Synchronous' event .

Maybe i mess something ?

Code (autolisp) Select

(load "d:test.lsp")


And move mouse over treeview  ;D

Best regards.


Oops, forget another thing :
need to use more events wich can't work in a 'Synchronous' way ......
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

Your sample works as expected in my test with Alpha 5. Are you using an older runtime version for your test? Did you forget to reload the project after changing Event Invoke?

If you have events that need to perform functions that are not possible from a synchronous event handler, just offload the asynchronous code into a new function, then trigger a call to that new function from your event handler via (dcl_DelayedInvoke) or (dcl_SendString).

stephan_35

Quote from: owenwengerd on September 20, 2009, 09:45:53 PM
Your sample works as expected in my test with Alpha 5. Are you using an older runtime version for your test? Did you forget to reload the project after changing Event Invoke?

If you have events that need to perform functions that are not possible from a synchronous event handler, just offload the asynchronous code into a new function, then trigger a call to that new function from your event handler via (dcl_DelayedInvoke) or (dcl_SendString).

Was done with 6.0.0.3 arx .

Will try with 6.0.0.5 as soon as available to download ;)

the best way for me should be to catch directly the mouse coords with an function , without use an event ....

Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd


Kerry

when I looked yesterday the ENG Studio but the ENG Runtime was not.
Perfection is not optional.
My other home is TheSwamp

stephan_35

Quote from: owenwengerd on September 20, 2009, 09:45:53 PM
Your sample works as expected in my test with Alpha 5. Are you using an older runtime version for your test? Did you forget to reload the project after changing Event Invoke?

If you have events that need to perform functions that are not possible from a synchronous event handler, just offload the asynchronous code into a new function, then trigger a call to that new function from your event handler via (dcl_DelayedInvoke) or (dcl_SendString).

Hello owen,

I get 6.0.0.6 arx.

I just tried what you suggest me. (change event invoke to synchronous)

First, i tried "(dcl_DelayedInvoke)" , but i have to store value before send them, because it's imposible to send parameters.

New problem, The first drag & drop from treeview to autocad does not work properly, i had to launch a second time to see a graphical drawing (circle).

After drag a drop no select is possible inside autocad screen, i have to press escape ! why , and where is my problem.

Second, i have to use "(dcl_SendString)", because i want to launch autocad command while synchronous treeview.

Third, adding new nodes inside treeview not appear immediatly.

Do you think i could be easier to have a function like this :
Code (autolisp) Select

(dcl_Tree_GetMousePosition Test_Form1_TREE)

And return a list (Flag X Y)
Wich i can call when i really need it ....

Best regards.

OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql