![]() |
#1
|
|||
|
|||
![]()
Hello---
I am writing a macro that I want for cleaning up CAD line art by deleting the uneccessary small lines. I basically want to modify the eraser tool so you don't have to select an object first. I want it to detect the line or lines that the round eraser mouse tool tip is over and delete those lines. I would also like for it to not care if a line is within a group. I can't seem to find any way for Corel VBA to detect where the mouse curser position is. Can anyone help me with this macro? Thanks! Rick |
#2
|
||||
|
||||
![]()
Rick,
I have a Delete Segment macro that does almost what you want: http://www.oberonplace.com/vba/drawm...delsegment.htm However it requires you to click on a segment to delete it, not just click and drag. If this is not good enough, you might try some luck using Windows API. You can try to use SetCapture, GetCursorPos, and ReleaseCapture API functions. Once you get screen coordinates of the mouse pointer, you can convert it to document coordinates using Window.ScreenToDocument function. Note that this functionality is available in CorelDRAW 11 only. Warning - I'm not sure if this would actually work. It requires quite a bit of low level API fiddling and probably main CorelDRAW window subclassing to intercept mouse events. It's just an idea but no guarantee that it will actually work. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Position inch to mm | GoodLook | CorelDRAW/Corel DESIGNER VBA | 2 | 11-11-2008 00:47 |
how to read point position (x/y) of any shape with VB-addin | Andi | CorelDRAW/Corel DESIGNER VBA | 1 | 09-09-2004 08:32 |