Message 1 of 5
lisp from hatch solid to hatch ansi31
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a lisp that makes Hatch Solid to Hatch ansi31.
In the lisp, I must choose the Hatch Solid to lisp changes the Hatch ansi31.
What should I do to that the lisp automatically work on all Hatch Solid in the draw without the need of the user's choice?
The lisp:
(defun c:2ansi31 (/ ss)
(cond ((not acdoc)
(setq acdoc (vla-get-activedocument (vlax-get-acad-object)))
)
)
(if (setq ss (ssget "_:L" '((0 . "HATCH") (2 . "~ansi31"))))
(progn
(vla-StartUndoMark acdoc)
((lambda (i / sn)
(while
(setq sn (ssname ss (setq i (1+ i))))
(vla-setPattern
(vlax-ename->vla-object sn)
acHatchPatternTypePreDefined
"ansi31"
)
)
)
-1
)
(vla-EndUndoMark acdoc)
)
(princ)
)
(princ)
)
Dvir.