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.
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.
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.
Hi,
Try this:
as your menu macro.Code:^C^C(command "-insert" "T:/2005/Clients/BPXA/Blocks/0INLINE.dwg")
You can also specify scale, etc. at the same time if you want, and you can use the PAUSE function to wait for input:
This inserts the 0inline block at dimscale, prompts for the insert point, then pause waits for the rotation (as an example).Code:^C^C(command "-INSERT" "T:/2005/Clients/BPXA/Blocks/0INLINE.dwg" "S" (getvar "dimscale") (getpoint "\nInsert point: ") pause)
HTH![]()
Tim CrearyS&DDILLIGAF
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.
Use Tim's suggestion if you want to use a lisp statement instead of a menu macro.Code:^C^C-insert;T:/2005/Clients/BPXA/Blocks/0INLINE.dwg
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~Originally Posted by rkmcswain
![]()
I guess we'll have to wait and see.
Tim CrearyS&DDILLIGAF
Yep, I can see that now.....Originally Posted by timcreary
Yes.Originally Posted by timcreary
![]()