ZWX168 发表于 2007-5-11 09:12

尺寸对齐的程序,高版本的CAD有此功能,可低版本的没有,自己编一个,
只能对水平、垂直的标注有效!!!!!!!

不够完善,那位大师补充一下

(defun C:DIMalign()
(setqDIMENSION (entget (car (entsel))))
(setq DIMENSION (subst (cons 70 160) (assoc 70 DIMENSION) DIMENSION ))
(if (= (cdr (assoc '50 DIMENSION)) 0.0)
(progn
    (setq Y (caDdr (assoc '10 DIMENSION)))
    (setq X (cadr (assoc '11 DIMENSION)))
    (setq DIMENSION (subst (cons 11 (LIST X Y 0.0)) (assoc 11 DIMENSION) DIMENSION ))
    (entmod DIMENSION)
    (setq Y (caDdr (assoc '11 DIMENSION)))
    (setq SSL (SSGET))
    (setq N (- (sslength ssl) 1))
    (setq test 0)
    (while (<= testN )
    (setq DIMENSION (ENTGET (ssname ssL test)))
    (setq DIMENSION (subst (cons 70 160) (assoc 70 DIMENSION) DIMENSION ))
    (setq X (cadr (assoc '11 DIMENSION)))
    (setq DIMENSION (subst (cons 11 (LIST X Y 0.0)) (assoc 11 DIMENSION) DIMENSION ))
    (entmod DIMENSION)
    (setq test (+ 1 test))
    )
)
(progn
    (setq X (cadr (assoc '10 DIMENSION)))
    (setq Y (caddr (assoc '11 DIMENSION)))
    (setq DIMENSION (subst (cons 11 (LIST X Y 0.0)) (assoc 11 DIMENSION) DIMENSION ))
    (entmod DIMENSION)
    (setq X (cadr (assoc '11 DIMENSION)))
    (setq SSL (SSGET))
    (setq N (- (sslength ssl) 1))
    (setq test 0)
    (while (<= testN )
    (setq DIMENSION (ENTGET (ssname ssL test)))
    (setq DIMENSION (subst (cons 70 160) (assoc 70 DIMENSION) DIMENSION ))
    (setq Y (caDdr (assoc '11 DIMENSION)))
    (setq DIMENSION (subst (cons 11 (LIST X Y 0.0)) (assoc 11 DIMENSION) DIMENSION ))
    (entmod DIMENSION)
    (setq test (+ 1 test))
    )
)
)
)

陈微积分 发表于 2007-5-15 21:17

能不能比较一下VB,VBA,LIST几中开发方式啊.并介绍相关的书.谢谢了

ZWX168 发表于 2007-5-29 16:52

:'( :'( :'(
公司收到CAD的律师函,要改为国产软件,垃圾
别了,我的CAD

ZWX168 发表于 2007-5-29 16:56

学习VBA、LISP不需要什么书,我几乎没看过书,他的帮助文件比任何书都好!
那里有大量例子,尤其是VBA的例子很实用!!!!
页: 1 [2]
查看完整版本: 怎么没有二次开发的?