- ;;一键矩形
- (defun HRectang (p str)
- (command "_.Rectang" p (strcat "@" (vl-string-translate "X" "," str)))
- )
- (defun C:tt (/ LST P STR)
- (princ "\n 1<200*200>;2<400*200>;3<400*400>;4<500*500>;5<600*600>;6<700*700>;7<800*800>")
- (setq lst '("200X200" "400X200" "400X400" "500X500" "600X600" "700X700" "800X800" ))
- (setq num (getint "\n 请输入矩形对应序号1-7:"))
- (setq i 0)
- (foreach x lst
- (setq p nil)
- (setq i (+ i 1))
- (if (= i num)
- (cond ((setq p (getpoint "\n 请点击左下角基点")) (HRectang p x)))
- )
- )
- )
|