<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AutoLISP for offsetting in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13889036#M167907</link>
    <description>&lt;P&gt;Awesome this seems to work well.&amp;nbsp; The only error I got a few times is if I'm zoomed far out then the second offset only does 0.5' off the original line.&amp;nbsp; But it I zoom in it works fine.&amp;nbsp; Thank you!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh, is there a way to have the originally selected polyline go to a specific layerC as part of this code, just in case it isn't on the correct layer already?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I didn't figure it out, so if you have a method of achieving this please let me know.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Nov 2025 19:04:50 GMT</pubDate>
    <dc:creator>ledgerat</dc:creator>
    <dc:date>2025-11-10T19:04:50Z</dc:date>
    <item>
      <title>AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498338#M112833</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a beginner to AutoLISP and I am trying to write a lisp that will allow me to select 1 line/polyline and offset that line/polyline to multiple pre-set distances all to the same side. I would like to write a lisp that will allow me to do this in just 2 clicks,&amp;nbsp;the first&amp;nbsp;click on the line/polyline that I would like to offset and the second click for what side of the line/polyline I would like to offset to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried writing lisps using setq and getpoint but I can't get the offset command to register the variable name with lisp. Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Polyline" style="width: 81px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/418812i13593D5FEAD07314/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture.PNG" alt="Polyline" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Polyline&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Polyline offset to 50, 150 and 250" style="width: 116px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/418810iCDA12DD9D42014F2/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture.PNG" alt="Polyline offset to 50, 150 and 250" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Polyline offset to 50, 150 and 250&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 23:39:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498338#M112833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-27T23:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498350#M112834</link>
      <description>&lt;P&gt;Maybe something like this&lt;/P&gt;
&lt;PRE&gt;(defun c:somefunc  (/ ent pt)
 (setq ent (car (entsel "\nSelect polyline to offset: "))
       pt  (getpoint "\nSelect side to offset: "))
 (foreach i '(50 150 250) (command "._offset" i ent pt "")))&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="offset_multiple.gif" style="width: 548px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/418813iE42578C82707C01C/image-size/large?v=v2&amp;amp;px=999" role="button" title="offset_multiple.gif" alt="offset_multiple.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 23:48:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498350#M112834</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-10-27T23:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498354#M112835</link>
      <description>&lt;PRE&gt;(Defun C:MultiOffset ( / p1 ob1)
  (command "offset" 50 (setq ob1 (entsel))  (setq p1 (getpoint)) "")
  (command "offset" 150 ob1 p1 "")
  (command "offset" 250 ob1 p1 "")
  (princ)
  );defun&lt;/PRE&gt;
&lt;P&gt;Very basic but I believe it works how you like it.&amp;nbsp; Maybe one of the gurus could post a better (although more complex) solution with error checking etc.&amp;nbsp; Not using the command function as well.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 23:52:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498354#M112835</guid>
      <dc:creator>Shneuph</dc:creator>
      <dc:date>2017-10-27T23:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498397#M112836</link>
      <description>&lt;P&gt;I think that your offering is very concise and works perfectly.&amp;nbsp; Nice work!&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 00:24:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498397#M112836</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-10-28T00:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498440#M112837</link>
      <description>&lt;P&gt;Thank you for the above suggestions! They are much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I failed to mention that I would also like for each line that has been created by offsetting to be on a separate pre-set layers, as in my below picture where each new line is on a separate layer; red, green or blue. I have had a look at both of the above lisps and I cannot work out how amend the code to make that happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Polyline offset with new lines on layers; red, green and blue" style="width: 123px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/418828iB9A57132353F72FA/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture.PNG" alt="Polyline offset with new lines on layers; red, green and blue" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Polyline offset with new lines on layers; red, green and blue&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 01:14:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498440#M112837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-28T01:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498478#M112838</link>
      <description>&lt;PRE&gt;(defun c:somefunc  (/ ent pt etdata)
 (setq ent (car (entsel "\nSelect polyline to offset: "))
       pt  (getpoint "\nSelect side to offset: "))
 (foreach i '((50 . “Layer1”) (150 . “Layer2”) (250 . “Layer3”))
(command "._offset" (car i) ent pt "")
(entmod (subst (cons 8 (cdr i)) (assoc 8 (setq etdata (entget (entlast)))) etdata))))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 02:06:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498478#M112838</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-10-28T02:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498503#M112839</link>
      <description>&lt;P&gt;Picking up on &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/450014"&gt;@Shneuph&lt;/a&gt;'s approach, but consolidating into just &lt;EM&gt;one&lt;/EM&gt;&amp;nbsp; (command) function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(Defun C:MultiOffset (/ p1 ob1)
  (command
    "_.offset" 50 (setq ob1 (entsel)) (setq p1 (getpoint)) ""
    "_.chprop" "_last" "" "_layer" "LayerA" ""
    "_.offset" 150 ob1 p1 ""
    "_.chprop" "_last" "" "_layer" "LayerB" ""
    "_.offset" 250 ob1 p1 ""
    "_.chprop" "_last" "" "_layer" "LayerC" ""
  ); command
  (princ)
);defun&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Oct 2017 03:36:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498503#M112839</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-10-28T03:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498967#M112840</link>
      <description>&lt;P&gt;That didn't work too well in my ACAD 2002...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Command: somefunc

Select polyline to offset:
Select side to offset: ._offset
Specify offset distance or [Through] &amp;lt;4'-2"&amp;gt;: 50
Select object to offset or &amp;lt;exit&amp;gt;:
Specify point on side to offset:
Select object to offset or &amp;lt;exit&amp;gt;:
Command: ; error: bad DXF group: (8 . “LAYER1”)&lt;/PRE&gt;
&lt;P&gt;Doesn't the layer have to exist first?&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 15:06:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498967#M112840</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-10-28T15:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498970#M112841</link>
      <description>&lt;P&gt;Didn't work very well for me in ACAD2002...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Command: multioffset
_.offset
Specify offset distance or [Through] &amp;lt;4'-2"&amp;gt;: 50
Select object to offset or &amp;lt;exit&amp;gt;:
Select object:
Specify point on side to offset:
Select object to offset or &amp;lt;exit&amp;gt;:
Command: _.chprop
Select objects: _last 1 found

Select objects:
Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness]: _layer
Enter new layer name &amp;lt;0&amp;gt;: LayerA
&lt;FONT color="#FF0000"&gt;Cannot find layer "LayerA".&lt;/FONT&gt;
; error: Function cancelled&lt;/PRE&gt;
&lt;P&gt;I think the layer has to exist first.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 15:12:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7498970#M112841</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-10-28T15:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7499205#M112842</link>
      <description>&lt;P&gt;It is better create as many layers , as offset to do , Or chek if exist, else make layer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 19:14:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/7499205#M112842</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2017-10-28T19:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12736629#M112843</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I checked on this code and I like the idea of specific offset distances and specific layers, however, is possible to make the routine to offset those lines on both sides of the centerline?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 16:50:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12736629#M112843</guid>
      <dc:creator>fcolocho</dc:creator>
      <dc:date>2024-04-26T16:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12736812#M112844</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/16090"&gt;@fcolocho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;... is possible to make the routine to offset those lines on both sides of the centerline? ....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you mean on both sides &lt;EM&gt;to the same set of distances and to the same Layers&lt;/EM&gt;, that's easier in a way, because it does not require the User to specify a side.&amp;nbsp; The&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (vla-offset)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;function can just do it twice, once with a positive distance and once with a negative.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:MultiOffsetB (/ esel obj); = Multiple Offsets to Both sides
  (if
    (and
      (setq esel (entsel "\nObject to Offset to both sides at mulitple distances &amp;amp; to multiple Layers: "))
      (wcmatch (cdr (assoc 0 (entget (car esel)))) "LINE,*POLYLINE,ARC,CIRCLE,ELLIPSE,SPLINE,XLINE")
    ); and
    (progn ; then
      (command "_.layer" "_new" "LayerA,LayerB,LayerC" ""); ensure they exist
      (setq obj (vlax-ename-&amp;gt;vla-object (car esel)))
      (foreach pair '((50 "LayerA") (150 "LayerB") (250 "LayerC"))
        (vla-offset obj (car pair))
        (command "_.chprop" "_last" "" "_layer" (cadr pair) "")
        (vla-offset obj (- (car pair)))
        (command "_.chprop" "_last" "" "_layer" (cadr pair) "")
      ); foreach
    ); progn
  ); if
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;I added the LAYER command to ensure the Layers exist -- it won't matter if they already do.&amp;nbsp; Any that do not will get default properties like color 7 and continuous linetype; any that do will keep their properties.&amp;nbsp; If they might not exist, that could be expanded to give them colors/linetypes/etc. as you prefer.&lt;/P&gt;
&lt;P&gt;And I added an entity-type check.&amp;nbsp; One curiosity is that for some reason the&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (vla-offset)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;approach &lt;EM&gt;does not work&lt;/EM&gt; on RAYs, even though ordinary OFFSET does.&amp;nbsp; So to include them would require an OFFSET-command-based approach, or some calculations for COPY, or something.&amp;nbsp; It could be made a little more sophisticated to check that a Polyline is &lt;EM&gt;not 3D&lt;/EM&gt; [those can't be Offset].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;BY THE WAY&lt;/STRONG&gt;&lt;/FONT&gt;, I notice some "smart quotes" in some of the earlier routines -- someone must have written them in a &lt;EM&gt;word-processor&lt;/EM&gt; rather than in a &lt;EM&gt;plain-text editor&lt;/EM&gt;.&amp;nbsp; That could explain some of the problems noted.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 18:06:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12736812#M112844</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-04-26T18:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12736864#M112845</link>
      <description>&lt;P&gt;Perfect!&lt;/P&gt;&lt;P&gt;That is what I needed it. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 18:27:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12736864#M112845</guid>
      <dc:creator>fcolocho</dc:creator>
      <dc:date>2024-04-26T18:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12737370#M112846</link>
      <description>&lt;P&gt;Another method is ask for offsets so type 50,-50,30,40,-40 this will do right and left offsets based on the method of -ve values go left.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have fixed offsets why not use MLINE you can make a lisp that creates the MLINE if it does not exist, advantage is you can have multi layer as well. Just ask.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 23:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12737370#M112846</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-04-26T23:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12737919#M112847</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... the method of -ve values go left.&amp;nbsp;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For most things, but &lt;EM&gt;not&lt;/EM&gt; for &lt;STRONG&gt;LINE&lt;/STRONG&gt;s or &lt;STRONG&gt;XLINE&lt;/STRONG&gt;s -- &lt;EM&gt;positive&lt;/EM&gt; values go left for them.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 11:22:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12737919#M112847</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-04-27T11:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12737928#M112848</link>
      <description>&lt;P&gt;I was thinking of closed plines in a CCW direction using VL-offset +ve goes out -ve goes in, &lt;STRONG&gt;yes lines go left&lt;/STRONG&gt;. Circles and arcs increase for +ve values&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 11:34:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12737928#M112848</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-04-27T11:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12740656#M112849</link>
      <description>&lt;P&gt;Good additional ideas, but I think the lisp from Kent work better for what I need. Thank you for the input.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 10:57:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/12740656#M112849</guid>
      <dc:creator>fcolocho</dc:creator>
      <dc:date>2024-04-29T10:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13888842#M167904</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That code works great for me.&amp;nbsp; Is it possible to have a similar code but with with single offsets at different distances to each side?&amp;nbsp; &amp;nbsp;To be more specific, I am drawing face of curbs and need to offset 0.5' to a specific LayerA (Back of Curb) on one side of the polyline and 1' to a LayerB (edge of asphalt) to the other side of the polyline.&amp;nbsp; I think that would require selecting the polyline (both open and closed polylines), and then selecting the Back of Curb side of the line.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 16:27:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13888842#M167904</guid>
      <dc:creator>ledgerat</dc:creator>
      <dc:date>2025-11-10T16:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13888993#M167905</link>
      <description>&lt;P&gt;I agree it would require designating one of the sides, unless you were always careful to draw Polyline edges in the same direction, such as always in the driving direction for the particular side of the road.&amp;nbsp; But that may not be possible, if sometimes the curb gets assembled from Line and Arc pieces, or was Offset from the curb on the other side.&lt;/P&gt;
&lt;P&gt;In minimal testing, this seems to work:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(vl-load-com); in case not already loaded
(defun C:CurbOffsets (/ esel pickpt side); = Offset face of Curb to both sides: back-of-curb &amp;amp; edge-of-asphalt
  (if
    (and
      (setq esel (entsel "\nObject to Offset for back-of-curb &amp;amp; edge-of-asphalt: "))
      (wcmatch (cdr (assoc 0 (entget (car esel))))
        "LINE,*POLYLINE,ARC,CIRCLE,ELLIPSE,SPLINE,XLINE"
      ); wcmatch
    ); and
    (progn ; then
      (command
        "_.layer" "_new" "BackOfCurb,EdgeOfAsphalt" ""; ensure they exist
        "_.offset" 0.5 (setq pickpt (cadr esel))
          (setq side (getpoint "\nPick on Back-Of-Curb side: "))
          ""
        "_.chprop" "_last" "" "_layer" "BackOfCurb" ""
        "_.offset" 1.0 pickpt
          (polar pickpt (angle side (vlax-curve-getClosestPointTo (car esel) side)) 1.0)
          ""
        "_.chprop" "_last" "" "_layer" "EdgeOfAsphalt" ""
      ); command
    ); progn
  ); if
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;Various of my comments in previous posts also apply here.&lt;/P&gt;
&lt;P&gt;There might be configurations in which this would miss on the side of Offsetting for the second one, but I think it would require that you picked which side very far away from the area where you selected the curb path object, and/or the shape of the curb path is really convoluted in a way that seems unlikely for things like curbs.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 17:44:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13888993#M167905</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-11-10T17:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: AutoLISP for offsetting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13889036#M167907</link>
      <description>&lt;P&gt;Awesome this seems to work well.&amp;nbsp; The only error I got a few times is if I'm zoomed far out then the second offset only does 0.5' off the original line.&amp;nbsp; But it I zoom in it works fine.&amp;nbsp; Thank you!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh, is there a way to have the originally selected polyline go to a specific layerC as part of this code, just in case it isn't on the correct layer already?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I didn't figure it out, so if you have a method of achieving this please let me know.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 19:04:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-for-offsetting/m-p/13889036#M167907</guid>
      <dc:creator>ledgerat</dc:creator>
      <dc:date>2025-11-10T19:04:50Z</dc:date>
    </item>
  </channel>
</rss>

