- 积分
- 457
- 明经币
- 个
- 注册时间
- 2017-10-29
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
本帖最后由 starysb 于 2024-5-17 08:50 编辑
自己编的一个比例格式刷,可以刷(块,文字,标注)的全局比例,唯独多重引线刷不了.还请哪位大神能把多重引线的加上,还请用lisp,mac本用不了vlisp等高级语言,
(defun c:MK () ;刷比例
(setq c (getvar "DIMSCALE"))
(princ "\n把块的比例改为 ")
(princ (getvar "DIMSCALE"))
(setq ee (ssget))
(setq k (ssname ee 0));可以得到K
;;(setq ee (entsel "\n"))
;;(setq k(car(list (car ee))));块的名字
;(setq aa (entget (car ee)))
(setq aa (entget k ))
(setq bb (cdar(list (assoc 0 aa))))
(setq cc (cdar(list (assoc 41 aa))))
(setq dd (cdar(list (assoc 40 aa))))
(setq PT (cdar(list (assoc 10 aa))))
(IF (= bb "INSERT" )
(progn
(setq N (abs (/ 1 CC)))
(command "scale" k "" pt n)
(command "scale" k "" pt c)
)
)
(IF (= bb "TEXT" )
(progn
(setq N (abs (/ 1 (/ dd 3))))
(command "scale" k "" pt n)
(command "scale" k "" pt c)
)
)
(IF (= bb "MTEXT")
(progn
(setq N (abs (/ 1 (/ dd 3))))
(command "scale" k "" pt n)
(command "scale" k "" pt c)
)
)
(IF (= bb "DIMENSION")
(command "_dimoverride" "dimscale" c "" ee "")
)
(IF (= bb "MULTILEADER")
????????
??????????????
?????????
)
(princ)
)
|
|