很久以来,我一直在复习AutoLISP教程,以摆脱一些锈迹。
我一直在努力使这个练习有效,我从(http://www.jefferypsanders.com/autolispintr_sele.html)它拒绝工作。我倾向于使用条件,而不是IF语句,但仍然。。。很高兴知道为什么它一直跳转到警报。
- (defun C:myProg2()
- (if (setq mySet(ssget "X" (list (cons 8 "STR")(cons 0 "CIRCLE")))) ;get set
- (progn ;going to have multiple statements
- (setq pt1(getpoint "\n Base Point: ")) ;store base point
- (setq pt2(getpoint "\n Displacement Point: ")) ;store displacement pt
- (command "move" mySet "" pt1 pt2) ;move all entities
- ) ;close the progn
- (alert "No entites Match Criteria!") ;else alert the user of an error
- ) ;close the if statement
- (princ) ;clean exit (supresses echo)
- ) ;close the program
编辑:我刚刚意识到-这个代码只有在图层STR上有一个圆圈的时候才有效。天啊,我生锈了。。。没有关系。我不能删除这个该死的帖子。 |