AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Help! I need a routine to draw a pline around an existing hatch that was created with bhatch and consequently has no selectable boundary.

-----------------------
;CODING STARTS HERE
(defun mosta-theway ()
(setq ENT (entget (car (entsel "\nPick hatch! :"))))
(setq POINTS (massoc 11 ENT))
(command "PLINE")
(foreach P POINTS
(command p)
);end foreach
(command "c" "")
);end defun

;MASSOC by Jaysen Long
(defun massoc (key alist / x nlist)
(foreach x alist
(if
(eq key (car x))
(setq nlist (cons (cdr x) nlist))
);end if
);end foreach
(reverse nlist)
);end defun
(princ)
;CODING ENDS HERE

Al Paca

 
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