Author Topic: Can someone post a copy of delnul.lsp  (Read 4417 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Can someone post a copy of delnul.lsp
« on: February 14, 2004, 09:24:27 AM »
I've accidentally deleted my copy and I can't find it anywhere on the net. :oops:

Cheers

Andy
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Can someone post a copy of delnul.lsp
« Reply #1 on: February 14, 2004, 10:10:03 AM »
What is it supposed to do?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Can someone post a copy of delnul.lsp
« Reply #2 on: February 14, 2004, 10:34:35 AM »
is it still in your recycle bin?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

hudster

  • Gator
  • Posts: 2848
Can someone post a copy of delnul.lsp
« Reply #3 on: February 14, 2004, 01:53:23 PM »
Nah it's gone for good, I've checked and I couldn't get it back.

it's a lisp routine that deletes null objects from a drawing, empty text strings etc.

It was handy for cleaning up Architects layouts we receive.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Can someone post a copy of delnul.lsp
« Reply #4 on: February 14, 2004, 02:11:17 PM »
Let Google be your friend.

CADALYST  December 1997
Tip1390.LSP: DELNUL.LSP Delete Null Entities (Bill Fane)

Is this the routine ??


Code: [Select]

;; DelNul.lsp  
;; Deletes nul lines of Text, Mtext & Blocks.
;; Modified by JL Thomas 12/02/97  

(Defun C:DelNul ( / TXT BLK NB NAMES)
  (if(setq TXT (ssget "X" '((-4 . "<and")(-4 . "<or")
                           (0 . "MTEXT")(0 . "TEXT")
                           (-4 . "or>")(-4 . "<or")
                           (1 . "")(1 . " ")(1 . "  ")(1 . "   ")
                           (1 . "{}")(1 . "{ }")(1 . "{  }")(1 . "{   }")
                           (1 . "{}\P")(1 . "{ }\P")(1 . "{  }\P")(1 . "{   }\P")
                           (-4 . "or>")(-4 . "and>"))))
  (progn
    (command"_erase"TXT"")
    (princ(strcat"\n  "(itoa(sslength TXT))" nul text strings deleted. "))
   )
  (princ"\n  No nul text strings found. "))

  (setq BLK(tblnext"BLOCK"T)NAMES nil)
  (while BLK
    (if(=(cdr(assoc 0(entget(cdr(assoc -2 BLK)))))"ENDBLK")
    (progn
      (if(setq NB(ssget "X" (list(assoc 2 BLK))))
      (command"_erase"NB"")
       )
    (setq NAMES(cons(cdr(assoc 2 BLK))NAMES))
     )
   )
  (setq BLK(tblnext"BLOCK"))
  )
  (if NAMES
    (progn(textscr)
    (princ"\n  Nul blocks found and need purging: ")
    (foreach X NAMES(princ"\n    ")(princ X))
   )
  (princ"\n  No nul blocks found. ")
  )
(princ)
)
(c:DelNul)

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

hudster

  • Gator
  • Posts: 2848
Can someone post a copy of delnul.lsp
« Reply #5 on: February 14, 2004, 03:17:35 PM »
Yip thats it.

Strange though, i searched on cadalyst and didn't find anything.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue