PDA

View Full Version : Creating a Shortcut to insert a specific block



LineDrawer5
19th Jan 2012, 04:13 pm
Hi all,

I would like to create a shortcut that would insert a specific block. The block(s) are dwgs located on the C drive so I would like to basically type: car [space] and have the car block inserted.

Thanks in advance for any help!

SLW210
19th Jan 2012, 04:23 pm
You should be able to use a script for that.

Use -INSERT for command line only. AutoCAD help has a good section on scripts as well as plenty of info on CADTutor.

LineDrawer5
19th Jan 2012, 04:37 pm
You should be able to use a script for that.

Use -INSERT for command line only. AutoCAD help has a good section on scripts as well as plenty of info on CADTutor.

Ok thanks, so my script would read:

'-insert
car

___

Now how can I make it so that 'car [space]' inserts the block?

Thanks

BIGAL
23rd Jan 2012, 02:59 am
You need to add this to your startup lisp. If stuck acad.mnl


(defun C:car ()
(command "'_insert" "car")
)


Personally I would look at palettes or menu's.

JGA
24th Jan 2012, 02:29 pm
I would look at the toolpalletes as well.
With a routine like above, you'll have to add the folder of blocks into your support path.

SLW210
24th Jan 2012, 02:36 pm
Tool Palettes and/or Design Center is what I use as well.