 - (defun c:q(/ p lst ss ent00 cmd_old)
- (vl-load-com)
- (setq lst '() cmd_old(getvar 'cmdecho) ent00(entlast))
- (setvar 'cmdecho 0)
- (if (setq ss(ssget '((0 . "*line,arc,ellipse,circle"))))
- (progn
- (command "-HATCH" "p" "ansi31" "15" "0" "s" ss "" )
- (while(setq p(getpoint))(command p))
- (command "")
- (if (and ent00 (/= (cdr(assoc 5 (entget(entlast)))) (cdr(assoc 5 (entget ent00)))))
- (progn
- (vlax-put(vlax-ename->vla-object(entlast))'color 250)
- (princ "ok!")
- )
- (princ "The hatch object creat unsuccessfully!"))
- )
- (progn
- (command "-HATCH" "p" "ansi31" "15" "0")
- (while(setq p(getpoint))(command p))
- (command "")
- (if (and ent00 (/= (cdr(assoc 5 (entget(entlast)))) (cdr(assoc 5 (entget ent00)))))
- (progn
- (vlax-put(vlax-ename->vla-object(entlast))'color 250)
- (princ "ok!")
- )
- (princ "The hatch object creat unsuccessfully!"))
-
- )
- )
- (and cmd_old (setvar 'cmdecho cmd_old))
- (princ)
- )
|