尝试一下:
- (defun c:test (/ lastkleur)
- (setq lastcolor (getvar "cecolor"))
- (setvar "cecolor" "22")
- (princ "\give 4 corners :")
- (setq a (getpoint "\nspecify first point:"))
- (setq b (getpoint "\nspecify second point:"))
- (setq c (getpoint "\nspecify third point:"))
- (setq d (getpoint "\nspecify fourth point:"))
- (command "pline" a b d c "close" "")
- (command "solid" a b c d "")
- (setvar "cecolor" lastcolor)
- (princ)
- )
|