马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Strip XData from the Layer Table using LISPBy Fenton Webb
Issue
How do I remove the XDATA that is attached to my Layer Table ?
Solution
The following AutoLISP code will remove all the XData attached to the Layer Table:
 - (defun StripLayerXdata () (setq aLayerLst (tblnext "LAYER" T))
- (while aLayerLst
- (setq aLayerName (cdr (assoc '2 aLayerLst)))
- (setq aLayerELst (entget (tblobjname "LAYER" aLayerName) '("*")))
- (if (setq xdata (assoc '-3 aLayerELst))
- (progn
- (setq newLayerLst (subst (cons (car xdata) (list (list (caadr xdata))))
- xdata aLayerELst))
- (entmod newLayerLst)
- )
- )
- (setq aLayerLst (tblnext "LAYER"))
- )
- (princ)
- )
- (vl-doc-export 'StripLayerXdata)
- (princ "\nStripLayerXdata loaded, type (StripLayerXdata) to run.")
- (princ)
|