Results 1 to 6 of 6

Thread: Insert a Block from a Tool Palette

  1. #1
    Member
    Join Date
    2006-06
    Posts
    18

    Default Insert a Block from a Tool Palette

    what is wrong with this line of code for a custom button on the palette?

    ^C^C(INSERT"T:/2005/Clients/BPXA/Blocks/0INLINE.dwg")

    i'm trying to insert a block, and i want the block pre set. thanks for the help.

  2. #2
    Wish List Manager BrenBren's Avatar
    Join Date
    2000-11
    Location
    150700
    Posts
    3,421

    Default Re: Insert a Block from a Tool Palette

    I think first you have to use the command line version of insert -insert

    I'm not sure after that, however. I guess when I want to insert a block from a tool palette, I just create a tool palette of those blocks and then drag and drop. Seems a little easier than creating a tool to insert a block.

  3. #3
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473

    Default Re: Insert a Block from a Tool Palette

    Hi,

    Try this:

    Code:
    ^C^C(command "-insert" "T:/2005/Clients/BPXA/Blocks/0INLINE.dwg")
    as your menu macro.

    You can also specify scale, etc. at the same time if you want, and you can use the PAUSE function to wait for input:

    Code:
    ^C^C(command "-INSERT" "T:/2005/Clients/BPXA/Blocks/0INLINE.dwg" "S" (getvar "dimscale") (getpoint "\nInsert point: ") pause)
    This inserts the 0inline block at dimscale, prompts for the insert point, then pause waits for the rotation (as an example).

    HTH
    Tim Creary
    S&D
    DILLIGAF

  4. #4
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,520

    Default Re: Insert a Block from a Tool Palette

    Tim

    As Brenda said. Doesn't all that defeat the purpose of using a tool palette button? You can set the scale, rotation, layer, color, etc. in the properties of the tool palette tool itself.


    Chris
    As far as the original macro, unless you have a lisp function named INSERT, this won't work.

    You could use something like this.
    Code:
    ^C^C-insert;T:/2005/Clients/BPXA/Blocks/0INLINE.dwg
    Use Tim's suggestion if you want to use a lisp statement instead of a menu macro.

  5. #5
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473

    Default Re: Insert a Block from a Tool Palette

    Quote Originally Posted by rkmcswain
    Tim
    As Brenda said. Doesn't all that defeat the purpose of using a tool palette button? You can set the scale, rotation, layer, color, etc. in the properties of the tool palette tool itself.
    My interpretation (which is probably incorrect, now that I read the title), based on the code the OP posted, was the OP was trying to make a button on a toolbar and had a terminology malfunction (tool palette = toolbar), hence the code and attempt to nudge a little further into lisp. ~shrug~

    I guess we'll have to wait and see.
    Tim Creary
    S&D
    DILLIGAF

  6. #6
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,520

    Default Re: Insert a Block from a Tool Palette

    Quote Originally Posted by timcreary
    My interpretation (which is probably incorrect, now that I read the title), based on the code the OP posted, was the OP was trying to make a button on a toolbar and had a terminology malfunction (tool palette = toolbar), hence the code and attempt to nudge a little further into lisp.
    Yep, I can see that now.....

    Quote Originally Posted by timcreary
    I guess we'll have to wait and see.
    Yes.

Similar Threads

  1. Insert block with attributes from tool palette opens dialog
    By jpaulsen in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-09-29, 08:30 AM
  2. Insert a block from a Tool Palette and pre-specify Attribute value
    By andy.89024 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-05-09, 10:46 AM
  3. How do you insert a Table style into Tool Palette
    By kschultz in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-02-08, 04:17 AM
  4. Tool Palette Symbols - Insert Dimscale problem
    By Doodlemusmaximus in forum AutoCAD Customization
    Replies: 15
    Last Post: 2005-12-04, 11:16 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
  •