54256 发表于 2016-5-3 11:08:38

怎样知道ucs名已使用

保存当前ucs时
(command "ucs" "s" "1234")
若“1234”已经被使用,需要增加一个“y”
(if ******
      (command "ucs" "s" "1234" “y”)
      (command "ucs" "s" "1234")
)
请问一下*****部分该怎么写


lxw320 发表于 2016-5-3 12:55:19

本帖最后由 lxw320 于 2016-5-3 12:57 编辑

(= (getvar "ucsname") "1234")

自贡黄明儒 发表于 2016-5-3 12:58:37

看了这个,你可能明白http://bbs.xdcad.net/thread-678868-1-1.html

54256 发表于 2016-5-3 14:49:18

lxw320 发表于 2016-5-3 12:55 static/image/common/back.gif


这个没用吧,若目前的ucs不是“1234”,想存为“1234”就不管用

小菜123 发表于 2016-5-4 09:22:01

方法1:(not (vl-catch-all-error-p (vl-catch-all-apply 'vla-item (list (vla-get-usercoordinatesystems (vla-get-activedocument (vlax-get-acad-object))) "1234"))))
方法2不需要判断:(vl-cmdf "ucs" "save" "1234") (if (= (getvar "cmdactive") 1) (vl-cmdf "y"))

ivde 发表于 2016-5-4 11:52:54


(tblsearch "ucs" "1234")

shh1980 发表于 2016-5-6 12:38:48


(if (= (getvar "ucsname") "1234")                  
    (command "ucs" "_d" "1234" "UCS" "_s" "1234")
    (command "UCS" "_s" "1234")
)

页: [1]
查看完整版本: 怎样知道ucs名已使用