0 Members and 1 Guest are viewing this topic.
;; CAB 10.29.2007;; Hatch Base Point Edit(defun c:HBPEdit (/ ent elst x y bp) (command "._undo" "_begin") (if (and (setq ent (car (entsel "\nSelect hatch for new base point."))) (= (cdr (assoc 0 (setq elst (entget ent)))) "HATCH") ) (while (setq bp (getpoint "\nSelect new basepoint: ")) (setq x (car bp) y (car (cdr bp)) ) (setq elst (subst (cons 43 x) (assoc 43 elst) elst)) (setq elst (subst (cons 44 y) (assoc 44 elst) elst)) (entmod elst) ) (prompt "\nNot a hatch, bye.") ) (command "._undo" "_end") (princ))
(defun c:test(/ p1 p2 ent) (if (and (setq p1 (getpoint "\nSpecify hatch origon.")) (setq p2 (getpoint "\nSpecify internal point.")) ) (progn (Command "-HATCH" "_P" "_USER" 90.0 820.0 "_N" "_O" "_S" "_non" p1 "_N" "_non" p2 "") (if (and (setq ent (entlast)) (equal '(0 . "HATCH") (assoc 0 (entget ent)))) (command "._explode" ent "") ) ) ) (princ))