<?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: help Improving autocad lisp routine in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941621#M168587</link>
    <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15605020"&gt;@stevie_alas&lt;/a&gt;&amp;nbsp;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;is a wizard at this kind of thing.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;I would probably use the approach of first determining the general direction of the polyline and then using s positive offset for to the right and a negative offset for to the left.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Dec 2025 17:24:25 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2025-12-11T17:24:25Z</dc:date>
    <item>
      <title>help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941457#M168584</link>
      <description>&lt;P&gt;I compiled this lisp using various programs i found online and using ai. This lisp takes a selected closed polyline and offsets the line and then selects everything inside. then it creates a file using wblock and saves it to a folder with a specified name that increases the count by one. context; this is used to quickly save drawings of insulation sheets for cutting on a cnc for precast concrete.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if anyone would be able to help me improve this in any way or help solve some of the issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;issues:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;you are able to click on empty space and the the lisp will still continue on to the second step.&lt;/LI&gt;&lt;LI&gt;if you press enter without selecting anything on the second step, the counter will still go up.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;sometimes selecting a line in the first step will not offset or will offset to the inside rather than outside.&lt;/LI&gt;&lt;LI&gt;some shapes fail, especially deep u shaped pieces. sometimes changing the offset distance to something larger will resolve this, but that is not an ideal solution.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;improvements:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;reduce the amount of steps it takes. i would ideally like to select the line and the offset line will be automatically selected and exported in one go.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;improve reliability.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any input is appreciated! *disclaimer* i am not an autolisp expert and i have no idea what im doing. i just pieced together things i found and used ai and it seemed to work, so please excuse me if this lisp makes the experts cringe!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the zip folder you will find an example dwg, a pdf explaining the command in more detail, and the lisp files. save-drawing-parts-1 offsets by 1".&amp;nbsp;save-drawing-parts-2in offsets by 2".&amp;nbsp; reset-wblock will reset the file name counter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 15:37:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941457#M168584</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-11T15:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941600#M168586</link>
      <description>&lt;P&gt;Various things I could suggest, and a few questions as a start....&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(foreach)&lt;/STRONG&gt; &lt;/FONT&gt;applying to a list of only one item is silly -- just use the item directly.&amp;nbsp; And it's the Offset distance in a command that uses 0,0,0 as the to-which-side pick, but that wouldn't necessarily always be outside any given outline.&amp;nbsp; I would do something like this, as one way of specifying a to-which-side point that is absolutely&amp;nbsp;&lt;EM&gt;guaranteed to be outside:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(command "_.offset" 1 ent (polar (getvar 'extmax) (/ pi 4) 10) "")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (_pac)&lt;/STRONG&gt; &lt;/FONT&gt;function apparently builds a Window-Polygon selection outline by finding points every 100th of the way around an outlining object.&amp;nbsp; That seems appropriate if the object might be a Circle or an Ellipse or a Polyline containing arc segments or a Spline.&amp;nbsp; But in your sample drawing everything is Polylines with only line segments.&amp;nbsp; If that's always the case, their vertices can be used directly, much more simply.&amp;nbsp; And the&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (ssget) &lt;/STRONG&gt;&lt;/FONT&gt;filter list can be greatly simplified.&amp;nbsp; Would that always be the situation?&amp;nbsp; There are numerous routines out there that select everything within a Polyline boundary using its vertices, which works well if it's all line segments.&lt;/P&gt;
&lt;P&gt;As for "&lt;SPAN&gt;i would ideally like to select the line and the offset line will be automatically selected," after an Offset command, the result will be &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(entlast)&lt;/STRONG&gt;&lt;/FONT&gt;, so it certainly can be automatically selected by the routine.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As for "you are able to click on empty space and the lisp will still continue on to the second step," it can check whether you picked something before continuing, in a few ways.&amp;nbsp; One would be to give up if you didn't:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(if&lt;/FONT&gt; (setq ent (car (entsel "\nSelect polyline to offset: ")))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (progn ; then&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; .... do its thing ....&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; )&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;FONT color="#FF0000"&gt;(progn &lt;FONT color="#999999"&gt;; else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; (alert "Ya gotta pick something!")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; (quit)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp; )&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It could also check for the kind of thing picked, etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Another would be to ask again, until you do:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;(while&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;FONT color="#FF0000"&gt;(not&lt;/FONT&gt;&amp;nbsp;(setq ent (car (entsel "\nSelect polyline to offset: ")))&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;which could also add a check on the kind of thing picked, etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;More later, maybe....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 18:01:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941600#M168586</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-11T18:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941621#M168587</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15605020"&gt;@stevie_alas&lt;/a&gt;&amp;nbsp;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;is a wizard at this kind of thing.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;I would probably use the approach of first determining the general direction of the polyline and then using s positive offset for to the right and a negative offset for to the left.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 17:24:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941621#M168587</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2025-12-11T17:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941643#M168588</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT size="4"&gt;....&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="4"&gt;I would probably use the approach of first determining the general direction of the polyline and then using s positive offset for to the right and a negative offset for to the left.&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, but the positive-vs.-negative offset distance approach [instead of the pick-which-side approach] needs the&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (vla-offset) &lt;/STRONG&gt;&lt;/FONT&gt;function, which requires VLA-object conversion first.&amp;nbsp; And it takes a substantial amount of code to determine whether a closed Polyline's or Spline's drawn order is CW or CCW -- there are multiple threads that get into that.&lt;/P&gt;
&lt;P&gt;But given the VLA-object conversion [which sometimes one also wants for other reasons anyway], another approach I have used to get a result on a particular side of a closed object is to use&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (vla-offset)&lt;/STRONG&gt; &lt;/FONT&gt;with a positive distance, compare the areas of the original and the result, and if it went the wrong way, eliminate the result and do it again with the negative distance.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 17:47:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13941643#M168588</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-11T17:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13942213#M168601</link>
      <description>&lt;LI-CODE lang="general"&gt;(setq num (vlax-ldata-get "AlanH" "WBLKNUM"))

(vlax-ldata-put "AlanH" "WBLKNUM" num)&lt;/LI-CODE&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;yes I use code by you to check CW or CCW. Appreciate that it works well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; Checking if pline is CW or CCW and set to CCW
; Orignal idea  by Kent Cooper, 1 August 2018 Offsetinorout.lsp
; By Alan H July 2020

(defun AH:chkcwccw (ent / objnew area1 area2 obj minpoint maxpoint)
(setq obj (vlax-ename-&amp;gt;vla-object ent))
(vla-GetBoundingBox obj 'minpoint 'maxpoint)
(setq pointmin (vlax-safearray-&amp;gt;list minpoint))
(setq pointmax (vlax-safearray-&amp;gt;list maxpoint))
(setq dist (/ (distance pointmin pointmax) 20.0))
(vla-offset obj dist)
(setq objnew (vlax-ename-&amp;gt;vla-object (entlast)))
(setq area1  (vlax-get objnew 'Area))
(vla-delete objnew)
(vla-offset obj (- dist))
(setq objnew (vlax-ename-&amp;gt;vla-object (entlast)))
(setq area2  (vlax-get objnew 'Area))
(vla-delete objnew)
(if (&amp;gt; area1 area2)
  (command "Pedit" ent "R" "")
)
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a defun so speeds up multiple calls. One thing I use Pedit Reverse, as Bricscad does not have a "Reverse" command. Then Vla-offset can be used.with a +ve value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One suggestion, using "USERIX" if in any other code you run changes variables USERXX, then the number will be wrong, I use LDATA which also lives in a dwg you can put &amp;amp; get, the advantage is it's a mini database that you name and have control of&amp;nbsp; key names. You can have multiple keys in one LDATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq num (vlax-ldata-get "AlanH" "WBLKNUM"))

(vlax-ldata-put "AlanH" "WBLKNUM" num)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I would look at the way your doing "currentnumber" there should not be a need for "nextnumber" put this after Wblock has completed. Use the get LDATA.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq currentNumber (+ currentNumber 1))
(vlax-ldata-put "Stevie" "WBLKNUM" currentNumber)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 04:23:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13942213#M168601</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-12-12T04:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947000#M168722</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;i tried to add the offset change but now it asks me to specify a side to offset to. this is not ideal as i would like to minimize the amount of steps/clicks/inputs from the user that it takes to complete the action. in the original i somehow managed to get it to do it automatically. these drawings are almost always outside of 0,0,0.&lt;/STRIKE&gt; EDIT: i was able to include the offset change and now it works regardless of the part location in regards to 0,0,0, reverse does not influence the side it offsets to, and doesnt prompt me for a side! perfection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in general the shapes we draw are rectangular in nature, but often we have arcs or circles. i am also unsure of where to add the entlast to select the newly created offset line and how to use the object to continue the rest of the lisp. also, where i would add the ya gotta pick something alert&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 15:35:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947000#M168722</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T15:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947019#M168723</link>
      <description>&lt;P&gt;sea haven, i tried running the chkcwccw&amp;nbsp; lisp on its own but i get an error of too few arguments. unfortunately, i am not sure where to add the suggestions you have provided. they seem like it would help solve the offset direction issue and simplify numbering. can you show me where these would need to be added to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 14:30:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947019#M168723</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T14:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947215#M168728</link>
      <description>&lt;P&gt;Do you ever have outlines of such a shape [for example the yellow here] that an Offset command could result in &lt;EM&gt;&lt;STRONG&gt;more than one object&lt;/STRONG&gt;&lt;/EM&gt; [red]?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1765901913808.png" style="width: 220px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1605235i4E5ED5025C9C76F2/image-dimensions/220x174?v=v2" width="220" height="174" role="button" title="Kent1Cooper_0-1765901913808.png" alt="Kent1Cooper_0-1765901913808.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That would throw things off, since you would have no control over which is&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (entlast)&lt;/STRONG&gt;&lt;/FONT&gt;.&amp;nbsp; [And in this case, if there was something inside that red triangle, regardless of which red result is used, it would be selected even though it's not within the area I assume you want.]&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 16:21:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947215#M168728</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-16T16:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947231#M168729</link>
      <description>&lt;P&gt;... and another question....&lt;BR /&gt;The AutoLisp routine allows the selection of &lt;STRONG&gt;&lt;EM&gt;LINE&lt;/EM&gt;&lt;/STRONG&gt; objects.&amp;nbsp; Are the outlines you want ever composed of Lines [as AutoCAD uses the word]?&amp;nbsp; Those are independent of each other, and even if they make up a closed shape, and you actually pick all those that make it up, Offset wouldn't be able to produce anything you could use for selection of contained objects.&amp;nbsp; If they are always either closed Polylines, closed Splines, full Ellipses, or Circles, yes, but Lines [or Arcs, though they're not allowed in your code so far] would be problematic.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 16:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947231#M168729</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-16T16:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947232#M168730</link>
      <description>&lt;P&gt;i dont believe ive seen a piece that has given me two shapes when using an offest. ive attached an example of some of the more complex shapes we would potentially have. one that works and one that fails (deep u shape). in general we work in 4'x8' sheets but ive gone as small as 3" x 12" and smaller in some cases (rare)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 16:31:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947232#M168730</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T16:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947235#M168731</link>
      <description>&lt;P&gt;no, never open line segments, always closed polylines or circles as that is what our post processor is able to read. but in the example-2 that i show we have arcs as part of the polyline. not sure what those would be called. curved polyline?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* our bounding boxes are always closed polylines and circles, however some objects inside the bounding box consist of circles, lines, open polylines, closed polylines, but never splines at all*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 16:42:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947235#M168731</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T16:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947268#M168732</link>
      <description>&lt;P&gt;If I understand how it's supposed to work well enough, in the one that Fails, the Offsetting should result in the yellow outline here, and the _pac function should be using the green Points [I used DIVIDE at 100] to form a WP selection [I turned it to reduce space consumed here]:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1765903623242.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1605243i3B5909799C91567C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1765903623242.png" alt="Kent1Cooper_0-1765903623242.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Looking closely at the upper left corner:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_1-1765903760258.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1605245i4DBBFE63091BEF62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_1-1765903760258.png" alt="Kent1Cooper_1-1765903760258.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's using those green points for a Window Polygon, which would follow that white diagonal, and the magenta outline isn't fully inside that.&amp;nbsp; If "FAILS" means it doesn't find the magenta outline in selection, that's probably why.&amp;nbsp; It would fail only when the geometric circumstances are right [or, should I say, wrong], which I suspect will happen more often on larger outlines, because of the proportion of 1-unit Offset distance to WP-defining point spacing -- i.e. the green Points get farther apart, increasing the chances of this happening.&lt;/P&gt;
&lt;P&gt;That's why using vertices rather than hundredths of the way around would be better, but then you'd get similar failures in selection when there are arc segments.&lt;/P&gt;
&lt;P&gt;But then, if it's all starting from selecting that magenta outline, that could simply be added to what the WP selection finds, and it wouldn't matter if that selection missed it.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 17:02:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947268#M168732</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-16T17:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947312#M168734</link>
      <description>&lt;P&gt;you got it! yes, i need the initial outline to be included in the export. when it is not picked up, i call that a fail. it makes sense that larger perimeter objects have a harder time being "seen" if the outline is being divided into 100 sections. if we were to use the vertices, i would be concerned with the offset to inadvertently pick up objects that are outside of the initial outline. when we use the command, all the sheets are arranged in a grid (see example.dwg from my initial post) and are not individually separated as we have been discussing so far. what would a vertex selection look like and how would the program knopw to include what we first selected as our outline&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 17:28:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947312#M168734</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T17:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947415#M168737</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15605020"&gt;@stevie_alas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... how would the program know to include what we first selected as our outline&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For that part, if I interpret correctly [untested], I would probably structure it a little differently, but for the least intervention, I think [I hope] adding &lt;FONT color="#FF0000"&gt;this line&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; (repeat (setq i2 (sslength temp)) (ssadd (ssname temp (setq i2 (1- i2))) add))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;&lt;STRONG&gt;&amp;nbsp; )&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;FONT size="4" color="#FF0000"&gt;(ssadd (ssname ss i) add)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;&lt;STRONG&gt;(sssetfirst nil add)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;&lt;STRONG&gt;(ssget "_I")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;should do it, adding the boundary object(s) into the selection set of things found by the WP selections.&amp;nbsp; Do the failing ones work, at least in terms of including the boundaries, with that added?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 18:54:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947415#M168737</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-16T18:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947435#M168738</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15605020"&gt;@stevie_alas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... what would a vertex selection look like ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One way to do that with a Polyline is to extract all the 10-code entries in its entity data and strip the 10's off, to apply a list of vertex locations in WP selection:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;  (if
    (and
      (setq pl (car (entsel "\nClosed Polyline boundary: ")))
      (= (cdr (assoc 0 (setq pldata (entget pl)))) "LWPOLYLINE")
      (vlax-curve-isClosed pl)
    ); and
    (progn ; then
      (setq ss (ssget "_WP" (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) pldata))))
      (ssadd pl ss); add the Polyline itself, just in case
    ); progn
  ); if&lt;/LI-CODE&gt;
&lt;P&gt;But if Circles are in the picture, they need to be handled entirely differently [no vertices].&amp;nbsp; They would most likely need to use something like the 100-points approach.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 19:13:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947435#M168738</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-12-16T19:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947447#M168739</link>
      <description>&lt;P&gt;this unfortunately did not work. i get the same result as before. the boundary is not picked up. if i did this correctly that is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stevie_alas_0-1765913077081.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1605280iE4E1E7DC0DBC3194/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stevie_alas_0-1765913077081.png" alt="stevie_alas_0-1765913077081.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 19:24:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947447#M168739</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T19:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947459#M168740</link>
      <description>&lt;P&gt;is the 100pt approach very resource demanding? i notice that when using this command in rapid succession my pc fans ramp up and get pretty loud. would increasing the number of points to 150 or 200 be an issue lead to worse preformance?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 19:29:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13947459#M168740</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-16T19:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13949691#M168775</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;has provided some great code, one thing that may help add multiple vertices only where there is an arc. Again need to sort of over do it so get small chords, representing the arcs. Then total number of vertices will be less. It would be nice if could do a ssget WP OBJ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like use divide then check is a point not an end or start point of a pline,segment, when the segment is a bulge ie ARC keep points. Still looking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lee-mac has two possible starting programs add a point to a pline, and for a pline get each segment properties. Using bulge details could work out new points.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not code I have, will try to find. Sure something is out there. Added to my to do list.&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-inline" image-alt="SeaHaven_0-1766045346899.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1605781i8296E78A4E2139D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1766045346899.png" alt="SeaHaven_0-1766045346899.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 08:15:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13949691#M168775</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-12-18T08:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13949753#M168778</link>
      <description>&lt;P&gt;Have a look at this post I think its what you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-convert-curves-into-multi-faceted-line-segments/td-p/12323106" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-convert-curves-into-multi-faceted-line-segments/td-p/12323106&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 08:47:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13949753#M168778</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-12-18T08:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: help Improving autocad lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13950390#M168800</link>
      <description>&lt;P&gt;that screenshot looks exactly what we would need here. i looked at the link you sent and the final reply from valentin_cad looks promising. the issue is, i have no clue how to even integrate that in to what i have currently or where to being. I tried opening their lisp in vs but it opens as gibberish since it is a .vlx and not .lsp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 16:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-improving-autocad-lisp-routine/m-p/13950390#M168800</guid>
      <dc:creator>stevie_alas</dc:creator>
      <dc:date>2025-12-18T16:47:27Z</dc:date>
    </item>
  </channel>
</rss>

