<?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: script that writes length and width of all rectangles in a drawing in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329788#M60186</link>
    <description>&lt;P&gt;it now works. thanks a lot&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 15:51:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-21T15:51:40Z</dc:date>
    <item>
      <title>script that writes length and width of all rectangles in a drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329128#M60181</link>
      <description>&lt;P&gt;I am beginner in lisp and I would like to know if it is possible to make a&amp;nbsp;script that writes length and width of all rectangles in the entire drawing. I have tried to make the following and it does not work. Could anyone help?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 11:59:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329128#M60181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-21T11:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: script that writes length and width of all rectangles in a drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329222#M60182</link>
      <description>&lt;P&gt;Without trying it or evaluating details like parentheses matching, etc., I have a couple of comments:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post the definition of the &lt;FONT color="#000000"&gt;(css_enl)&lt;/FONT&gt;&amp;nbsp;function.&amp;nbsp; [And maybe &lt;FONT color="#000000"&gt;(Mid_P)&lt;/FONT&gt;, though I can imagine what that does.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This could be a problem:&lt;BR /&gt;&amp;nbsp; &lt;FONT color="#000000"&gt;(cons 10 TIP) (cons 11 TIP)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The 10-code and 11-code entries can't be the same for MC-justified Text.&amp;nbsp; 11 is the insertion point in the middle, and 10 is the left end of the base-line, which is only a &lt;EM&gt;resultant&lt;/EM&gt; from the combination of 11 and the height and font and content and width factor of the Text.&amp;nbsp; Omit the 10 entry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to label only &lt;EM&gt;rectangles&lt;/EM&gt;, not parallelograms, you can add a check for whether the diagonals are equal:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;FONT color="#000000"&gt;(equal (distance P1 P3) (distance P2 P4) 1E-3)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 12:31:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329222#M60182</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-05-21T12:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: script that writes length and width of all rectangles in a drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329256#M60183</link>
      <description>&lt;P&gt;(Defun css_EnL (ss / L i ) (setq i 0 @u "SS~EnL" )&lt;BR /&gt;(repeat (if ss (ssLength ss) 0 ) ; errors on non ss&lt;BR /&gt;(setq L (cons (ssname ss i ) L )&lt;BR /&gt;i (1+ i) ) ) L ) ; ed&lt;/P&gt;&lt;P&gt;this is the definition of the css_enl function. thanks for the 10-code explanation. I removed that part&amp;nbsp; but I think the script is still wrong&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 12:43:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329256#M60183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-21T12:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: script that writes length and width of all rectangles in a drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329319#M60184</link>
      <description>(defun mid_P ( / pt1 pt2)&lt;BR /&gt;(setq pt1 (getpoint "\nSelect first point: "))&lt;BR /&gt;(setq pt2 (getpoint "\nSelect second point: "))&lt;BR /&gt;(polar pt1 (angle pt1 pt2) (/ (distance pt1 pt2) 2.0))&lt;BR /&gt;)&lt;BR /&gt;and this is mid_p i forgot to mention&lt;BR /&gt;</description>
      <pubDate>Fri, 21 May 2021 13:14:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329319#M60184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-21T13:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: script that writes length and width of all rectangles in a drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329415#M60185</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;(defun mid_P ( / pt1 pt2)&lt;BR /&gt;&amp;nbsp; (setq pt1 (getpoint "\nSelect first point: "))&lt;BR /&gt;&amp;nbsp; (setq pt2 (getpoint "\nSelect second point: "))&lt;BR /&gt;&amp;nbsp; (polar pt1 (angle pt1 pt2) (/ (distance pt1 pt2) 2.0))&lt;BR /&gt;)&lt;BR /&gt;....&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's written to &lt;EM&gt;ask the User to pick&lt;/EM&gt; points to find the midpoint between.&amp;nbsp; As used in the larger routine, you need a version that's written to &lt;EM&gt;take&lt;/EM&gt; &lt;EM&gt;arguments of existing known points&lt;/EM&gt; instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun mid_P (pt1 pt2)&lt;BR /&gt;&amp;nbsp; (polar pt1 (angle pt1 pt2) (/ (distance pt1 pt2) 2.0))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT:&lt;/P&gt;
&lt;P&gt;Make that version under a &lt;EM&gt;different name&lt;/EM&gt;, and use that name in the larger routine, if you use your original version of it in other contexts and still need the ask-the-User-for-points approach.&amp;nbsp; [In new-enough versions of AutoCAD, you don't need such a thing -- use the M2P / MTP Object Snap mode.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do that, does the larger routine work?&amp;nbsp; I looked more closely, and though there are things about it that I would do more simply, I don't see any other reason that it shouldn't work with a new midpoint-calculating function.&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 14:22:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329415#M60185</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-05-21T14:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: script that writes length and width of all rectangles in a drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329788#M60186</link>
      <description>&lt;P&gt;it now works. thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 15:51:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-that-writes-length-and-width-of-all-rectangles-in-a/m-p/10329788#M60186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-21T15:51:40Z</dc:date>
    </item>
  </channel>
</rss>

