<?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: Polylines Joining For No Reason in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11433877#M41035</link>
    <description>&lt;P&gt;I thought I had mentioned it, but I didn't (so that's on me) I run the function that creates these lwpolylines twice.&amp;nbsp; Once for the first drawing, and again for the second drawing.&amp;nbsp; It's the same function, nothing changes.&amp;nbsp; It works correctly the first time.&lt;/P&gt;&lt;P&gt;Here is a pic of the overall second drawing and a closup of the issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pline_issue.png" style="width: 912px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1118343i2E21AF0202F1E752/image-size/large?v=v2&amp;amp;px=999" role="button" title="pline_issue.png" alt="pline_issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are 26227 entities in the drawing.&amp;nbsp; I'm going to try something else today.&amp;nbsp; I'll insert the polylines above the drawing and then move them down.&amp;nbsp; Then create the next set of plines above the drawing and move them down.&amp;nbsp; It's a pain, but I've got to try something.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 15:44:11 GMT</pubDate>
    <dc:creator>mgorecki</dc:creator>
    <dc:date>2022-09-20T15:44:11Z</dc:date>
    <item>
      <title>Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11421823#M41022</link>
      <description>&lt;P&gt;I have never run into this before, so I'm at a loss for why it's happening.&amp;nbsp; I'm using AutoCad 2018 Vanilla in Windows.&lt;/P&gt;&lt;P&gt;My code adds lwpolylines on a layer at a certain width (50.0).&amp;nbsp; It's like a grid with horizontal and vertical lwpolylines.&lt;/P&gt;&lt;P&gt;Then it turns off that layer and turns on, and sets, another layer.&amp;nbsp; It creates more lwpolylines with a different width (280) at the exact same coordinates.&lt;/P&gt;&lt;P&gt;When it's done running, the lwpolylines on the first layer are gone.&amp;nbsp; When I check the lwpolylines on the second layer, they have both widths.&lt;/P&gt;&lt;P&gt;This is a listing of one of the lwpolylines:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LWPOLYLINE Layer: "SOLDERMASK_BOTTOM"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Space: Model space&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Handle = 1a21e&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Closed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;area 0.0000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;perimeter 113600.0000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;at point X=-35500.0000 Y=28400.0000 Z= 0.0000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;starting width 50.0000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ending width 50.0000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;at point X=-35500.0000 Y=-28400.0000 Z= 0.0000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;starting width 280.0000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ending width 280.0000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code used to create the lwpolylines:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun CreateLWPoly (plPntList plWidth openORclose)
 (entmake (append (list (cons 0 "LWPOLYLINE")
                        (cons 100 "AcDbEntity")
                        (cons 100 "AcDbPolyline")
                        (cons 90 (length plPntList))
                        (cons 70 openORclose) ;closed(1) or open(0)
                        (cons 43 plWidth)
                  )
                  (mapcar (function (lambda (p) (cons 10 p))) plPntList)
           )
 )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone has an idea why this happens, I'd appreciate it if you let me know.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11421823#M41022</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-14T20:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11422127#M41023</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The function looks good and functioned properly for me.&lt;/P&gt;
&lt;P&gt;I think there maybe something else in the parent code that is causing the symptoms...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Perhaps, outside the function, the variable feeding the plpntlist argument is being added to.&lt;/P&gt;
&lt;P&gt;I have no idea how the first ones are being deleted, unless there is an (entdel (entlast)) after the function.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 22:25:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11422127#M41023</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-09-14T22:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11422209#M41024</link>
      <description>&lt;P&gt;Hi John, thanks for taking the time to look into this.&amp;nbsp; I think it could be the database gets so huge it freaks out.&amp;nbsp; I walked through the code and it worked properly, but if I just let it run to completion it merges the polylines.&amp;nbsp; So weird!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 23:18:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11422209#M41024</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-14T23:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11422267#M41025</link>
      <description>&lt;P&gt;'Merge' means what?&lt;BR /&gt;One large pline, or,&lt;BR /&gt;the ends of the intended pline changed&lt;BR /&gt;to coincide with other ends,&lt;BR /&gt;or what.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 00:04:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11422267#M41025</guid>
      <dc:creator>stevor</dc:creator>
      <dc:date>2022-09-15T00:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11423861#M41026</link>
      <description>&lt;P&gt;It's strange, The first lwpolyline gets absorbed (if you will) into the second lwpolyline that gets created.&amp;nbsp; The coordinates are the same for both plines, each only had a starting point and an ending point.&amp;nbsp; It's just the first one disappears and the second now has 4 coordinates (instead of just the 2 it's supposed to have) and it also now has a starting width (the width of the original pline) and an ending width (from it's own created definition) instead of having their own individual widths.&amp;nbsp; The second one is now a "closed" polyline instead of being an "open" 2 point pline.&lt;/P&gt;&lt;P&gt;I even changed the code to freeze the first layer that the polylines were created on, but that didn't fix the issue.&lt;/P&gt;&lt;P&gt;I think what's happening is that the drawing is getting huge and because of that, it's freaking AutoCad out.&lt;/P&gt;&lt;P&gt;Since LiSP only works in the curent drawing and I need to create 2 drawings, I have one get created and then it gets saved.&amp;nbsp; Everything gets erased and even purged.&amp;nbsp; Then the second drawing gets created and saved.&lt;/P&gt;&lt;P&gt;I'm looking for a way to bring the size of the drawing back down, maybe an inconsequential save between the two drawings to a dummy drawing after the first erase and purge.&amp;nbsp; Who knows.&amp;nbsp; Back to testing..wheeeee!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 15:08:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11423861#M41026</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-15T15:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11423895#M41027</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may be just a shot in the dark, but there's something I recall from the dark ages...&lt;/P&gt;
&lt;P&gt;Between entmakes add an (entmake)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 15:16:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11423895#M41027</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-09-15T15:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424106#M41028</link>
      <description>&lt;P&gt;I've used the entmake for a number of objects, is there something else?&amp;nbsp; I know there is also entmakex, though I'm not sure what the difference is.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 16:28:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424106#M41028</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-15T16:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424158#M41029</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was just thinking that maybe AutoCAD stumbles over repeated consecutive calls to entmake something, so I thought maybe an (entmake) in between might separate the repetition.&lt;/P&gt;
&lt;P&gt;Entmake returns the entity data the same as entget would return.&lt;/P&gt;
&lt;P&gt;Entmakex returns just the ename of the created entity, which is handy in case you want to say add it to a selection set or use it in some command.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 16:50:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424158#M41029</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-09-15T16:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424205#M41030</link>
      <description>&lt;P&gt;Does it do better if you &lt;STRONG&gt;include the Layer as an entry in the data list within each (entmake)&lt;/STRONG&gt;, rather than &lt;EM&gt;setting a current Layer&lt;/EM&gt; before (entmake)ing each one?&amp;nbsp; Besides, it should be faster [gotta save those few milliseconds].&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 17:15:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424205#M41030</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-09-15T17:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424219#M41031</link>
      <description>&lt;P&gt;Hi Kent,&lt;/P&gt;&lt;P&gt;Oh good grief, I don't know why that didn't occur to me to use that (slapping forhead).&amp;nbsp; I'll add that and see what happens.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 17:23:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424219#M41031</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-15T17:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424785#M41032</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This has been bothering me.&amp;nbsp; I still think it's something outside of that function, or your AutoCAD has lost its marbles.&lt;/P&gt;
&lt;P&gt;I tried the following, and it created 300 separate polylines , both open and closed separately, as would be expected.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:test ( / i pts width color @evenp e)
  (defun @evenp (n)(zerop (rem n 2)))
  (setq i 0)
  (princ (strcat "\ni = " (itoa i)))
  (repeat 100
    (setq i (1+ i) 
          width (if (@evenp i) 3.0 2.0)
          color i
    )
    (foreach pair '(((0 100)(0 200))((10 100)(10 200))((20 100)(20 200)))
      (setq e
        (entmakex
        (list (cons 0 "LWPOLYLINE")
              (cons 100 "AcDbEntity")
              (cons 100 "AcDbPolyline")
              (cons 90 2)
              (cons 70 0) ;closed(1) or open(0)
              (cons 43 Width)
              (cons 10 (car pair))
              (cons 10 (cadr pair))
              (cons 62 color)
        )
        )
      )  
      (princ (strcat "\ri = " (itoa i)))
    )
  )
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;So, I dunno.&amp;nbsp; Maybe I need to repeat 10,000 times?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 22:36:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424785#M41032</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-09-15T22:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424810#M41033</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;I think some of the issue is that there are thousands of other objects in the drawing.&amp;nbsp; I think the volume of object in the drawing is causing AutoCad to freak out.&amp;nbsp; I have a plan, which I'll try tomorrow or Monday and let you know if they clear up the issue.&lt;/P&gt;&lt;P&gt;Thanks again for looking into this problem.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 23:01:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424810#M41033</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-15T23:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424896#M41034</link>
      <description>&lt;P&gt;As John suggested had some problems entmaking a new block with 19 attributes, the solution was to use entmake for every item in particular the "Attdef" used a loop like Johns code to "entmake" each attribute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other thing I dont think it affects entmake is set osmode to say 0 to stop snapping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you post an image of what your creating please. Just not sure what is end result.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 00:31:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11424896#M41034</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-09-16T00:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11433877#M41035</link>
      <description>&lt;P&gt;I thought I had mentioned it, but I didn't (so that's on me) I run the function that creates these lwpolylines twice.&amp;nbsp; Once for the first drawing, and again for the second drawing.&amp;nbsp; It's the same function, nothing changes.&amp;nbsp; It works correctly the first time.&lt;/P&gt;&lt;P&gt;Here is a pic of the overall second drawing and a closup of the issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pline_issue.png" style="width: 912px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1118343i2E21AF0202F1E752/image-size/large?v=v2&amp;amp;px=999" role="button" title="pline_issue.png" alt="pline_issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are 26227 entities in the drawing.&amp;nbsp; I'm going to try something else today.&amp;nbsp; I'll insert the polylines above the drawing and then move them down.&amp;nbsp; Then create the next set of plines above the drawing and move them down.&amp;nbsp; It's a pain, but I've got to try something.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 15:44:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11433877#M41035</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-20T15:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11434713#M41036</link>
      <description>&lt;P&gt;Ok, creating the polylines above the rest of the drawing, then moving them down works.&amp;nbsp; I know it's cludgy and not how I wanted to do it, but hey, it works.&amp;nbsp; Thank you for all your suggestions and interest.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 23:01:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11434713#M41036</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-20T23:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11434828#M41037</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not picturing this.&lt;/P&gt;
&lt;P&gt;By up/down do you mean +Y/-Y or +Z/-Z?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 00:24:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11434828#M41037</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-09-21T00:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11434971#M41038</link>
      <description>&lt;P&gt;This is what I use &amp;nbsp;to make pline&amp;nbsp;&amp;nbsp;, I would add (cons 8 layername)&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun LWPoly (lst cls)
 (entmakex (append (list (cons 0 "LWPOLYLINE")
                         (cons 100 "AcDbEntity")
                         (cons 100 "AcDbPolyline")
                         (cons 90 (length lst))
                         (cons 70 cls))
                   (mapcar (function (lambda (p) (cons 10 p))) lst))))&lt;/LI-CODE&gt;&lt;P&gt;Not sure if it helps,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe try (entget (car (entsel '\nPick pline "))) look at the resulting entget order, is your entmake matching the order ? You dont have to have every dxf code. The 8 as suggested by Kent could be the clue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should not matter but maybe a zoom thrown in ? So can see the dwg and be in Model space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another stab in the dark something I am going to use is a VLA-ADD method, Vla-addpolyline. It is reported to be even faster than entmake. You will need to set the layer though as extra step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.afralisp.net/archive/methods/list/addpolyline_method.htm" target="_blank"&gt;AddPolyline Method (afralisp.net)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;((-1 . &amp;lt;Entity name: 642087d0&amp;gt;) (0 . "LWPOLYLINE") (5 . "3BD60") (330 . &amp;lt;Entity name: 642c1860&amp;gt;) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (62 . 0) (370 . -1) (100 . "AcDbPolyline") (90 . 2) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 1583.0 1089.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 1638.xxx-xxxxxxxx 1087.xxx-xxxxxxxx) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (210 0.0 0.0 1.0))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 02:13:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11434971#M41038</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-09-21T02:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11436027#M41039</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good idea.&lt;/P&gt;
&lt;P&gt;I think what I have done in the past is to add a 2-point LWPoly and then (vlax-put Obj 'Coordinates flatlist)&lt;/P&gt;
&lt;P&gt;where flatlist is made simply by (apply 'append 2dptlist), where 2dptlist looks like ((x1 y1)(x2 y2)...(xn yn)).&lt;/P&gt;
&lt;P&gt;It's just a technique that's easier for me mentally.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 12:42:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11436027#M41039</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-09-21T12:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11436403#M41040</link>
      <description>&lt;P&gt;Hi John, I'm creating them +75000 in the Y.&amp;nbsp; Then after they're created I move them down.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 14:49:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11436403#M41040</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-21T14:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Polylines Joining For No Reason</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11436422#M41041</link>
      <description>&lt;P&gt;I changed my function after Kent suggested passing the layer name to the entmake.&amp;nbsp; This is what it looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun CreateLWPoly (plPntList plWidth openORclose plLayer)
 (entmake (append (list (cons 0 "LWPOLYLINE")
                        (cons 100 "AcDbEntity")
                        (cons 100 "AcDbPolyline")
                        (cons 8 plLayer)
                        (cons 90 (length plPntList))
                        (cons 70 openORclose) ;closed(1) or open(0)
                        (cons 43 plWidth)
                  )
                  (mapcar (function (lambda (p) (cons 10 p))) plPntList)
           )
 )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, that did not correct the merging issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started looking into the vla-addpolyline method.&amp;nbsp; I may be able to try it today.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 14:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polylines-joining-for-no-reason/m-p/11436422#M41041</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-21T14:57:32Z</dc:date>
    </item>
  </channel>
</rss>

