<?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: line not shown in current view in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505145#M74842</link>
    <description>&lt;P&gt;thanks for your reply it helps me.&lt;/P&gt;</description>
    <pubDate>Sun, 10 May 2020 16:22:12 GMT</pubDate>
    <dc:creator>jaggisingh003</dc:creator>
    <dc:date>2020-05-10T16:22:12Z</dc:date>
    <item>
      <title>line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504802#M74830</link>
      <description>&lt;P&gt;&lt;SPAN&gt;hello, Everyone please help me here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I m working on something but get a problem whenever I execute this code in the current view this does not draw this&amp;nbsp;&amp;nbsp;(command ".line" h st1 "") but whenever run this not in current view then this will work perfectly. I don't understand the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:bkt (/ a l e f b a q h&lt;BR /&gt;p1 bk st1 st_l st_1 bt1 bt_1 st_inspt&lt;BR /&gt;bt_inspt st_y st&lt;BR /&gt;)&lt;BR /&gt;(setq l 2.90) ;(getreal "\n get the Setting distance")&lt;BR /&gt;(setq bk 2.00)&lt;BR /&gt;(setq e 1.400) ;(getreal "\n get the encumbrance")&lt;BR /&gt;(setq f 0.3)&lt;BR /&gt;(setq st_inspt 1.25)&lt;BR /&gt;(setq bt_inspt 2.5365)&lt;BR /&gt;(setq os (getvar "OSMODE"))&lt;BR /&gt;(setq b&lt;BR /&gt;(expt&lt;BR /&gt;(- (+ (expt (- l 0.2) 2) (expt (+ (- (+ e f) 0.156) 0.0705) 2))&lt;BR /&gt;(expt 0.110 2)&lt;BR /&gt;)&lt;BR /&gt;0.5&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(setq q (/ (- (+ e f) 0.0855) (- l 0.200)))&lt;BR /&gt;(setq ang (+ (atan q) (atan (/ 0.11 b))))&lt;BR /&gt;(setq a&lt;BR /&gt;(expt (+ (expt (- bk (+ (+ e f) (+ (* 0.160 (cos ang)) 0.0705))) 2)&lt;BR /&gt;(expt (- (- l 0.125) (* 0.160 (sin ang))) 2)&lt;BR /&gt;)&lt;BR /&gt;0.5&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(setq p1 (getpoint "\n get the start point"))&lt;BR /&gt;; get insertion point of bkt&lt;BR /&gt;(setq h (polar p1 (angtof "90.0") 20.0))&lt;BR /&gt;(command ".line" p1 h "")&lt;BR /&gt;(setq st1 (polar h (angtof "0.0") 1.25))&lt;BR /&gt;;mm line form last point of bkdist&lt;BR /&gt;(command ".line" h st1 "") ; draw line&lt;BR /&gt;(setq st_l (entlast)) ; set last drawn line st_l&lt;BR /&gt;(setq st_y (vlax-curve-getendpoint st_l))&amp;nbsp;&amp;nbsp;; get end point coordinates&lt;/P&gt;&lt;P&gt;(setq a (* 10 a))&lt;BR /&gt;(setq st_1 (polar st_y (angtof "0.0") a))&lt;BR /&gt;;final stay brkt length&lt;BR /&gt;(command ".line" st_y st_1 "")&lt;BR /&gt;(setq st (entlast));stay brkt for dimension&lt;BR /&gt;(setvar "OSMODE" os)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 11:30:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504802#M74830</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T11:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504815#M74831</link>
      <description>This looks like you need to (trans) the getpoint coords to wcs then trans st_y and st_1 to usc before drawing the line.</description>
      <pubDate>Sun, 10 May 2020 11:41:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504815#M74831</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-05-10T11:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504827#M74832</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;. thanks for your suggestion I am new to lisp any example for this function. for more&amp;nbsp; help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 11:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504827#M74832</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T11:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504874#M74833</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;.&amp;nbsp; this not working (trans) Any other Suggestion&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 12:50:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9504874#M74833</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T12:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505050#M74834</link>
      <description>&lt;P&gt;This is happening with this code.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 15:14:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505050#M74834</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T15:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505053#M74835</link>
      <description>&lt;P&gt;How did you change the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq p1 (trans (getpoint "\n get the start point") 1 0)); getpoint = ucs insertion point of bkt so trans to wcs
(setq h (polar p1 (angtof "90.0") 20.0)); calc h in wcs
(command ".line" (trans p1 0 1) (trans h 0 1) "") ;draws line in ucs
(setq st1 (polar h (angtof "0.0") 1.25)) ;calc in wcs mm line form last point of bkdist
(command ".line" (trans h 0 1) (trans st1 0 1) "") ; draw line in ucs
(setq st_l (entlast)) ; set last drawn line st_l
(setq st_y (vlax-curve-getendpoint st_l))  ; get end point coordinates pt returned in wcs

(setq a (* 10 a))
(setq st_1 (polar st_y (angtof "0.0") a));final stay brkt length calc in wcs
(command ".line" (trans st_y 0 1) (trans st_1 0 1) "");draw in ucs&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hardly ever work in a ucs, so I'm very rusty, but substitute the above in your code lisp and see if this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;getpoint returns the point in the ucs so it needs to be transformed into wcs&lt;/P&gt;&lt;P&gt;vlax-curve-getendpoint returns a point in wcs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if all calculations are made in wcs and the points transformed to ucs when drawn you should end up with the correct geometry &lt;span class="lia-unicode-emoji" title=":crossed_fingers:"&gt;🤞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a coordinate is already in wcs, transforming it to wcs has no effect.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 15:17:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505053#M74835</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-05-10T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505100#M74836</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;&amp;nbsp;thanks for this but not working&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 15:50:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505100#M74836</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T15:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505128#M74837</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Turn off running Object Snap&lt;/STRONG&gt; and try again.&amp;nbsp; [This is almost always the source of the problem when things are not drawn where you expect them to be.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess is that this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; font-family: 'Artifakt',Tahoma,Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;(command ".line" h st1 "")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is finding 'h' to be &lt;EM&gt;within the Object Snap aperture distance&lt;/EM&gt; from 'st1', and is snapping [back] to the 'h' location.&amp;nbsp; When it fails, do you get a zero-length Line there at the corner?&amp;nbsp; And I'm guessing that somehow Osnap isn't in effect outside the viewing area, so that doesn't happen out there.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 16:14:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505128#M74837</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-05-10T16:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505133#M74838</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;&amp;nbsp;&lt;SPAN&gt;do you get a zero-length Line there at the corner? -yes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;yes getting a zero-length line.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 16:14:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505133#M74838</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T16:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505134#M74839</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3747317"&gt;@jaggisingh003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;do you get a zero-length Line there at the corner? -yes&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;yes getting a zero-length line.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is what I expected.&amp;nbsp; So have you tried running it with Osnap off?&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 16:15:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505134#M74839</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-05-10T16:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505135#M74840</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&amp;nbsp;So what to do in this matter pls help&amp;nbsp; and tell me what to do.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 16:15:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505135#M74840</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T16:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505142#M74841</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3747317"&gt;@jaggisingh003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&amp;nbsp;So what to do in this matter pls help&amp;nbsp; and tell me what to do.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I did already.&amp;nbsp; See the beginning of Message 8.&amp;nbsp; This from your screencast indicates that you have it turned on:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OsnapIsOn.PNG" style="width: 122px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/768169i5063D582750B347D/image-size/large?v=v2&amp;amp;px=999" role="button" title="OsnapIsOn.PNG" alt="OsnapIsOn.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 16:20:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505142#M74841</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-05-10T16:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: line not shown in current view</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505145#M74842</link>
      <description>&lt;P&gt;thanks for your reply it helps me.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 16:22:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-not-shown-in-current-view/m-p/9505145#M74842</guid>
      <dc:creator>jaggisingh003</dc:creator>
      <dc:date>2020-05-10T16:22:12Z</dc:date>
    </item>
  </channel>
</rss>

