TuttoCAD Forum
[
Home
|
Registrati
|
Discussioni Attive
|
Discussioni Recenti
|
Segnalibro
|
Msg privati
|
Sondaggi Attivi
|
Utenti
|
Album Fotografico
|
Download
| |
Cerca
|
FAQ
]
Nome Utente:
Password:
Salva Password
Password Dimenticata?
Tutti i Forum
1 - TuttoCAD Software
AutoLISP
Eliminare dati estesi
Nuova Discussione
Rispondi
Versione Stampabile
Aggiungi Segnalibro
Qui c'è:
Autore
Discussione
arri
Utente Master
Regione: Lombardia
14951 Messaggi
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)))
Terminator
Utente Master
725 Messaggi
Inserito il - 26 aprile 2011 : 02:20:22
Adesso li elimina...
Scarica allegato:
rimxdata.zip
1,14 KB
PS: De nada
Modificato da - Terminator in data 27 aprile 2011 16:52:50
arri
Utente Master
Regione: Lombardia
14951 Messaggi
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
Discussione
Nuova Discussione
Rispondi
Versione Stampabile
Aggiungi Segnalibro
Vai a:
Seleziona Forum
0 - Discussioni in primo piano
Pirateria del software: NO GRAZIE!
0 - CADLandia Magazine
CADLandia Magazine
1 - TuttoCAD Software
Rhinoceros 3D
Revit
Programmazione CAD
Modellatori tridimensionali e raytracing
Microstation
IntelliCAD
CoCreate
Cinema 4D
bCAD
AutoLISP
AutoCAD
Art*Lantis
ArchLine
Architectural Desktop
ArchiCAD
AddCAD
3d Studio Max (e Viz)
1 - Il forum sul software
2 - TuttoCAD Hardware
Stampanti e plotter
Schede Video
Retrocomputing
Notebook e palmari
Monitor
Memorie di massa
CPU e RAM
2 - Il forum sull'hardware
3 - TuttoCAD Generalista
Topografia
Progetto Standard CAD
Problemi di stampa
Grafica 2D
Glossario
GIS
Elementi finiti
Design
Conversione e condivisione di file
4 - TuttoCAD varie
Supporto per il materiale sul sito
Richieste e suggerimenti
--------------------
Home Page
Discussioni Attive
Domande Frequenti
Lista Utenti
Pagina di Ricerca
TuttoCAD Forum
© 2001-2010 CADLandia
Pagina generata in 0,51 secondi.