offset to layer

There used to be a lisp routine around at one time that would allow you to offset to a specified layer and repeated until you were finished.
Can anyone help? Thanks in advance.. RikH
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

see below. (No idea who did it):
(defun C:OFLY () (setvar "cmdecho" 0) (initget 1) (setq wd (getdist "\nOffset Width : ")) (setq ly (getvar "clayer") n 50) (while (> n 0) (setq a (entsel "\nSelect Entity to Offset :")) (setq ent (car a) pt (cadr a)) (setq b (getpoint pt "\nOffset Direction : ")) (command "OFFSET" wd pt b "") (setq c (entlast)) (command "CHPROP" c "" "LA" ly "") (setq col (substr (getvar "cecolor") 1 2)) (if (= col "BY") (command "CHPROP" "L" "" "C" "bylayer" "") (progn (setq col (atoi col)) (command "CHPROP" "L" "" "C" col "") ) ) (setq n (1- n)) ) )
--

MichaelB
www.michaelbulatovich.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.