View Full Version : Inserting Blocks via custom buttons
2006-04-12, 02:37 PM
I am trying to figure out a way to insert a specific block using a custom button. If possible, I would like the macro to be able to look up the block by using the support files search paths.
Any ideas on how I can do this?
2006-04-12, 04:11 PM
I think this is what you are asking:
Type in your macro line in the CUI the following:
AutoCAD will search the support path for the file, and insert the first instance it finds.
2006-04-12, 09:55 PM
Hi "khorzan" ( Sorry, I do not know your real name )
Please note I have *moved* this thread from the AutoCAD Tips & Tricks (http://forums.augi.com/forumdisplay.php?f=180) forum to this one, as I feel this particular forum is a more appropriate place for such a topic.
2006-04-13, 03:48 AM
Does "filename.dwg" need to be in quotation marks in the above example.
2006-04-13, 12:13 PM
Generally, when making button macros like the one you are trying to make, you type in the command exactly as you would at the command prompt. use a semi-colon ( ; ) as a return and a backslash (\) as a user input. the ^C^C cancels an active command if you want to do that, otherwise you can use an apostrophy ( ' ) to make a transparent command.
Does "filename.dwg" need to by in quotation marks in the above example.
If the filename contains spaces then place it within quotes.
2006-04-13, 04:23 PM
Here is what I did. ^C^C_-insert;"file name";scale;1
Now, you can add extra commands such as scale and so forth to get the desired effect you want. I did our entire MEP block library this way before tool palettes and such came around. I still use them to insert the blocks I need for everyday drawings. Just make sure your library folder is in your search path.
2006-04-13, 06:23 PM
Just a side note here: Macros are great but you can't repeat them unless you click on the button again. If you turn it into a lisp, you can repeat it with a right-click or by hitting enter.
2006-04-17, 12:57 PM
A more simple approach is to put a number of blocks into a single .dwg file, then create a new tool pallete from that file. Grouping the blocks by purpose (standard notes, item callout bubbles, fasteners, etc), helps to provide quick access to common blocks without adding additional icons on toolbars.
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.