<?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 several lines in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9512086#M4651</link>
    <description>&lt;P&gt;Hi Many thanks for this yes I think its working good,I just have to get the right direction to turn it into a sq or rectangle&lt;/P&gt;&lt;P&gt;I have to go out at the moment but will try it fully on return&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2020 07:47:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-13T07:47:04Z</dc:date>
    <item>
      <title>Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9507883#M4634</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;Can anyone tell me were I am going wrong ,it&amp;nbsp; returns a mismatch?&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub CommandButton6_Click()&lt;BR /&gt;Dim plineObj As AcadLWPolyline&lt;BR /&gt;Dim pts(0 To 7) As Double&lt;BR /&gt;Me.Hide&lt;BR /&gt;&lt;BR /&gt;pts(1) = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")&lt;BR /&gt;pts(2) = Val(TextBox63.Text): pts(2) = Val(TextBox64.Text)&lt;BR /&gt;pts(4) = Val(TextBox65.Text): pts(5) = Val(TextBox66.Text)&lt;BR /&gt;pts(6) = Val(TextBox67.Text): pts(7) = Val(TextBox68.Text)&lt;BR /&gt;&lt;BR /&gt;Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)&lt;BR /&gt;plineObj.Closed = True&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 19:43:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9507883#M4634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-11T19:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9507992#M4635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all you sized&amp;nbsp;&lt;SPAN&gt;Dim pts(0 To 7) As Double so the variable name is &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;pts&lt;/FONT&gt;&lt;/STRONG&gt;, and sized for &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;8 rows (0 to 7)&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;later you assign value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pts(1) = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;pts(2)&lt;/FONT&gt; &lt;/STRONG&gt;= Val(TextBox63.Text): &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;pts(2)&lt;/STRONG&gt;&lt;/FONT&gt; = Val(TextBox64.Text)&lt;BR /&gt;pts(4) = Val(TextBox65.Text): pts(5) = Val(TextBox66.Text)&lt;BR /&gt;pts(6) = Val(TextBox67.Text): pts(7) = Val(TextBox68.Text)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;but you start from 1, without assigning the 0 array rows, and 2nd row it's has been assigned 2 times with different value I guess&amp;nbsp;&lt;U&gt;pts(2) = Val(TextBox64.Text)&lt;/U&gt; and&amp;nbsp;&lt;U&gt;&lt;SPAN&gt;pts(2)= Val(TextBox63.Text)&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you insert the polyline, by using the variable &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;POINTS&lt;/FONT&gt;&lt;/STRONG&gt;, instead &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;pts&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;points&lt;/STRONG&gt;&lt;/FONT&gt;)&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(pts)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It's so easy or something it's wrong in my understanding&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let me know&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 20:47:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9507992#M4635</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-11T20:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508068#M4636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies I rushed the code out, and never checked it.I think I have corrected it,but still not getting it to run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub CommandButton6_Click()&lt;BR /&gt;Dim plineObj As AcadLWPolyline&lt;BR /&gt;Dim pts(0 To &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; As Double&lt;BR /&gt;Dim pt As Variant&lt;BR /&gt;&lt;BR /&gt;Me.Hide&lt;BR /&gt;&lt;BR /&gt;pts(0) = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")&lt;BR /&gt;pts(1) = Val(TextBox63.Text): pts(2) = Val(TextBox64.Text)&lt;BR /&gt;pts(3) = Val(TextBox65.Text): pts(4) = Val(TextBox66.Text)&lt;BR /&gt;pts(5) = Val(TextBox67.Text): pts(6) = Val(TextBox68.Text)&lt;BR /&gt;&lt;BR /&gt;Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(pts)&lt;BR /&gt;plineObj.Closed = True&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 21:15:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508068#M4636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-11T21:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508097#M4637</link>
      <description>&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;Some error messagge displayed?? No line drawn ?? Try to run the code step by step F8 checkining all coords values, x,y,z, the text conversion and so on. On my side&amp;nbsp; I'll do the same.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 21:28:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508097#M4637</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-11T21:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508152#M4638</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;The text conversation could you explain please&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 22:01:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508152#M4638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-11T22:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508189#M4639</link>
      <description>&lt;P&gt;With text conversion I mean :&lt;/P&gt;&lt;P&gt;You input data in a text box on the form, so return a string.&lt;/P&gt;&lt;P&gt;The coordinates array an later vertex of polyline require a number double format, so you convert the text to number by val function&lt;/P&gt;&lt;P&gt;This is what I mean with text conversion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 22:21:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508189#M4639</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-11T22:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508231#M4640</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for that&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 22:37:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508231#M4640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-11T22:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508280#M4641</link>
      <description>&lt;P&gt;Hi Chris&amp;nbsp;@Anonymous&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="general"&gt;Private Sub CommandButton6_Click()
Dim plineObj As AcadLWPolyline
Dim pts(0 To 5) As Double
Dim Point(0 To 11) As Double
Dim pt As Variant

Me.Hide

pt = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")
pts(0) = Val(TextBox63.Text): pts(1) = Val(TextBox64.Text)
pts(2) = Val(TextBox65.Text): pts(3) = Val(TextBox66.Text)
pts(4) = Val(TextBox67.Text): pts(5) = Val(TextBox68.Text)

Point(0) = pt(0)
Point(1) = pt(1)
Point(2) = pt(2)

Point(3) = pts(0)
Point(4) = pts(1)
Point(5) = 0

Point(6) = pts(2)
Point(7) = pts(3)
Point(8) = 0

Point(9) = pts(4)
Point(10) = pts(5)
Point(11) = 0

Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(Point)
plineObj.Closed = True
End sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main issue was into Getpoint, which return an array of 3 points coordinates, so you cannot assign to a single array point.&lt;/P&gt;&lt;P&gt;So what I have done is:&lt;/P&gt;&lt;P&gt;- Assign a different array to get point,&lt;/P&gt;&lt;P&gt;- Copy value from text box&lt;/P&gt;&lt;P&gt;- Include z coord&lt;/P&gt;&lt;P&gt;- pass the coordinates to polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should be work now&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 23:02:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508280#M4641</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-11T23:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508883#M4642</link>
      <description>&lt;P&gt;Thank you for your hard work,I think you are correct about the getpoint&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put a measurement of&amp;nbsp; 0-555&amp;nbsp; &amp;nbsp;555-555&amp;nbsp; 555-0 in the textboxes, its drawing to screen at 0,0&amp;nbsp; and not from base point I am working on this at the moment.&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cTRLS9_0-1589264811349.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/768950i37A90C3F800CE0F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cTRLS9_0-1589264811349.png" alt="cTRLS9_0-1589264811349.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 06:35:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9508883#M4642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-12T06:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509045#M4643</link>
      <description>&lt;P&gt;Hi Chris,&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do not forget to insert also Z coordinate, even if do not used, shall be set to 0, as I show you.&lt;/P&gt;&lt;P&gt;So when you retrive data from text box, I guess you are inserting X, and Y coords, but as I show you before you have to insert&amp;nbsp; Z value too, then pass to insert LWPolyline every vertex as 3 points coords.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 07:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509045#M4643</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-12T07:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509243#M4644</link>
      <description>&lt;P&gt;Hi yes thanks for that&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 09:17:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509243#M4644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-12T09:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509410#M4645</link>
      <description>&lt;P&gt;Hi have I got this right as i am not getting anything draw on screen?&lt;/P&gt;&lt;P&gt;Private Sub CommandButton7_Click()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim plineObj As AcadLWPolyline&lt;BR /&gt;Dim pts(0 To 5) As Double&lt;BR /&gt;Dim Point(0 To 11) As Double&lt;BR /&gt;Dim pt As Variant&lt;/P&gt;&lt;P&gt;Me.Hide&lt;/P&gt;&lt;P&gt;pt = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")&lt;BR /&gt;Point(0) = pt(0) = Val(TextBox63.Text)&lt;BR /&gt;Point(1) = pt(1) = Val(TextBox64.Text)&lt;BR /&gt;Point(2) = 0&lt;/P&gt;&lt;P&gt;Point(3) = pts(0) = Val(TextBox65.Text)&lt;BR /&gt;Point(4) = pts(1) = Val(TextBox66.Text)&lt;BR /&gt;Point(5) = 0&lt;/P&gt;&lt;P&gt;Point(6) = pts(2) = Val(TextBox67.Text)&lt;BR /&gt;Point(7) = pts(3) = Val(TextBox68.Text)&lt;BR /&gt;Point(8) = 0&lt;/P&gt;&lt;P&gt;Point(9) = pts(4)&lt;BR /&gt;Point(10) = pts(5)&lt;BR /&gt;Point(11) = 0&lt;/P&gt;&lt;P&gt;Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(Point)&lt;BR /&gt;plineObj.Closed = True&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 10:27:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509410#M4645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-12T10:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509619#M4646</link>
      <description>&lt;P&gt;Hi Chris&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grobnik_0-1589283814870.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769114i55FF8135C777E18D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grobnik_0-1589283814870.png" alt="grobnik_0-1589283814870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Private Sub CommandButton7_Click()


Dim plineObj As AcadLWPolyline
Dim pt() As Double

Me.Hide
pt = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")
ReDim Preserve pt(0 To 15) As Double

pt(3) = Val(TextBox63.Text)
pt(4) = Val(TextBox64.Text)
pt(5) = 0

pt(6) = Val(TextBox65.Text)
pt(7) = Val(TextBox66.Text)
pt(8) = 0

pt(9) = Val(TextBox67.Text)
pt(10) = Val(TextBox68.Text)
pt(11) = 0

pt(12) = 0 'pts(4)
pt(13) = 90 ' pts(5)
pt(14) = 100

Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(pt)
plineObj.Closed = True
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, it's useful to use the same variable for coordinates, in order to avoid confusion, so I used getpoint return coordinates into pt variabile and then I used the same pt array variable with Redim Preserve option in order to maintain the coordinates obtained from Getpoint and assign text boxes contents for other array variable rows.&lt;/P&gt;&lt;P&gt;Delete all previously declaration and insert only &lt;FONT color="#FF0000"&gt;Dim pt() As Double&lt;/FONT&gt;:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRIKE&gt;'Dim pts(0 To 5) As Double&lt;/STRIKE&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRIKE&gt;'Dim Point(0 To 11) As Double&lt;/STRIKE&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;As second issue, the AddLightWeightPolyline require the coordinates array sized as multiple of three, otherwise you got an error, this is the reason due to I sized the array 0 to 15.&lt;/P&gt;&lt;P&gt;Finally I don't understand pts(4)&amp;nbsp; and&amp;nbsp; pts(5) so I inserted some random number, I guess they are coming from some other parts of code, in case check the declaration method.&lt;/P&gt;&lt;P&gt;See above the image result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 12:01:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9509619#M4646</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-12T12:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9510641#M4647</link>
      <description>&lt;P&gt;Hi thanks again&amp;nbsp; I am struggling to place the shape and close it,I think the code&amp;nbsp; is being dragged back to the 0,0 Point when placed on screen?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this code (It is Polar but as an example)it places the rectangle on screen and closes the shape back to first point&lt;/P&gt;&lt;P&gt;Private Sub CommandButton4_Click()&lt;BR /&gt;pi = 3.xxx-xxxxxxxx&lt;/P&gt;&lt;P&gt;Me.Hide&lt;BR /&gt;pt1 = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")&lt;BR /&gt;pt2 = ThisDrawing.Utility.PolarPoint(pt1, 0, Val(TextBox53.Text))&lt;BR /&gt;pt3 = ThisDrawing.Utility.PolarPoint(pt2, pi / 2, Val(TextBox54.Text))&lt;BR /&gt;pt4 = ThisDrawing.Utility.PolarPoint(pt1, pi / 2, Val(TextBox54.Text))&lt;BR /&gt;&lt;BR /&gt;ThisDrawing.ModelSpace.AddLine pt1, pt2&lt;BR /&gt;ThisDrawing.ModelSpace.AddLine pt2, pt3&lt;BR /&gt;ThisDrawing.ModelSpace.AddLine pt3, pt4&lt;BR /&gt;ThisDrawing.ModelSpace.AddLine pt4, pt1&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 18:00:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9510641#M4647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-12T18:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9510814#M4648</link>
      <description>&lt;P&gt;Hi Chris @Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Really I'm confused, I can support you if you explain me what you have to do.&lt;/P&gt;&lt;P&gt;If your shape It's no regular shall be used a pline otherwhise could be used a rectangulare shape without problem of close that. We cannot modify the code everytime.&lt;/P&gt;&lt;P&gt;Let me know perhaps a sample dwg could be useful&amp;nbsp; to share.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 19:00:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9510814#M4648</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-12T19:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9511055#M4649</link>
      <description>&lt;P&gt;Hi sorry to confuse the situation, what I want to do is basically is to make a shape its not 90 degree&amp;nbsp; and to place it&amp;nbsp; anywhere on&amp;nbsp; screen with the getpoint 1st picture I don't want it to snap back to&amp;nbsp; 0,0 which it keeps doing Second picture hope that makes sense&lt;/P&gt;&lt;P&gt;Many thanks for your help&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="cTRLS9_0-1589311525730.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769343i012535F51B34AD57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cTRLS9_0-1589311525730.png" alt="cTRLS9_0-1589311525730.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="cTRLS9_1-1589311855607.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769346i280D10E52FB0E130/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cTRLS9_1-1589311855607.png" alt="cTRLS9_1-1589311855607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 20:32:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9511055#M4649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-12T20:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9511282#M4650</link>
      <description>&lt;P&gt;Hi Chris&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm very sorry, after further investigation the &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;coordinates of a lwpolyline are 2D not 3D as I wrote.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Here below an example of closed polyline with getpoint, please note that you can input data directly on getpoint pointer if you need.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Example_AddLightWeightPolyline()
    ' This example creates a lightweight polyline in model space.
    
    Dim plineObj As AcadLWPolyline
    Dim points(0 To 7) As Double
    
    ' Define the 2D polyline points
    pt = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")

    points(0) = pt(0): points(1) = pt(1)
    points(2) = 1: points(3) = 2
    points(4) = 3: points(5) = 2
    points(6) = 3: points(7) = 1
        
    ' Create a lightweight Polyline object in model space
    Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
    plineObj.Closed = True
    ZoomAll
    
End Sub&lt;/LI-CODE&gt;&lt;P&gt;So this should really works.&lt;/P&gt;&lt;P&gt;I'll offer you a drink for stress.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 22:31:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9511282#M4650</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-05-12T22:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Draw several lines</title>
      <link>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9512086#M4651</link>
      <description>&lt;P&gt;Hi Many thanks for this yes I think its working good,I just have to get the right direction to turn it into a sq or rectangle&lt;/P&gt;&lt;P&gt;I have to go out at the moment but will try it fully on return&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 07:47:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/draw-several-lines/m-p/9512086#M4651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-13T07:47:04Z</dc:date>
    </item>
  </channel>
</rss>

