;; | ---------------------------------------------------------------------------- ;; | XD_remxd ;; | ---------------------------------------------------------------------------- ;; | Function : removes extended entity data from selection ;; | Arguments: ;; | 'ss' - Selection set to process ;; | 'AppName' - Application Name to remove Xdata (cannot be * or ;; | wildcards) ;; | 'Verbose' - If T, a message is displayed while deleting ;; | Action : Checks for extended entity data and removes them ;; | Returns : The selection set and number of objects whose Xdata was removed, ;; | as well as the number of objects ignored. ;; | Updated : March 19, 1999 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun XD_RemXd (ss AppName Verbose / xd ssl cnt ename tmp NumProc NumNotProc RemSS) (setq NumProc 0 NumNotProc 0 RemSS (ssadd) ) (if (= (type ss) 'ENAME) (progn (setq tmp (ssadd)) (ssadd ss tmp) (setq ss tmp) )) (if ss (progn (setq cnt 0 ssl (sslength ss) tmp (strcat " of " (itoa ssl)) ) (if Verbose (princ "\n")) (repeat ssl (setq ename (ssname ss cnt) xd (assoc -3 (entget ename (list AppName))) cnt (1+ cnt) ) (if xd (progn (entmod (list (cons -1 ename) (list -3 (list AppName)))) (setq NumProc (1+ NumProc)) (ssadd ename RemSS) ) (setq NumNotProc (1+ NumNotProc)) ) (if Verbose (princ (strcat "\rRemoving extended entity data belonging to application " AppName "..." (itoa cnt) tmp)) ) ) )) (list (if (> (sslength RemSS) 0) RemSS nil) NumProc NumNotProc) )