Attach Block to mouse cursor

Attach Block to mouse cursor

csteeleU2Z9C
Explorer Explorer
145 Views
4 Replies
Message 1 of 5

Attach Block to mouse cursor

csteeleU2Z9C
Explorer
Explorer

Hi,

I have a very large project to complete for my job in a short space of time.

Is it possible to attach an AutoCAD block to my cross-hairs using a hot-key?

Clicking and dragging from a palette is too slow.  I need something faster.

Say #1 on keyboard gives me one block and #2 gives me another block.

0 Likes
146 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant

You can do that using a LISP. Here's an example of code for 1.

 

(defun c:1 () (command-s "_.-insert" "block-one" "_s" 1 "_r" 0) (princ))

block-one must already be in a drawing or stored as block-one.dwg at a searchable (support) file path.

 

Here's the manual on how to load it. 

https://www.lee-mac.com/runlisp.html

0 Likes
Message 3 of 5

imadHabash
Mentor
Mentor

Hi,

>> Clicking and dragging from a palette is too slow.

Can you tell us what is slow in such a procedure?

 

Imad Habash

EESignature

0 Likes
Message 4 of 5

AllenJessup
Mentor
Mentor

If you copy a block. CTRL+V will paste the block each time until you copy another block of entity.

Allen Jessup
CAD Manager - Designer
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

Message 5 of 5

Kent1Cooper
Consultant
Consultant

The suggestion in Message 2 defines a command, which means it would be necessary to type the 1 and Enter to register it.  But there is a single-keystroke possibility, though it involves more than one key, but at the same time [no Enter required].

You can define a Shortcut Key such as Ctrl+Shift+Z to fire up an Insert command with a specific Block name, spelled out as in Message 2's command, but in command-macro rather than AutoLisp format.  Then you can just hit that key combination and place the Block.  Read about creating keyboard shortcuts under the CUI command.

[As in Message 2, there must be a Block with that name in the drawing, or a drawing with that name to become the Block, in some location where AutoCAD knows to look.]

Kent Cooper, AIA
0 Likes