vla-Explode

Discussion in 'AutoCAD' started by John Georgiev, Jun 30, 2004.

  1. How can I use Vla-Explode method to explode the last block inserted?
    Or, because I know the name of the block, how I can specify this block to be
    exploded by Vla-Explode method without need of additional user input?
    Thanks
    John
     
    John Georgiev, Jun 30, 2004
    #1
  2. (Is there any reason not to just insert it already exploded, instead of
    putting it in and then immediately exploding it?)

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jun 30, 2004
    #2
  3. Yes Kent - I cannot use directly COMMAND or VL-CMDF because this function is
    activated by reactor. Otherwise I'll use:
    (command "insert" "*setup20" "0,0" "" "")
    and that's it, but the InsertBlock method I used to insert the block doesn't
    give this freedom , or at least I don't know how to do it.
    John
     
    John Georgiev, Jun 30, 2004
    #3
  4. John Georgiev

    Jeff Mishler Guest

    So, when you insert the block, assign it to a variable:
    (setq newblock (vla-insertblock .........))
    then you can do this:
    (vla-explode newblock)
    (vla-delete newblock)

    HTH,
    Jeff
     
    Jeff Mishler, Jun 30, 2004
    #4
  5. Thanks Jeff,
    this worked, but the block is still in the drawing. Do you know how to purge
    it without using COMMAND? I found only PurgeAll method. Is there any way to
    purge this block only?
    John
     
    John Georgiev, Jun 30, 2004
    #5
  6. John Georgiev

    Jeff Mishler Guest

    Since you know the name, delete it from the blocks collection:
    (vla-delete (vla-item (vla-get-blocks thisdrawing) "blockname"))

    Note that the above will produce an error if the block cannot be deleted
    from the blocks collection; ie it is inserted somewhere in the drawing
    still.
    Jeff
     
    Jeff Mishler, Jun 30, 2004
    #6
  7. Yep! This worked. Thanks.
    John

     
    John Georgiev, Jun 30, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.