inserting multiple blocks

Discussion in 'AutoCAD' started by jlw-, May 21, 2004.

  1. jlw-

    jlw- Guest

    Does anyone know of a lisp routine to insert multiple blocks.
    I need to insert 8 blocks into over 100 drawings.
    I need to determine the following:
    1. determine if the block exists
    if no insert block
    if yes redefine it
    Any help would be greatly appreciated.
     
    jlw-, May 21, 2004
    #1
  2. jlw-

    David Bethel Guest

    You can always use INSERT block_name=block_name in your routine.

    It doesn't matter weather the block has bee defined or not. -David
     
    David Bethel, May 21, 2004
    #2
  3. jlw-

    ECCAD Guest

    If the objective is to 'update' or 'replace' blocks with similar / updated blocks..then I have found it useful to search the drawings for 'old' blockname, if found, rename it _oldblockname, get it's insertion point, delete it, insert the 'new' block at the same insertion point, loop. When done, do a couple of (command "_purge" "b" "n" "") lines just to cleanup. A single Lisp can be loaded for each drawing, do it's thing, and qsave, next in a script.

    Bob
     
    ECCAD, May 21, 2004
    #3
  4. jlw-

    Jamie Duncan Guest

    I have a lisp that sets up a script file for processing all .dwgs in a
    folder, including subfolders.

    If that would be useful I could send it to you.


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)
     
    Jamie Duncan, May 22, 2004
    #4
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.