Drag Sketch Symbols

Drag Sketch Symbols

BenoitLarocque
Explorer Explorer
768 Views
2 Replies
Message 1 of 3

Drag Sketch Symbols

BenoitLarocque
Explorer
Explorer

Hi, I am currently working on a program that will insert Sketched symbols on a drawing sheet.

 

I would like my program to behave like the manual Insert Sketch symbol tool and allow the user to drag the symbol to it's final position but the api Add method requires an insertion point and I didn't find any Move or Drag method that would allow my program to initiate the Move command and let the user to select the final position with the sketched symbol attached to the cursor.

 

I am looking for a code sample for Dragging sketched symbols

 

Any idea ?

 

'vba code sample:

'Insert the sketched symbol on the active sheet.
Dim thissymbol As SketchedSymbol
Set thissymbol = oDwg.ActiveSheet.SketchedSymbols.Add("mySymbol", oTG.CreatePoint2d(0, 0))

 

 

Best regards,

 

Benoit Larocque

0 Likes
Accepted solutions (1)
769 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

if you have a look at the api help you can find an example that does more or less what you want. Search for "OnDrag Event - dragging a WorkPoint API Sample"

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3

BenoitLarocque
Explorer
Explorer

Hi Mr DeJong,
Thanks for the response. 
I had already tested this sample, but I wasn't able to translate it for Sketch symbols.
I will have to try again. 

If ever someone already has a sample, It would be appreciated (vba or vb.net)  

Best Regards
Benoit Larocque

 

0 Likes