AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

I would like to hatch multiple objects by picking a polyline or picking inside a space. Is there a way this can be done with Lisp or vb so that the hatches remain individual for editing rather than becoming one block. I use AutoCAD 2000


Paste this into Notepad and save it as "MHatch.lsp".

;CODING STARTS HERE

(prompt "\nType MHATCH to run")

(defun c:mhatch ( / flag ans)

(setq flag (getstring "\nInternal Point or Object <I or O> : "))

(setq ans "y")

(if (or (= flag "I") (= flag "i"))

(progn

(while (or (= ans "y") (= ans "Y"))

(prompt "\nSpecify internal point : ")

(command "-bhatch" pause "")

(setq ans (getstring "\nContinue? <Y or N> : "))

);while

);progn

);if

(if (or (= flag "O") (= flag "o"))

(progn

(while (or (= ans "y") (= ans "Y"))

(prompt "\nSelect Object : ")

(command "-bhatch" "S" pause "" "")

(setq ans (getstring "\nContinue? <Y or N> : "))

);while

);progn

);if

(princ)

);defun

(princ)

;CODING ENDS HERE

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website