delete block if not....

Discussion in 'AutoCAD' started by jclaidler, May 17, 2004.

  1. jclaidler

    jclaidler Guest

    Using lisp, how can I delete a block if that block name doesn't exist in a particular directory ??

    Thanks
     
    jclaidler, May 17, 2004
    #1
  2. jclaidler

    jclaidler Guest

    thanks
     
    jclaidler, May 17, 2004
    #2
  3. Generate a list of block names from within the
    drawing file and compare that to a list of DWG
    files from the folder removing all that match.

    Once this list has be created you can use
    vla-delete to remove the instances of the
    block insertions.

    Should be plenty of examples abound to get
    you headed in the right direction.
     
    Jason Piercey, May 17, 2004
    #3
  4. jclaidler

    jclaidler Guest

    Anyone have an example of how I can if a block name exists in a directory, and if not, erase it.

    I have the code below to identify and cycle thru all blocks with attributes, then do certain tasks. I just need to compare the blocks with files in a directory.

    (foreach n lt1 (setq ss (ssget "X" (list (cons 0 "INSERT")(cons 66 1))))
     
    jclaidler, May 17, 2004
    #4
  5. jclaidler

    BillZ Guest

    BillZ, May 17, 2004
    #5
  6. jclaidler

    jclaidler Guest

    My bad. Its Monday. LOL
     
    jclaidler, May 17, 2004
    #6
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.