How do you pause VBA execution for user mouse click?

How do you pause VBA execution for user mouse click?

Anonymous
Not applicable
444 Views
2 Replies
Message 1 of 3

How do you pause VBA execution for user mouse click?

Anonymous
Not applicable

So I've developed a plugin that allows people to pull blocks from a menu. It works quite well aside from the fact that I've gotten feedback that the blocks are going to be disproportionate. 

 

They are disproportionate because when you click on a menu item, the block is loaded onto the mouse cursor, allowing the user to click on anywhere to insert the block. However, AutoCAD then asks for X, Y factor and while I can tell them to press 1 enter, 1 enter to get the proper scaling, it is much better if I can automate this to make it seamless.

 

I programmed it like this to allow people at my workplace do their own thing because they know how to use AutoCAD, however people outside of my workplace may find the distortion strange. I have also tried to edit Block Definitions 'Scale Uniformly' but no matter what, when I pull it down from the menu item, it scales disproportionately. 

 

Currently what I am doing:

[code]

ThisDrawing.SendCommand ("-insert" & vbCr & blockPath & vbCr)

[/code]

 

What I need it to do:

[code]

ThisDrawing.SendCommand ("-insert" & vbCr & blockPath & vbCr & *pause* & vbcr & "0 ")

[/code]

 

If there needs to be anymore clarity, I want something similar to the backslash '\' in lisp that waits for user input.

0 Likes
445 Views
2 Replies
Replies (2)
Message 2 of 3

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I have also tried to edit Block Definitions 'Scale Uniformly' but no matter what, when I

>> pull it down from the menu item, it scales disproportionately. 

Hard to beleive, can you upload a drawing with such a block (set the scale uniformly parameter, but then scaled incorrect) created from your tool?

 

- alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 3

Anonymous
Not applicable

It's fine now.. I took a different route and the block still stayed on the mouse click. Thank you.

0 Likes