Author Topic: Explode a block  (Read 3614 times)

0 Members and 1 Guest are viewing this topic.

Luke

  • Guest
Explode a block
« on: June 26, 2007, 11:12:22 AM »
AutoCAD 2008 Full Version Vanilla.

I have created my own pull down menu.  When I go through it I want to insert block "BIG_BALLOON" at my selected point.  Then I want that block exploded.  So ive got the insert to work throught the following macro:
-insert;BIG_BALLOON;scale;1;r;0; (and now I can pick the point on the screen where I want to place the block)

But now I wan that block exploded.  What is the easiest way to do this?  I've got to beleive there is a way to get the macro to start back up after i've picked the insertion point and tell it to explode last?

Guest

  • Guest
Re: Explode a block
« Reply #1 on: June 26, 2007, 11:15:11 AM »
explode last

Luke

  • Guest
Re: Explode a block
« Reply #2 on: June 26, 2007, 11:17:42 AM »
I thought it was explode last but how do I get the insert (pick insertion point) and explode last all to happen in one button?  I do not want to tell it to insert then pick the point then have to tell it to explode last.  I want the explode last to happen automatically

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Explode a block
« Reply #3 on: June 26, 2007, 11:21:31 AM »
I think a backslash ( \ ) is the character to use to wait for user input in a diesel macro.

/guess.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Guest

  • Guest
Re: Explode a block
« Reply #4 on: June 26, 2007, 11:30:53 AM »
(command "-insert" "BIG_BALLOON" "scale" "1" "r" "0" pause "explode" "last")

CADaver

  • Guest
Re: Explode a block
« Reply #5 on: June 26, 2007, 11:37:12 AM »
(command "-insert" "*BIG_BALLOON" pause "1" "0")

Note asterisk prefix

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Explode a block
« Reply #6 on: June 26, 2007, 11:38:53 AM »
(command "-insert" "BIG_BALLOON" "scale" "1" "r" "0" pause "explode" "last")
If you're going to go with lisp, I would go all the way and use 'entlast' instead of last.  Last selects the last object added to the database within the current view, where 'entlast' grabs the last object added to the database no matter what.  So the code would look like
Code: [Select]
(command "_.-insert" "Big_Balloon" "_scale" 1 "_rotate" 0.0 pause "_.explode" (entlast))
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Guest

  • Guest
Re: Explode a block
« Reply #7 on: June 26, 2007, 11:47:10 AM »
 ^ ^ ^
True dat!

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Explode a block
« Reply #8 on: June 26, 2007, 11:49:37 AM »
(command "-insert" "*BIG_BALLOON" pause "1" "0")

Note asterisk prefix
The only reason why I wouldn't use this way is that you don't get the preview image of the insert.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CADaver

  • Guest
Re: Explode a block
« Reply #9 on: June 26, 2007, 11:50:53 AM »
(command "-insert" "*BIG_BALLOON" pause "1" "0")

Note asterisk prefix
The only reason why I wouldn't use this way is that you don't get the preview image of the insert.
if you're programatically inserting a block, is the preview really necessary?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Explode a block
« Reply #10 on: June 26, 2007, 12:15:03 PM »
(command "-insert" "*BIG_BALLOON" pause "1" "0")

Note asterisk prefix
The only reason why I wouldn't use this way is that you don't get the preview image of the insert.
if you're programatically inserting a block, is the preview really necessary?
In this case yes because the OP is pausing for the insertion point, so the user might want to see the image.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.