大家早上好!
我编写了所有这些代码,将所有文本从一个标准更改为defpoints(一个不同的标准),只需按下一个按钮,即可完整地翻译所有层。不过,根据图形的大小,运行大约需要30-45秒。我知道这一切都是重复的,所以也许有另一种方法可以更快地做到这一点?
这是我从头开始写的第一段代码!所以我还在学习。谢谢你的建议。
- (defun c:QFIXtest ()
- (setq sset (ssget "x" '((8 . "STRUCTURES")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset "" "c" "bylayer" "")
- (command ".chprop" sset "" "la" "Defpoints" "")
- (setq sset1 (ssget "x" '((8 . "TOWER")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset1 "" "c" "bylayer" "")
- (command ".chprop" sset1 "" "la" "Defpoints" "")
- (setq sset2 (ssget "x" '((8 . "FENCE")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset2 "" "c" "bylayer" "")
- (command ".chprop" sset2 "" "la" "Defpoints" "")
- (setq sset3 (ssget "x" '((8 . "LEASED_AREA")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset3 "" "c" "bylayer" "")
- (command ".chprop" sset3 "" "la" "Defpoints" "")
- (setq sset4 (ssget "x" '((8 . "PROPOSED")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset4 "" "c" "bylayer" "")
- (command ".chprop" sset4 "" "la" "Defpoints" "")
- (setq sset5 (ssget "x" '((8 . "LANDSCAPING")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset5 "" "c" "bylayer" "")
- (command ".chprop" sset5 "" "la" "Defpoints" "")
- (setq sset6 (ssget "x" '((8 . "LEVEL")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset6 "" "c" "bylayer" "")
- (command ".chprop" sset6 "" "la" "Defpoints" "")
- (setq sset7 (ssget "x" '((8 . "ANTENNA_MOUNTS")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset7 "" "c" "bylayer" "")
- (command ".chprop" sset7 "" "la" "Defpoints" "")
- (setq sset8 (ssget "x" '((8 . "ANTENNA")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset8 "" "c" "bylayer" "")
- (command ".chprop" sset8 "" "la" "Defpoints" "")
- (setq sset9 (ssget "x" '((8 . "DIMENSIONS")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset9 "" "c" "bylayer" "")
- (command ".chprop" sset9 "" "la" "Defpoints" "")
- (setq sset10 (ssget "x" '((8 . "ANTENNA_PROPOSED")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset10 "" "c" "bylayer" "")
- (command ".chprop" sset10 "" "la" "Defpoints" "")
- (setq sset11 (ssget "x" '((8 . "MOUNTS_PROPOSED")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset11 "" "c" "bylayer" "")
- (command ".chprop" sset11 "" "la" "Defpoints" "")
- (setq sset12 (ssget "x" '((8 . "PROPERTY_LINES")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset12 "" "c" "bylayer" "")
- (command ".chprop" sset12 "" "la" "Defpoints" "")
- (setq sset13 (ssget "x" '((8 . "CUSTOMER")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset13 "" "c" "bylayer" "")
- (command ".chprop" sset13 "" "la" "Defpoints" "")
- (setq sset14 (ssget "x" '((8 . "REV_LAYER")(0 . "TEXT,MTEXT,*LEADER"))))
- (command ".chprop" sset14 "" "c" "bylayer" "")
- (command ".chprop" sset14 "" "la" "Defpoints" "")
- ;changes layer
- (setq sset15 (ssget "x" '((8 . "STRUCTURES"))))
- (command ".chprop" sset15 "" "c" "bylayer" "")
- (command ".chprop" sset15 "" "la" "01_Data" "")
- (setq sset16 (ssget "x" '((8 . "TOWER"))))
- (command ".chprop" sset16 "" "c" "bylayer" "")
- (command ".chprop" sset16 "" "la" "02_Tower" "")
- (setq sset17 (ssget "x" '((8 . "FENCE"))))
- (command ".chprop" sset17 "" "c" "bylayer" "")
- (command ".chprop" sset17 "" "la" "03_Fence" "")
- (setq sset18 (ssget "x" '((8 . "LEASED_AREA"))))
- (command ".chprop" sset18 "" "c" "bylayer" "")
- (command ".chprop" sset18 "" "la" "06_Lease Area" "")
- (setq sset19 (ssget "x" '((8 . "PROPOSED"))))
- (command ".chprop" sset19 "" "c" "bylayer" "")
- (command ".chprop" sset19 "" "la" "08_Proposed Data" "")
- (setq sset20 (ssget "x" '((8 . "LANDSCAPING"))))
- (command ".chprop" sset20 "" "c" "bylayer" "")
- (command ".chprop" sset20 "" "la" "01_Data" "")
- (setq sset21 (ssget "x" '((8 . "ARROW"))))
- (command ".chprop" sset21 "" "c" "bylayer" "")
- (command ".chprop" sset21 "" "la" "Defpoints" "")
- (setq sset22 (ssget "x" '((8 . "LEVEL"))))
- (command ".chprop" sset22 "" "c" "bylayer" "")
- (command ".chprop" sset22 "" "la" "01_Data" "")
- (setq sset23 (ssget "x" '((8 . "ANTENNA_MOUNTS"))))
- (command ".chprop" sset23 "" "c" "bylayer" "")
- (command ".chprop" sset23 "" "la" "01_Data" "")
- (setq sset24 (ssget "x" '((8 . "ANTENNA"))))
- (command ".chprop" sset24 "" "c" "bylayer" "")
- (command ".chprop" sset24 "" "la" "01_Data" "")
- (setq sset25 (ssget "x" '((8 . "DIMENSIONS"))))
- (command ".chprop" sset25 "" "c" "bylayer" "")
- (command ".chprop" sset25 "" "la" "Defpoints" "")
- (setq sset26 (ssget "x" '((8 . "ANTENNA_PROPOSED"))))
- (command ".chprop" sset26 "" "c" "bylayer" "")
- (command ".chprop" sset26 "" "la" "08_Proposed Data" "")
- (setq sset27 (ssget "x" '((8 . "MOUNTS_PROPOSED"))))
- (command ".chprop" sset27 "" "c" "bylayer" "")
- (command ".chprop" sset27 "" "la" "08_Proposed Data" "")
|