- UID
- 107992
- 积分
- 999
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-3-1
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我在这里下载了一个程序,是修改块中属性的,可运行不起来,又找不到出处,请高手帮忙看一下这个程序错在那
(defun c:sk ()
(vl-load-com)
(setq att (getstring "\nChange attribute [Angle/Color/Height/Layer/Position/Style/Value/Tagstring]: "))
(setq obj (car (nentsel "\nSelect an Attribute: ")))
(setq obj (vlax-ename->vla-object obj))
(cond
((= (strcase att) "A")
(setq ang (getstring t "\nNew Angle: "))
(vlax-put-property obj 'rotation ang))
((= (strcase att) "C")
(setq col (getstring "\nNew Color Number: "))
(vlax-put-property obj 'color col))
((= (strcase att) "H")
(setq ohei (vlax-get-property obj 'height))
(setq hei (getdist (strcat "\nNew Height <" (rtos oh 2 2) ">:")))
(if (= hei "")(setq hei ohei))
(vlax-put-property obj 'height hei))
((= (strcase att) "L")
(setq lay (getstring "\nNew Layer:"))
(if (not (tblsearch "LAYER" lay))
(alert (strcat "\nLayer " (strcase lay) " doesn't exist!"))
(vlax-put-property obj 'layer lay)
))
((= (strcase att) "P")
(setq pos (getpoint "\nNew Position:"))
(vlax-put-property obj 'textalignmentpoint (vlax-3d-point pos)))
((= (strcase att) "S")
(setq sty (getstring "\nNew Style: "))
(if (not (tblsearch "STYLE" sty))
(alert (strcat "\nThe style " (strcase sty) " doesn't exist!"))
(vlax-put-property obj 'stylename sty)
))
((= (strcase att) "V")
(setq val (getstring t "\nNew value: "))
(vlax-put-property obj 'textstring val))
);c
(princ)
);defun |
|