AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Would you like a quick flash?
Save this as "Flash.lsp" and then load it into AutoCAD.
For good results you need to open a "busy" drawing.
Syntax : (flash "Layer Name")
Example : Type (flash "7") at the command line.

;CODING STARTS HERE
(defun flash (layname)
(cond ((setq lyr (tblobjname "LAYER" layname))
(setq lyr (entget lyr)
a (cdr (assoc 62 lyr))
b a
)
(while (/= (car (grread 2)) 2)
(entmod (subst (cons 62 (setq a (* -1 a))) (assoc 62 lyr) lyr))
)
(entmod (subst (cons 62 b) (assoc 62 lyr) lyr))
)
)
(princ)
)
;CODING ENDS HERE

Thanks and applause go to Stig Madsen.

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