Results 1 to 9 of 9

Thread: Inserting Blocks via custom buttons

  1. #1
    Member
    Join Date
    2004-10
    Posts
    7

    Question Inserting Blocks via custom buttons

    Hello,

    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?

    Thanks!

  2. #2
    AUGI Director scott.wilcox's Avatar
    Join Date
    2001-01
    Location
    Edmonton, Alberta
    Posts
    961

    Default Re: Inserting Blocks via custom buttons

    I think this is what you are asking:
    Type in your macro line in the CUI the following:
    Code:
    ^c^c-i;filename.dwg;
    AutoCAD will search the support path for the file, and insert the first instance it finds.
    Why draw straws? Just draw one straw and array it.

    Scott Wilcox - Edmonton, Alberta


  3. #3
    Administrator Mike.Perry's Avatar
    Join Date
    2001-03
    Posts
    13,499

    Default Re: Inserting Blocks via custom buttons

    Hi "khorzan" ( Sorry, I do not know your real name )

    Please note I have *moved* this thread from the AutoCAD Tips & Tricks forum to this one, as I feel this particular forum is a more appropriate place for such a topic.

    Thanks, Mike

    Forum Manager

  4. #4
    Member
    Join Date
    2006-02
    Posts
    25

    Default Re: Inserting Blocks via custom buttons

    ^c^c-i;filename.dwg;

    Does "filename.dwg" need to be in quotation marks in the above example.
    Last edited by kastmiler; 2006-04-14 at 02:47 AM.

  5. #5
    Active Member
    Join Date
    2005-04
    Location
    Ireland
    Posts
    68

    Default Re: Inserting Blocks via custom buttons

    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.

  6. #6
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    6,836

    Default Re: Inserting Blocks via custom buttons

    Quote Originally Posted by kastmiler
    ^c^c-i;filename.dwg;

    Does "filename.dwg" need to by in quotation marks in the above example.
    If the filename contains spaces then place it within quotes.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #7
    Member kchenault's Avatar
    Join Date
    2005-02
    Location
    Ottawa, KS
    Posts
    37

    Default Re: Inserting Blocks via custom buttons

    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.

  8. #8
    I could stop if I wanted to LanceMcHatton's Avatar
    Join Date
    2002-04
    Location
    Las Vegas, NV, USA
    Posts
    287

    Default Re: Inserting Blocks via custom buttons

    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.
    Lance McHatton

    AutoCAD Architecture 2008
    Windows Vista
    I swear, I did not dado that rabbet.

  9. #9
    Member daniel.dennin's Avatar
    Join Date
    2005-05
    Posts
    42

    Default Re: Inserting Blocks via custom buttons

    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.

Similar Threads

  1. Custom Tool Buttons
    By Gary.182361 in forum AutoCAD Customization
    Replies: 5
    Last Post: 2008-11-24, 05:11 PM
  2. Custom buttons in CUI
    By billynutts in forum AutoCAD CUI Menus
    Replies: 3
    Last Post: 2007-10-11, 02:41 PM
  3. Problem with Custom Toolbar - buttons do not show up
    By GreyHippo in forum AutoCAD Customization
    Replies: 1
    Last Post: 2005-12-21, 05:36 PM
  4. Custom Mouse buttons
    By cmason.82472 in forum AutoCAD Customization
    Replies: 10
    Last Post: 2005-06-16, 06:40 PM
  5. Custom Toolbar Buttons Changing
    By purvisp in forum AutoCAD Customization
    Replies: 2
    Last Post: 2004-10-26, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •