乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 139|回复: 0

[编程交流] CANNOSCA 的重置和排序

[复制链接]

56

主题

256

帖子

230

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
253
发表于 2022-8-26 05:37:44 | 显示全部楼层 |阅读模式
大家好,
请参阅附图,其中有两个 1:1 比例。但是一个叫1:1,另一个叫1:1000。我不知道这是怎么发生的,但这是我本周在办公室看到的一幅画。
命名的 1:1000 比例在 Edit Scale GUI 中显示为灰色。
也许有人可以阐明如何解决这个问题。
这是我有 ATM 的代码,它每次都有 60% 的时间工作。
063748a8qozi8es4v585s4.png

  1. (vl-load-com); by Ian_Bryant, 2013-04-25 12:20 PM; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-lisp-to-sort-cannoscale-list/m-p/3887927#M310705; Reported bug for not sorting the scale in this reply also.; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-lisp-to-sort-cannoscale-list/m-p/11381844#M435522(defun c:Reset_Cannoscale_List_Metric (/ var_cmdecho xpt as3 ndict dict sce sx sl dl xl)  (setq var_cmdecho (getvar "cmdecho"))  (setvar "cmdecho" 0)  (setq xpt (getvar "expert"))  (setvar "expert" 5)  (command "-scalelistedit" "reset" "yes" "exit")  (command "-scalelistedit" "delete" "*")  ; List of standard ISO scales (from ISO 13567) below.  ; "1:1" "1:2" "1:5" "1:10" "1:20" "1:25" "1:50" "1:75" "1:100" "1:200" "1:250" "1:500" "1:750" "1:1000" "1:2000" "1:2500" "1:5000" "1:10000"  (foreach n '("1:1" "1:2" "1:5" "1:10" "1:20" "1:25" "1:50" "1:75" "1:100" "1:200" "1:250" "1:500" "1:750" "1:1000" "1:2000" "1:2500" "1:5000" "1:10000")    (command "add")    (command n)    (command n)  )  (command "exit")  (setvar "expert" xpt)  (setvar "cmdecho" var_cmdecho)  (setq dict (dictsearch (namedobjdict) "acad_scalelist"))  (setq as3   (assoc 3 dict)        ndict (cdr (member as3 (reverse dict)))        dict  (member as3 dict)  )  (while (setq as3 (assoc 3 dict))    (setq dict (member as3 dict)          dl   (cons (cdr as3) dl)          sce  (cdr (assoc 350 dict))    )    (if (> (setq sx (/ (cdr (assoc 140 (entget sce))) (cdr (assoc 141 (entget sce))))) 1.0)      (setq xl (cons (cons sx sce) xl))      (setq sl (cons (cons sx sce) sl))    )    (setq dict (cdr dict))  )  (setq sl (vl-sort sl '(lambda (x y) (> (car x) (car y)))))  (if xl (setq sl (append sl (vl-sort xl '(lambda (x y) (< (car x) (car y)))))))  (setq dl (acad_strlsort dl))  (setq n 0)  (repeat (length dl)    (setq ndict (cons (cons 3 (nth n dl)) ndict)          ndict (cons (cons 350 (cdr (nth n sl))) ndict)          n     (1+ n)    )  )  (entmod (reverse ndict))  (princ))(c:Reset_Cannoscale_List_Metric);;----------------------------------------------------------------------;;;;                             End of File                              ;;;;----------------------------------------------------------------------;;
        
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-3 18:13 , Processed in 0.622004 second(s), 57 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表