<?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: Check for Closed Polylines &amp;amp; lines? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10019791#M87311</link>
    <description>&lt;DIV style="font-size: 1.1em; font-family: 'Artifakt'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;This lisp code should create a selection set of closed polylines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(sssetfirst nil (ssget "_X" '((0 . "POLYLINE,LWPOLYLINE")(-4 . "&amp;amp;")(70 . 1))))&lt;/LI-CODE&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 21 Jan 2021 15:16:48 GMT</pubDate>
    <dc:creator>rkmcswain</dc:creator>
    <dc:date>2021-01-21T15:16:48Z</dc:date>
    <item>
      <title>Check for Closed Polylines &amp; lines?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10019739#M87310</link>
      <description>&lt;P&gt;We are doing a large project where some of the specs are to make sure all polylines are closed and all lines used are closed as well.&amp;nbsp; It is a mixture of the two and that will not change.&amp;nbsp; We need to come up with a checking process that before we submit the drawing, we can check if all polylines and lines are closed (no gaps).&amp;nbsp; That way we can fix those issues before submission. I am hoping there is something in autocad for quality control.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 15:01:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10019739#M87310</guid>
      <dc:creator>kzD1219</dc:creator>
      <dc:date>2021-01-21T15:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Check for Closed Polylines &amp; lines?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10019791#M87311</link>
      <description>&lt;DIV style="font-size: 1.1em; font-family: 'Artifakt'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;This lisp code should create a selection set of closed polylines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(sssetfirst nil (ssget "_X" '((0 . "POLYLINE,LWPOLYLINE")(-4 . "&amp;amp;")(70 . 1))))&lt;/LI-CODE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Jan 2021 15:16:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10019791#M87311</guid>
      <dc:creator>rkmcswain</dc:creator>
      <dc:date>2021-01-21T15:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Check for Closed Polylines &amp; lines?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10020324#M87312</link>
      <description>&lt;P&gt;Or, if what you need is to identify those that are not closed so you can fix them:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;(sssetfirst nil (ssget "_X" '((0 . "LWPOLYLINE") (-4 . "&amp;lt;NOT") (-4 . "&amp;amp;") (70 . 1) (-4 . "NOT&amp;gt;"))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But that's only Polylines.&amp;nbsp; And a Polyline could be drawn back around to where it started &lt;EM&gt;without&lt;/EM&gt; being "closed" as AutoCAD means the word -- one like that would be &lt;EM&gt;included&lt;/EM&gt; in the selection above, but should it be?&amp;nbsp; Or if its ends meet, should it be considered closed, even if not "properly" but only visually?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you're asking for in relation to Lines sounds like a hugely more complicated evaluation.&amp;nbsp; Do you want to have &lt;EM&gt;no Lines at all&lt;/EM&gt; with any end that doesn't meet an end of another Line?&amp;nbsp; Or an end of an open-ended Polyline?&amp;nbsp; Or of an Arc?&amp;nbsp; Would a Line ever "T" into another object, so that the Line's end is not "floating free" but touching something, but not at an &lt;EM&gt;end&lt;/EM&gt; of the something?&amp;nbsp; That would make a closed &lt;EM&gt;area&lt;/EM&gt; [something Hatch or Boundary could work with] without any "free" end, but wouldn't be "closed" by some definitions.&amp;nbsp; It seems like a routine would need to look at both ends of every Line, and check whether there's something else there, but only certain kinds of something else would qualify.&amp;nbsp; Can it be limited by Layer or something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe a small sample drawing is in order, showing all the different kinds of conditions that you would consider "closed."&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 17:58:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10020324#M87312</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-01-21T17:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Check for Closed Polylines &amp; lines?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10020396#M87313</link>
      <description>&lt;P&gt;I have attached a sample.&amp;nbsp; Thought might be something easy, like showing vertices that may not be complete or something.&amp;nbsp; I just have 2 new drafters that may not catch that stuff and I will need to when checking the plans.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 18:23:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10020396#M87313</guid>
      <dc:creator>kzD1219</dc:creator>
      <dc:date>2021-01-21T18:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Check for Closed Polylines &amp; lines?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10020489#M87314</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 pointed on some of potential troubles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First thing that has to be checked is to see that all elements inside particular layer are drawn as correct entities.&lt;/P&gt;&lt;P&gt;For example all walls should have closed edges and being created as polylines. In this situation what may happen is that drafter closes polyline by picking end point instead of using close command inside polyline command. Since object snaps are used there is a sligth chance that start and end point differ.&lt;/P&gt;&lt;P&gt;Here you can use lisp fuction that checks if polylines are created that way and close them, so walls can later be hatched or what ever needed.&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;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun c:closeApparentlyClosedPolylines ( / ss i eo start end)
(setq ss (ssget "_X" '((0 . "POLYLINE,LWPOLYLINE"))) i -1)
(while (&amp;lt; (setq i (1+ i)) (sslength ss))
	(setq
		eo (vlax-ename-&amp;gt;vla-object (ssname ss i))
		start (vlax-curve-getstartpoint eo)
		end (vlax-curve-getendpoint eo)
	)
	(cond 
		((= (apply '+ (mapcar '- start end)) 0.0) (vlax-put eo 'Closed :vlax-true))
	)
)
(princ)
)&lt;/LI-CODE&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;This code can be updated with other rules to check if drawing complies with drafting standards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If walls are created using lines instead polylines then those lines have to be joined .......&lt;/P&gt;&lt;P&gt;checking hundreds of drawings and just marking errors can take a lot of time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 19:05:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/check-for-closed-polylines-amp-lines/m-p/10020489#M87314</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-01-21T19:05:55Z</dc:date>
    </item>
  </channel>
</rss>

