偏移x单位并移动
你好我想编写autolisp以偏移x单位,并将偏移的对象移动到y层。
谢谢
谢伊 您可以从上一个线程的代码开始。 由于我对autolisp完全陌生,所以我无法理解这个帖子(但我在其他语言中也有Expirence)
我遇到了这个代码,但我几乎不懂
我用问题添加评论
(defun c:test (/ n ss p e); 1. what the switch / means?
(if
(and (setq n (getdist "\n Specify the Offset Distance
:"));2.what the use of "and"
here?
(setq
ss (ssget
"_+.:S:L" '((0 . "*POLYLINE,*LINE,CIRCLE,ELLIPSE")));3. select all
polys,line,circle,elipse anddput them in ss
variable?
)
(setq p (getpoint "\n
Specify point :"))
)
(progn
(command "_.offset" n ss "_non" p
"");4.offset all shapes?
(setq e
(entlast))
(if (tblsearch "LAYER"
"cover");.5???
(command
"_.chprop" e "" "_layer" "cover"
"");.6???
)
)
(princ)
)
(princ)
)
谢谢
S 1设置局部变量,使其不留在内存中(a b/c d e)a b保持为内存中的变量
2使用和作为用户输入的测试
3选择所有对象
4提供所有对象
5检查是否存在层覆盖,如果没有
6制作层见6
7(princ)在结束退出时公平地在屏幕上以其他方式获取消息
8 ss选择集可以是任何你喜欢的“mylist”
页:
[1]