<?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 To write MEGALINE.lsp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481385#M144425</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;recently I was busy with the topic of Line and Polyline drawing.&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-under-angle-work-bad-bad-angles/td-p/5479576" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-under-angle-work-bad-bad-angles/td-p/5479576&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-specify-horizontal-length-nr-pt1-pt2-and-downslope-n-d/td-p/5478171" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-specify-horizontal-length-nr-pt1-pt2-and-downslope-n-d/td-p/5478171&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-delta-x-and-or-delta-y-of-a-line/td-p/5478174" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-delta-x-and-or-delta-y-of-a-line/td-p/5478174&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So after we came up together with my errors I thught about writing one big lisp (such as marko_ribar did for "New/Scale?Delta Width-Length of selected Rectangles" here:&amp;nbsp;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-rectangles-to-change-their-lenths-and-widths-at-once/td-p/5478058)," target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-rectangles-to-change-their-lenths-and-widths-at-once/td-p/5478058),&lt;/A&gt; which "joins" these lisps together.&lt;/P&gt;&lt;P&gt;I called it MEGALINE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought how it would be working.&lt;/P&gt;&lt;P&gt;And I drew an algorithm with arrows and prompts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now I haven't write any lisps in which I ask the user to type one button to enter one option or enter another button to enter another option (I mean something like this: "Specify next point or [Undo/Close]: ").&lt;/P&gt;&lt;P&gt;But I think I will analyse marko_ribar's&amp;nbsp;lisp for Rectangle's Dimension Changing I mentioned and I try to write this lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what I ask you for:&lt;/P&gt;&lt;P&gt;Please, have a look at the .pdf file in Attachments and tell me what do you think about this algorithm.&lt;/P&gt;&lt;P&gt;Do you think I should delete some steps? Or have you any idea what I could add? Meybe shuffle the order of these commands?&lt;/P&gt;&lt;P&gt;I am waiting for your remarks and proposes.&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jan 2015 23:06:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-24T23:06:32Z</dc:date>
    <item>
      <title>To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481385#M144425</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;recently I was busy with the topic of Line and Polyline drawing.&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-under-angle-work-bad-bad-angles/td-p/5479576" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-under-angle-work-bad-bad-angles/td-p/5479576&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-specify-horizontal-length-nr-pt1-pt2-and-downslope-n-d/td-p/5478171" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-line-specify-horizontal-length-nr-pt1-pt2-and-downslope-n-d/td-p/5478171&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-delta-x-and-or-delta-y-of-a-line/td-p/5478174" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-delta-x-and-or-delta-y-of-a-line/td-p/5478174&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So after we came up together with my errors I thught about writing one big lisp (such as marko_ribar did for "New/Scale?Delta Width-Length of selected Rectangles" here:&amp;nbsp;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-rectangles-to-change-their-lenths-and-widths-at-once/td-p/5478058)," target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-rectangles-to-change-their-lenths-and-widths-at-once/td-p/5478058),&lt;/A&gt; which "joins" these lisps together.&lt;/P&gt;&lt;P&gt;I called it MEGALINE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought how it would be working.&lt;/P&gt;&lt;P&gt;And I drew an algorithm with arrows and prompts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now I haven't write any lisps in which I ask the user to type one button to enter one option or enter another button to enter another option (I mean something like this: "Specify next point or [Undo/Close]: ").&lt;/P&gt;&lt;P&gt;But I think I will analyse marko_ribar's&amp;nbsp;lisp for Rectangle's Dimension Changing I mentioned and I try to write this lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what I ask you for:&lt;/P&gt;&lt;P&gt;Please, have a look at the .pdf file in Attachments and tell me what do you think about this algorithm.&lt;/P&gt;&lt;P&gt;Do you think I should delete some steps? Or have you any idea what I could add? Meybe shuffle the order of these commands?&lt;/P&gt;&lt;P&gt;I am waiting for your remarks and proposes.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jan 2015 23:06:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481385#M144425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-24T23:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481390#M144426</link>
      <description>&lt;P&gt;I am really sorry for yellow and light blue colours on MEGALINE. pdf.&lt;/P&gt;&lt;P&gt;Now I attach MEGALINE (2). pdf on which the colours are good. Texts are black and these yellow arrows I changed into green ones.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jan 2015 23:25:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481390#M144426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-24T23:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481412#M144427</link>
      <description>&lt;P&gt;Now I changed the position so the arrows don't cross each other.&lt;/P&gt;&lt;P&gt;See the .pdf file.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jan 2015 00:43:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481412#M144427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-25T00:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481473#M144428</link>
      <description>&lt;P&gt;At the end of the algorithm is "Select quadrant (one of our):. You can not understand it.&lt;/P&gt;&lt;P&gt;When we have given Angle and Length_X of the Line, we have four cases of position of 2nd point (pt2) in regard to the 1st point we picked (pt1):&lt;/P&gt;&lt;P&gt;1st case: pt2 is on the right and above pt1&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2nd&amp;nbsp;case: pt2 is on the left&amp;nbsp;and above pt1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3rd&amp;nbsp;case: pt2 is on the left and under&amp;nbsp;pt1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4st case: pt2&amp;nbsp;is on the left&amp;nbsp;and under&amp;nbsp;pt1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;On the end of the RECTANGLE -&amp;gt; Dimensions command, we choose one of four cases.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there possible to get something like this, but in MEGALINE lisp?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please, let&amp;nbsp;me know.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jan 2015 06:03:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481473#M144428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-25T06:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481826#M144429</link>
      <description>&lt;P&gt;Pardon my skepticism, but it seems to me that you're creating a more complicated situation than if you just get your users to&amp;nbsp;learn the ways of designating points relative to previous points with the relative-displacement symbol @, and use those as appropriate.&amp;nbsp; When I need a point three units to the right and two units down from the last point, I'd much rather just type "@3,-2"&amp;nbsp;than answer a whole series of prompts about in&amp;nbsp;what way I want to designate the next point, and give it each element of that separately, and the quadrant to do it in, and so on.&amp;nbsp; Even with the varieties that can't be entered as directly, I think I would find it easier to draw a Line at, say "@10&amp;lt;32" and then use Lengthen on it to get the length I want, than plow through all those mega-steps.&amp;nbsp; But one of the nice things about AutoCAD is that it is capable of accommodating many approaches to the same task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you are asking about regarding quadrants can certainly be done.&amp;nbsp; You would compare the X and Y coordinates of the second point with those of the first point [read about (car) and (cadr) functions], and depending on the combination of which of each coordinate is greater, the quadrant can be determined.&amp;nbsp; For example, if 'pt1' is the first point in a variable, and 'pt2' the second, and you want a 'quad' variable to be set to 1 through 4 for the 1st through 4th cases,&amp;nbsp;one way of deciding would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp; delta (mapcar '- pt2 pt1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; dx (car delta)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; dy (cadr delta)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; quad&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;(cond&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;((and (&amp;gt; dx 0) (&amp;gt; dy 0)) 1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;((and (&amp;lt; dx 0) (&amp;gt; dy 0)) 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((and (&amp;lt; dx 0) (&amp;lt; dy 0)) 3)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((and (&amp;gt; dx 0) (&amp;lt; dy 0)) 4)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#33cccc"&gt;((zerop dx) (... pt2 is directly above or below pt1...))&lt;EM&gt;; don't forget to account for these possibilities&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#33cccc"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((zerop dy) (... pt2 is directly&amp;nbsp;to the right or left of&amp;nbsp;pt1...))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); cond &amp;amp; quad&lt;/P&gt;
&lt;P&gt;); setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or another way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ang (angle pt1 pt2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; quad&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (cond&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((&amp;lt; 0 ang (/ pi 2)) 1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((&amp;lt;&amp;nbsp;(/ pi 2)&amp;nbsp;ang&amp;nbsp;pi) 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((&amp;lt;&amp;nbsp;pi ang (* pi 1.5)) 3)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((&amp;lt;&amp;nbsp;(* pi 1.5)&amp;nbsp;ang) 4)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#33cccc"&gt;((zerop ang) (...pt2 is to the right of pt1))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#33cccc"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((= ang (/ pi 2)) (...pt2 is&amp;nbsp;above pt1))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#33cccc"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((= ang&amp;nbsp;pi) (...pt2 is&amp;nbsp;to the left of&amp;nbsp;pt1))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#33cccc"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((= ang (* pi 1.5)) (...pt2 is below pt1))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); cond &amp;amp; quad&lt;/P&gt;
&lt;P&gt;); setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are certainly a variety of other ways to come to the same determination.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jan 2015 23:06:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481826#M144429</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2015-01-25T23:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481884#M144430</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;When I need a point three units to the right and two units down from the last point, I'd much rather just type "@3,-2"&amp;nbsp;than answer a whole series of prompts about in&amp;nbsp;what way I want to designate the next point, and give it each element of that separately, and the quadrant to do it in, and so on.&amp;nbsp; Even with the varieties that can't be entered as directly, I think I would find it easier to draw a Line at, say "@10&amp;lt;32" and then use Lengthen on it to get the length I want, than plow through all those mega-steps.&amp;nbsp; But one of the nice things about AutoCAD is that it is capable of accommodating many approaches to the same task."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Yes, but what would you do when you have downslope = 7% and you have to draw line which's Length_X =3000 mm?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Will you calculate it on the sheet or calculate it in Autocad's Calculator (Ctrl+8)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These options, which are default in AutoCad (@3,-2 works even if both ORTHO and POLAR are OFF. @10&amp;lt;32 too, but&amp;nbsp;at every time I use it I don't know between what Objects is this angle measured.), are good only in two cases: @3,-2 is good&amp;nbsp;when you have given Length_X and Length_Y, and @10&amp;lt;32 only when&amp;nbsp;you have Total)Length and Angle (Decimal Degrees - that depends on current AUNITS value. But we all prefer situation, when before using @10&amp;lt;32 we haven't&amp;nbsp;to set System Variables. Didn't we?).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What's more, even if I would be forced to choose between @3,-2 and &amp;nbsp;lisp with two prompts, I would choose lisp. WHy? Because if @3,-2 would be&amp;nbsp;good, I wouldn't give it up. I tried both options:&amp;nbsp;@3,-2 and lisp.&amp;nbsp;And for me lisp is faster way, because, you have to press buttons which you set for yourself. WHen you use this lisp all the time, you know its prompts, so you just type a number, Space (as Enter), number, Space, and that's the end.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And&amp;nbsp;the situation looks completely other with @3,-2. you HAVE&amp;nbsp;TO (yes, you didn;t set this key. And you can't assign to it another key. At least it seems to me so) press [Shift] and [2] - that's uncomfortable for me. And that only in order to being forced to diametrally change position of hand on keyboard to press [,] just after entering first of two required numbers. So at the beginning you have left hand on the keyboard's left side and you are forced to press two buttons - [Shift] and [2]. Then your hand types a number, goes on the right side to type [,], type second number, and press [Space] or [Enter].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In both methods we type two numbers - so that is no differrence. Difference is, that between typing number:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- in lisp method you press only [Space]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- in @ method your hand&amp;nbsp;have to go from left to right, than either go back to press [Space] or it goes further to press [Enter].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe if I have to draw&amp;nbsp;six Lines with @ method, I probably&amp;nbsp;would be able to resist it. But imagine you draw 900 Lines, every time using hand like if you play pingpong. Maybe that is too big hiperbolization &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In one thing I agree - I am such specify type of man, who likes to have all collect together in one. Sometimes&amp;nbsp;it is cause for errors. That I hear from many my familiars.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And one more thing. I try to solve easy problems with great machines, so that my opinion about MEGALINE doesn't wonder me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sometimes I forgot about simple methods which are so good as&amp;nbsp;these "bigger" methods.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I will end 1st degree of Civil Engineering and when I remember, that on the&amp;nbsp;project of road&amp;nbsp;I had to draw road with i=2% and it had 1300 m length, and I had not lisp which on ground of given Downslope in Percents and Length_X would draw a Line, and I had to count its Length_X on a sheet which I had to take with me... Only four letters express what I think about it: A.R.G.H! Something awful...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I think that there commands which draw Lines on ground of given i[%] or i[Delta_Y/Delta_X] are useful, and that was point on which I started thinking about creating MEGALINE.lsp.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your notices.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2015 02:09:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481884#M144430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-26T02:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481890#M144431</link>
      <description>&lt;P&gt;I noticed that there is problem if Xpt1 = Xpt2, when I made RTREFPOI. lsp (or maybe that was the other one? I don't know now) And I made other command, which asks not to pick two points (pt1 and pt2, on gound of their coordinates I counted ang = atan (DY/DX)), but which uses getangle. It have no problem with zero in denominator, but it has the other one. It's value you have to convert from radians&amp;nbsp;to degrees.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the most imprtant thing: Great thanks for revealing code for "Select quadrant of drawn Line". I will try it.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2015 02:15:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5481890#M144431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-26T02:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5484845#M144432</link>
      <description>&lt;P&gt;You are right, that sometimes the user prefers the single command instead of few command in one lisp.&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp;marko_ribar's RECEDIT lisp is too big for me.&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-rectangles-to-change-their-lenths-and-widths-at-once/td-p/5478058" target="_blank"&gt;http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-rectangles-to-change-their-lenths-and-widths-at-once/td-p/5478058&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will rewrite his lisp into three separate lisps; each for one&amp;nbsp;of&amp;nbsp;three separate options (New/Scale/Delta).&lt;/P&gt;&lt;P&gt;And in each of them I change the&amp;nbsp;case of selection set "Select Single Rectangle: " to&amp;nbsp;"Select Rectangle(s): ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this depends of the user; every has different feelings about what to use.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2015 21:45:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5484845#M144432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-27T21:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5485280#M144433</link>
      <description>&lt;P&gt;Dear Kent1Cooper,&lt;/P&gt;&lt;P&gt;thank you for showing me how would look expression for these four cases look like.&lt;/P&gt;&lt;P&gt;I think, that there's no need to use them, if we pick two points, because they determine the only one direction in which we would like to draw a line.&lt;/P&gt;&lt;P&gt;We could use 'getangle' which won't making problems with the case of XptL1-XptL2=0.&lt;/P&gt;&lt;P&gt;But they will be very useful in lisp like this: "Specify Angle and Length_X of Line to draw."&lt;/P&gt;&lt;P&gt;And in this case we will not need the case for XptL1-XptL2=0, because we won't pick two points in order to determine Endpoints of Line to be drawn.&lt;/P&gt;&lt;P&gt;I am very interested in how will be built this lisp:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;; QNGX = Line aNGle length_X
(defun c:QNGX
 (/ ptL1 Ang Len_X Len_Y Len ptL2)
 (setvar "cmdecho" 0)
 (setq ptL1 (getpoint "\nSpecify First Point of Line: "))
 (command "_LINE" ptL1)
 (while
  (setq Ang (getangle "\nTYPE ANGLE (in decimal Degrees) value, OR PICK two Points to define it: ")) 
  (princ "\n(Before value type '+' to go right, and '-' to go left.)")
  (setq Len_X (getdist "\nTYPE Length_X of the Line, OR PICK two Points to define it: "))
  (setq Len_Y (* 
   (/ (sin Ang) (cos Ang))
   Len_X)
  )
  (setq Len
   (sqrt
    (+ (* Len_X Len_X) (* Len_Y Len_Y))
   ); sqrt
  ); Len
  (setq ptL2 (polar ptL1 Ang Len))
  (command ptL2)
  (setq ptL1 ptL2)
 ); while
);defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after we add the option "Select Quadrant" to it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think we will have to modify it to get four cases:&lt;/P&gt;&lt;P&gt;Case 1: (setq ptL2 (polar ptL1 Ang &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Len))&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Case 2: (setq ptL2 (polar ptL1 Ang+90 &amp;nbsp; Len))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Case 3: (setq ptL2 (polar ptL1 Ang+180 Len))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Case 4: (setq ptL2 (polar ptL1 Ang+270 Len))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I don't know what "plaster" use to join these four "bricks" which I have...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could somebody please tell me it?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2015 05:39:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5485280#M144433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-28T05:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: To write MEGALINE.lsp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5485894#M144434</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after we add the option "Select Quadrant" to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think we will have to modify it to get four cases:&lt;/P&gt;
&lt;P&gt;Case 1: (setq ptL2 (polar ptL1 Ang &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Len))&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Case 2: (setq ptL2 (polar ptL1 Ang+90 &amp;nbsp; Len))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Case 3: (setq ptL2 (polar ptL1 Ang+180 Len))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Case 4: (setq ptL2 (polar ptL1 Ang+270 Len))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;But I don't know what "plaster" use to join these four "bricks" which I have...&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/151094i32343890296DE650/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="QuadrantSlopes.png" title="QuadrantSlopes.png" /&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;If my assumption about what you mean by the slope going into the four quadrants is correct,&amp;nbsp;&lt;STRONG&gt;(cond)&lt;/STRONG&gt; is&amp;nbsp;a good&amp;nbsp;"mortar" [better word for it than "plaster"] for your "bricks." If the quadrant designation is stored in a 'quad' variable using the four quadrant numbers [as in my earlier Reply], then something like this should do it:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;(setq ptL2&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp; (polar&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptL1&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;(cond&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((= quad 1) ang)&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((= quad 2) (- pi ang))&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((= quad 3) (+ pi ang))&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((=&amp;nbsp;quad 4) (- (* pi 2) ang))&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;)&lt;/STRONG&gt;; cond&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp; ); polar&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;); setq&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;But that's not the only way -- here's another:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;(setq ptL2&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp; (polar&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptL1&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;(nth&lt;/STRONG&gt; (1- quad) '(ang (- pi ang) (+ pi ang) (- (* pi 2) ang))&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&amp;nbsp; ); polar&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;); setq&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;If, however, my assumption is incorrect, it can be simpler -- just multiply 90 degrees by one less than the 'quad' value, and add that product&amp;nbsp;to the 'ang' variable:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;(setq ptL2 (polar ptL1 &lt;STRONG&gt;(+ ang (* (/ pi 2) (1- quad)))&lt;/STRONG&gt; Len))&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;[Pardon the excessive line spacing -- it's not my fault. &amp;nbsp;For some reason, the "system" won't&amp;nbsp;space them closer at the moment.]&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 28 Jan 2015 14:25:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/to-write-megaline-lsp/m-p/5485894#M144434</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2015-01-28T14:25:59Z</dc:date>
    </item>
  </channel>
</rss>

