我编写了一些代码,将单个字母插入到使用带属性块的多重引线中。放置第一条多重引线后,它将递增到字母表中的下一个字母,并提示用户放置下一条多重引线。这种情况一直持续到用户将带有字母“Z”的多重引线放置在其中或用户点击“Escape”键之后。我希望它继续经过字母“Z”,但不是只有一个字母,我希望它从“AA”开始,然后继续到“ZZ”。有人能给我指出正确的方向,让我完成这件事吗?
- (defun c:WID ( / *error* weld numb)
- (defun *error* (msg)
- (if (not (member msg '("Function cancelled" "quit / exit abort")))
- (princ (strcat "\nError: " msg))
- )
- (princ)
- )
- (initget "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z")
- (setq weld (getkword "\nEnter weld identification letter: ")
- numb (ascii weld)
- )
- (while (<= numb 90)
- (command "mleader" pause pause (chr numb))
- (setq numb (1+ numb))
- )
- (princ)
- )
未经测试,前往午餐,HTH |