- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys,
I found one lisp that helped me a lot, creating a offset to both side. But I can't choose if the layer will be the current or origin. Someone can help me?
Thanks.
The lisp that i'm using is:
defun c:dOff ( / *error* of undo doc ss )
(vl-load-com)
(defun *error* ( msg )
(and undo (vla-EndUndomark doc))
(or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
(princ (strcat "\n** Error: " msg " **")))
(princ)
)
(if (and (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE")))
(setq of (getdist "\nSpecify Offset Distance: ")))
(progn
(setq undo
(not
(vla-StartUndomark
(setq doc
(vla-get-ActiveDocument
(vlax-get-acad-object)
)
)
)
)
)
(vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc))
(mapcar
(function
(lambda ( o )
(vl-catch-all-apply
(function vla-offset) (list obj o)
)
)
)
(list of (- of))
)
)
(vla-delete ss)
(setq undo (vla-EndUndoMark doc))
)
)
(princ)
)
Solved! Go to Solution.