Search the Community
Showing results for tags 'offset lines draw line'.
-
Is it possible to make some sort of offsetline?. When you draw a line there will be on one or 2 sides of that line an offsetline at a distance you can determ?. For example, when you have to draw a road, but ypu only have the middle line and the width of the road, you coald use that command. You would have to put in the distance from the middle line and you would only have to draw the middle line (probaply pline) and there would be automaticcaly a line at the offsetvalue you have chosen. Is there something like that within AutoCAd?.
-
Lisp that draws a line and offsets next line a centerline and next a solid 2" apart??
jake77777 posted a topic in AutoLISP, Visual LISP & DCL
I was hoping someone out there knows how to use a lisp in one command that can allow our firm to draw a single solid line that automatically offsets a 2" centerline followed by another 2" offset solid line...If it's easier something like drawing a centerline using midpoint offset by two solid lines would absolutely work. The closest I found was the following code that allows you to offset a specified distance and only after you've drawn the line..and there all the same linetype. Our engineering firms uses this command SO much and it's just a bit more tedious bring in a block then stretching/extending/trimming it. Your help is GREATLY appreciated. (defun c:dOff1 ( / *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)) )