Drag and Drop *.dwg files from my ListBox hosted in Palettset

Drag and Drop *.dwg files from my ListBox hosted in Palettset

Anonymous
Not applicable
731 Views
1 Reply
Message 1 of 2

Drag and Drop *.dwg files from my ListBox hosted in Palettset

Anonymous
Not applicable

Hi Guys,

I'm hosting my .Net ListView control using PalettSet in AutoCAD 2012. The Tag property of ListView items got the path to *.dwg files. I want to drag from ListView, while picking the dwg file using Item.Tag property and drop it on AutoCAD drawing area and I'm expecting the result would be the drawing would be shown there.

I've read about Drag and Drop Blocks using Jig Class and I tried some sample code but using built-in Circle class.

Do I have to first read Blocks from dwg file and then attached to mouse and do the drag and drop operation?

I'm actually confused... Smiley Frustrated

 

Can someone please guide me? Would really appreciate your replies...

Thanks a bunch....

 

Farrukh

0 Likes
732 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi has been a while since I looked at drag and drop operations, but I remember Kean Walmsley did a series of posts for palette drag and drops a while back. Have you seen these? Here are some of the links:

http://through-the-interface.typepad.com/through_the_interface/2011/02/managing-drag-drop-from-a-pal...

http://through-the-interface.typepad.com/through_the_interface/2011/02/implementing-drag-drop-at-a-s...

http://through-the-interface.typepad.com/through_the_interface/2010/10/updated-clipboard-manager-now...

 

I would start with the source code from the "Clipboard Manager for AutoCAD" plugin-of-the-month which you can download from here:
http://labs.autodesk.com/utilities/ADN_plugins/catalog/

 

Art

0 Likes