Hello, I have been reading this thread and others that I found. Although I understood some things, I can't get a routine to work for me. I'm trying to create a routine that selects all the objects from a specific layer, rectangles, circles, or polylines, and applies an offset to them with a distance of D to the outside. But I can't get the offset to be created. Here is a portion of the code to see if you can help me:
(setvar "OFFSETGAPTYPE" 0)
(setq DISTANCIA 0.025)
(command "_.-layer" "_s" "LAYER1" "")
(setq N (sslength ELEMENT))
(setq I 0)
(while (< I N)
(setq ENAME (ssname ELEMENT I))
(if (and (eq (cdr (assoc 0 (entget ENAME))) "LWPOLYLINE")
(eq (cdr (assoc 8 (entget ENAME))) "LAYER1"))
(command "_.OFFSET" "e" "y" DISTANCIA ENAME pause "")
)
(setq I (1+ I))
)
ASV