<?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: Offset Both Sides, current layer in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7856793#M107272</link>
    <description>&lt;P&gt;&lt;A href="http://www.lee-mac.com/doubleoffset.html" target="_blank"&gt;THIS&lt;/A&gt;&amp;nbsp;is better found.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 16:16:05 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2018-03-15T16:16:05Z</dc:date>
    <item>
      <title>Offset Both Sides, current layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7856746#M107271</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;The lisp that i'm using is:&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;&lt;P&gt;defun c:dOff ( / *error* of undo doc ss )&lt;BR /&gt;(vl-load-com)&lt;/P&gt;&lt;P&gt;(defun *error* ( msg )&lt;BR /&gt;(and undo (vla-EndUndomark doc))&lt;BR /&gt;(or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")&lt;BR /&gt;(princ (strcat "\n** Error: " msg " **")))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(if (and (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE")))&lt;BR /&gt;(setq of (getdist "\nSpecify Offset Distance: ")))&lt;BR /&gt;(progn&lt;BR /&gt;(setq undo&lt;BR /&gt;(not&lt;BR /&gt;(vla-StartUndomark&lt;BR /&gt;(setq doc&lt;BR /&gt;(vla-get-ActiveDocument&lt;BR /&gt;(vlax-get-acad-object)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc))&lt;BR /&gt;(mapcar&lt;BR /&gt;(function&lt;BR /&gt;(lambda ( o )&lt;BR /&gt;(vl-catch-all-apply&lt;BR /&gt;(function vla-offset) (list obj o)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(list of (- of))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(vla-delete ss)&lt;/P&gt;&lt;P&gt;(setq undo (vla-EndUndoMark doc))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 16:03:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7856746#M107271</guid>
      <dc:creator>whilisonmarques25</dc:creator>
      <dc:date>2018-03-15T16:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Both Sides, current layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7856793#M107272</link>
      <description>&lt;P&gt;&lt;A href="http://www.lee-mac.com/doubleoffset.html" target="_blank"&gt;THIS&lt;/A&gt;&amp;nbsp;is better found.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 16:16:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7856793#M107272</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-03-15T16:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Both Sides, current layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7857014#M107273</link>
      <description>&lt;P&gt;Unfortunately, (vla-offset) doesn't honor the&amp;nbsp;to-which-Layer option in the Offset command.&amp;nbsp; But if (command "_.offset" ...)&amp;nbsp;can be&amp;nbsp;used instead, that &lt;EM&gt;does&lt;/EM&gt;&amp;nbsp; honor the current setting of that option.&amp;nbsp; Re-writing the code to do it that way would add the complication of needing to find locations guaranteed to be on both sides of each object [&lt;EM&gt;not&lt;/EM&gt;&amp;nbsp; needing to do that is the big advantage of using (vla-offset) for this].&amp;nbsp; That would not be difficult for Lines/Arcs/Circles/Ellipses/Xlines, but a foolproof determination can be near-impossible for things with potentially very irregular shapes, such as Polylines&amp;nbsp;and Splines.&amp;nbsp; But if you do it in situations with enough simplicity and predictability, something could probably be done.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 17:18:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7857014#M107273</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-03-15T17:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Both Sides, current layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7858248#M107274</link>
      <description>&lt;P&gt;It doesn't seem like such a big deal to me.&lt;/P&gt;&lt;P&gt;He has a catch-all in there for if a vla-offset fails, and the method returns an array of the objects created so their layer can be changed to clayer.&lt;/P&gt;&lt;P&gt;Perhaps that's what Lee Mac's DoubleOffset does.&amp;nbsp; I haven't looked at it.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 01:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-both-sides-current-layer/m-p/7858248#M107274</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-03-16T01:00:21Z</dc:date>
    </item>
  </channel>
</rss>

