<?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: Draw lines on blocks in drawing. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048314#M8690</link>
    <description>&lt;P&gt;Yes, these blocks represent lines that carry attributes or characteristics that a polyline cannot carry, but doing the conversion makes it easier to map or route these blocks.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 21:05:36 GMT</pubDate>
    <dc:creator>Dan-Rod</dc:creator>
    <dc:date>2024-09-26T21:05:36Z</dc:date>
    <item>
      <title>Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13045635#M8685</link>
      <description>&lt;P&gt;Draw lines on blocks in drawing.&lt;/P&gt;&lt;P&gt;I have blocks in a drawing that generally represent lines in my projects, these, you have to stay like this but I want to see if it is possible to draw polylines on these to have the 2 options, is there any autocad or lsp macro that can do it?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 22:36:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13045635#M8685</guid>
      <dc:creator>Dan-Rod</dc:creator>
      <dc:date>2024-09-25T22:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048054#M8686</link>
      <description>&lt;P&gt;In the drawing sample, I don't see what the 2 options are. ?&lt;/P&gt;&lt;P&gt;Could you explain what you want there ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 18:56:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048054#M8686</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-09-26T18:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048118#M8687</link>
      <description>&lt;P&gt;Are the "2 options" a distinction between those made up of a series of Blocks that consist of&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; an outline rectangle Polyline without with zero width, and a single-segment Polyline with width filling it in, vs.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Lines at the ends, with six SOLID Hatch patterns filling in the space between them&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And are the Lines that the Blocks "generally represent" supposed to be [I'll guess] single Lines along the middle of a long series of Blocks in a row, or along edges where some of the Blocks contain Line objects, or... ?&amp;nbsp; I'm having a hard time imagining how a routine would identify the ones to draw a Line over collectively, if that's even what you intend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Draw in some of the Lines you intend, make it clear where they are and how they relate to the Blocks, label things, and post the drawing again.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 19:23:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048118#M8687</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-09-26T19:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048248#M8688</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15306255"&gt;@ec-cad&lt;/a&gt;&amp;nbsp; &amp;nbsp;you for taking the time to see the case, I attach the file with the updated example, I hope it is clearer&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 20:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048248#M8688</guid>
      <dc:creator>Dan-Rod</dc:creator>
      <dc:date>2024-09-26T20:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048265#M8689</link>
      <description>&lt;P&gt;So you want these 153 blocks of rectangular filled shaped to be converted to Lines/PLINEs with the same shape (or have a Line/PLINE drawn over them by a LISP)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_0-1727383072075.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1414850i84B7FA284044AC16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_0-1727383072075.png" alt="pendean_0-1727383072075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_1-1727383137546.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1414851iD41E1A79A6BB1294/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_1-1727383137546.png" alt="pendean_1-1727383137546.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_3-1727383232294.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1414854iB4A23EA706BC0185/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_3-1727383232294.png" alt="pendean_3-1727383232294.png" /&gt;&lt;/span&gt;&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="pendean_2-1727383183577.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1414852iBD16150AEE751E67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_2-1727383183577.png" alt="pendean_2-1727383183577.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 20:40:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048265#M8689</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-09-26T20:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048314#M8690</link>
      <description>&lt;P&gt;Yes, these blocks represent lines that carry attributes or characteristics that a polyline cannot carry, but doing the conversion makes it easier to map or route these blocks.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 21:05:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13048314#M8690</guid>
      <dc:creator>Dan-Rod</dc:creator>
      <dc:date>2024-09-26T21:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13050599#M8691</link>
      <description>&lt;P&gt;I see some things that will make this pretty close to impossible.&amp;nbsp; In the one little part where you drew the white Polylines over the grey Blocks:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_1-1727457472058.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1415292i7F973AA3B5974705/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_1-1727457472058.png" alt="Kent1Cooper_1-1727457472058.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;most of the Blocks are duplicated, &lt;EM&gt;almost but not quite&lt;/EM&gt; in the same place.&amp;nbsp; This selection is two Blocks on top of each other:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1727457420733.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1415291i7BB12BB13C8FA311/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1727457420733.png" alt="Kent1Cooper_0-1727457420733.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;[and note that the Polylines don't meet], but their insertion points are &lt;EM&gt;not&lt;/EM&gt; the same, and neither one is &lt;EM&gt;on&lt;/EM&gt; the line:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_2-1727457610747.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1415293i05CFD10503C19BA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_2-1727457610747.png" alt="Kent1Cooper_2-1727457610747.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And I found at least one place where the series of Blocks in a straight row, presumably to be drawn over with one line, has a &lt;EM&gt;reversal of rotation&lt;/EM&gt; midway, a point where two Blocks are inserted at the same place but have opposite rotations, and there are two rows of Block progressing in opposite directions from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even with such peculiarities corrected, it looks like a staggeringly complex task, to get a routine to be able to detect which Blocks belong together in sets, with the same rotation,&amp;nbsp;&lt;EM&gt;and&lt;/EM&gt; collinear insertion points, &lt;EM&gt;and&lt;/EM&gt; presumably some kind of adjacency or spacing test, made more difficult by the varying scale factors.&amp;nbsp; And they're not always in drawn order in a given row, either, so determining the extent within a set [which two Blocks are the ends of the row?] would be another challenge.&amp;nbsp; Even after figuring that out, there's the further complication that each Line would need to extend not just between the endmost insertion points in a row, but at one end &lt;EM&gt;through the width of the last Block&lt;/EM&gt; to the far side midpoint [a different distance as the scale factors vary].&amp;nbsp; That is sometimes the location of an end of a Line over a &lt;EM&gt;different&lt;/EM&gt; row of Blocks, but it might be the through-to-the-other-side midpoint for both rows, i.e. with no insertion point at all there.&amp;nbsp; If they should be Polylines, determining which sets meet in the right way at which ends is another problem -- it would probably be better to do Lines, and join those that can be joined after the fact.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With only MIDpoint Object Snap running, you could draw a powerful lot of these Lines/Polylines in the time it would take to work out a routine to automate the process, if that's even really possible.&amp;nbsp; [In your original drawing, MIDpoint alone wouldn't do for one of the Block types, because it would latch onto an off-center location relative to the overall Block, but ENDpoint or INTersection would be needed.]&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 17:52:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13050599#M8691</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-09-27T17:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13051977#M8692</link>
      <description>&lt;P&gt;check this quick shot&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:blocks_to_lines (/ ok_lines_sset blocks_sset ok_lines_list insertion_point)
  (prompt "\nSelect blocks to translate to lines...")
  (vla-startundomark (vla-get-activedocument (vlax-get-acad-object))) 
  (if (setq ok_lines_sset (ssadd) blocks_sset (ssget '((0 . "insert") (2 . "block"))))
    	(progn
		(setq ok_lines_list  
		  	(mapcar '(lambda (insert) (vla-addline (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
						    		(vlax-3d-point (setq insertion_point (cdr (assoc 10 (entget insert)))))
						    		(vlax-3d-point (polar insertion_point (cdr (assoc 50 (entget insert))) (* 7.5 (cdr (assoc 42 (entget insert))))))
						  )
				 )
				 (vl-remove-if 'listp (mapcar 'cadr (ssnamex blocks_sset)))
			)
	        )
		(foreach line ok_lines_list
			(ssadd (vlax-vla-object-&amp;gt;ename line) ok_lines_sset)
	  	)
		(command "_-overkill" (eval ok_lines_sset) "" "_tol" 7.5 "")
	  	(command "_erase" blocks_sset "")
      )
  )
  (vla-startundomark (vla-get-activedocument (vlax-get-acad-object)))
  (prompt "\nSelected blocks translated to lines. Manual fine tuning may be needed.")
  (princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 28 Sep 2024 17:11:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13051977#M8692</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-09-28T17:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13053382#M8693</link>
      <description>&lt;P&gt;All your comments are correct, precisely for this reason I was looking for the conversion to lines since it is more friendly to carry out the processes that I need in a separate drawing, leaving the original blocks as they are needed, I appreciate the time you took in the observations.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 21:56:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13053382#M8693</guid>
      <dc:creator>Dan-Rod</dc:creator>
      <dc:date>2024-09-29T21:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Draw lines on blocks in drawing.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13053389#M8694</link>
      <description>&lt;P&gt;Thanks, I converted each block to lines, this lsp serves the purpose&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 22:05:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-lines-on-blocks-in-drawing/m-p/13053389#M8694</guid>
      <dc:creator>Dan-Rod</dc:creator>
      <dc:date>2024-09-29T22:05:16Z</dc:date>
    </item>
  </channel>
</rss>

