;Find and remove extra Softdesk PROJ_NAM blocks. ; ; AUTHOR: Henry C. Francis ; 425 N. ASHE ST. ; Southern Pines, NC 28387 ; All rights reserved without prejudice. ; ; Copyright: 12-22-94 ; Edited: 3-17-95 ; (DEFUN C:fixdca ( / tht tset tsln cntr tent edtw) (setq osmde (getvar"osmode")) (setvar "osmode" 0) ;(setq bscl (ureal 1 "" "\nScale Factor: " 1)) ;(setq blkol (ustr 1 "Block Name? " (if blkol blkol "point") nil)) (setq getit (strcat "((-4 . \"\"))")) (setq tset (ssget "x"(read getit))) (if tset (progn (setq tsln (sslength tset)) (setq cntr 0) );progn );if (textscr) (if tset (progn (princ "\nThe following DCA_INFO exists each in a separate PROJ_NAM block.") (princ "\n ") );progn (princ "\nNo DCA_INFO exists. ") );if (while (if (and (< cntr tsln) tset) (setq tent (entget (ssname tset cntr))) );if (progn (princ (strcat "\n"(rtos cntr 2 0)" "(cdr(assoc 1(entget(entnext(ssname tset cntr))))))) ; (setq edtw (entget (cdar tent))) ; (setq inxyz (trans(cdr(assoc 10 edtw)) 0 1)) ; (command ".scale" (cdar edtw) "" inxyz bscl) (setq cntr (1+ cntr)) );progn );while (if tset (progn (setq prjnm (uint 1 "" "\nEnter the number of the correct project." 0)) (if (and prjnm (< prjnm (sslength tset))) (progn (ssdel (ssname tset prjnm)tset) (setq tsln (sslength tset)) (setq cntr 0) (while (and (< cntr tsln) tset) (progn (entdel (ssname tset cntr)) (setq cntr (1+ cntr)) );progn );while );progn );if );progn );if (setvar "osmode" osmde) (graphscr) );DEFUN