;; spline、arc 、块内实体、dxf 210码不正常等等的实体——待后续研究
- ;; zzgl(Z轴归零)
- ;; 测试实例
- (defun c:zzgl ()
- (princ "\n选择归零实体: ")
- (if (setq ss (ssget))
- (setq lst (xyp-Ss2List ss)
- lst (mapcar 'xyp-Zzgl lst)
- )
- )
- (princ)
- )
- ;; Z轴归零主函数 xyp-Zzgl
- (defun xyp-Zzgl (s1 / p10)
- ;; 属性块实体: 先移位后属性实体归零
- (if (and (xyp-Etype s1 "insert")
- (= (xyp-Dxf 66 s1) 1)
- )
- (progn
- (setq p10 (xyp-Dxf 10 s1))
- (xyp-Move s1 p10 (list (car p10) (cadr p10) 0))
- (foreach ob (xyp-AttList s1)
- (xyp-Zzgl (vlax-vla-object->ename ob))
- )
- )
- )
- ;; 一般实体
- (foreach a '(10 11 12 13 14)
- (xyp-Zzgl-Dxf s1 a)
- )
- ;; 有38码的实体
- (if (/= (setq pt (xyp-Dxf 38 s1)) 0)
- (xyp-SubUpd s1 38 0)
- )
- ;; spline实体、arc 实体、块内实体、dxf 210码不正常的实体
- )
|