V I S U A L I Z Z A D I S C U S S I O N E |
arri |
Inserito il - 09 novembre 2010 : 12:16:28 purtroppo il lisp del link non elimina i dati estesi di entità nidificate
; Marc'Antonio Alessi - http://xoomer.virgilio.it/alessi ; Function: ALE_DelXdataSs ; ; Version 1.01 - 08/04/2003 ; Version 1.02 - 31/05/2006 ; ; Description: ; delete XData of specified APPID(s) ; ; Arguments: ; BitFlg = 1 prompts ON ; BitFlg = 2 erase Xdata on all objects ; ; Use: ; (ALE_DelXdataSs '("MyApp1" "MyApp2") 1) ; delete by AppID's and by selection ; or ; (ALE_DelXdataSs '("*") 3) ; delete all AppID's from all objects ; ; Comments: ; The filter in ssget is not useful, because in case of a block with ; Attribute Xdata only, it doesn't work. ; The argument of the function should be a list. This allows you to ; delete Xdata's with different AppID's. ; (defun ALE_DelXdataSs (ApsLst BitFlg / SsXdat ApsStr EntNam Countr) (setq ApsStr "") (foreach AppNam ApsLst (setq ApsStr (strcat ApsStr "," AppNam)) ) (if (= 2 (logand 2 BitFlg)) (setq SsXdat (ssget "_X" (list (list -3 (list (substr ApsStr 2)))))) (setq SsXdat (ssget (list (list -3 (list (substr ApsStr 2)))))) ) (cond ( SsXdat (repeat (setq Countr (sslength SsXdat)) (setq Countr (1- Countr) EntNam (ssname SsXdat Countr) EntDat (entget EntNam ApsLst) ) (ALE_DelXdataEnt EntNam EntDat) (and (= "INSERT" (DXF 0 EntDat)) (= 1 (DXF 66 EntDat)) (while (= "ATTRIB" (DXF 0 (setq EntDat (entget (setq EntNam (entnext EntNam)) ApsLst)) ) ) (ALE_DelXdataEnt EntNam EntDat) ) ) );repeat (and (= 1 (logand 1 BitFlg)) (princ "\nEliminazione Xdata eseguita. ")) ) ( (= 1 (logand 1 BitFlg)) (princ "\nNon è stato trovato nessun oggetto con Xdata. ") ) ) ) ; ; Use: ; (ALE_DelXdataEnt ename '("MyApp1" "MyApp2")) ; (defun ALE_DelXdataEnt (EntNam EntDat / EntDat TmpLst) (foreach ForElm (DXF -3 EntDat) (setq TmpLst (cons (list (car ForElm)) TmpLst)) ) (entmod (list (cons -1 EntNam) (cons -3 TmpLst))) ) ; DXF Funzione di ricerca codici dxf. ; (defun Dxf (DxfCod EntDat) (cdr (assoc DxfCod EntDat))) |
2 U L T I M E R I S P O S T E (in alto le più recenti) |
arri |
Inserito il - 26 aprile 2011 : 07:49:18 Messaggio inserito da Terminator
Adesso li elimina...
Scarica allegato:
rimxdata.zip 1,14 KB
Grazie Terminator  Questo è un bel regalo di Pasqua 
|
Terminator |
Inserito il - 26 aprile 2011 : 02:20:22 Adesso li elimina...
Scarica allegato:
rimxdata.zip 1,14 KB
PS: De nada |