<?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: vbCr and SendCommand in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378072#M17340</link>
    <description>My first set of coordinates that is in Feet worked, it just stopped working when it tried inputing the second set.</description>
    <pubDate>Mon, 10 Nov 2008 18:20:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-11-10T18:20:53Z</dc:date>
    <item>
      <title>vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378068#M17336</link>
      <description>I am somewhat of a beginner to the "sendcommand" so i am going to ask what sounds like a stupid question. What does "vbCr" stand for? I assume it is "enter" or something. If so, is there a list of other ones like this. I am trying to send a simple command to the command line where i am entering coordinates instead of asking for user input and i want to make sure I am putting the string in correctly. Thanks!</description>
      <pubDate>Mon, 10 Nov 2008 17:11:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378068#M17336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T17:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378069#M17337</link>
      <description>Do an Index search on "constants, described" in the VBA Editor Help.</description>
      <pubDate>Mon, 10 Nov 2008 17:42:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378069#M17337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T17:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378070#M17338</link>
      <description>vbCr - equivalent = chr(13), Description = Carraige Return Character. &lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
Not sure what that means exactly. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
What is wrong with this code line:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
ThisDrawing.SendCommand "rectangle" &amp;amp; vbCr &amp;amp; "49',13',0" &amp;amp; vbCr &amp;amp; "-15',-9',0" &amp;amp; vbCr&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
For some reason, it gets the first coordinate, and says "2d point required" after trying the second coordinate.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2008 18:11:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378070#M17338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T18:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378071#M17339</link>
      <description>Convert all your coordinates to their equivalents in inches.  (For example: 13' would be 156).</description>
      <pubDate>Mon, 10 Nov 2008 18:15:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378071#M17339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T18:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378072#M17340</link>
      <description>My first set of coordinates that is in Feet worked, it just stopped working when it tried inputing the second set.</description>
      <pubDate>Mon, 10 Nov 2008 18:20:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378072#M17340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T18:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378073#M17341</link>
      <description>Try entering AutoCAD commands at the command line to duplicate exactly what you are trying to do with the code.  If there is a bad entry, AutoCAD will let you know.</description>
      <pubDate>Mon, 10 Nov 2008 18:30:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378073#M17341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T18:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378074#M17342</link>
      <description>As you suggested, i put it in by hand....here is the command line:&lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
Command: _rectang&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: 42',13'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
Specify other corner point or [Area/Dimensions/Rotation]: @-15',-9'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
So, I assume I need to add the @ symbol somewhere in that string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2008 18:38:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378074#M17342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T18:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378075#M17343</link>
      <description>This Worked!&lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
ThisDrawing.SendCommand "rectangle" &amp;amp; vbCr &amp;amp; "49',13'" &amp;amp; vbCr &amp;amp; "-15',-9'&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2008 18:41:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378075#M17343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T18:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378076#M17344</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Your code will be far easier to write and maintain if you use code like &lt;BR /&gt;
this instead of the SendCommand process.&lt;BR /&gt;
&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
Dim VerticesList(0 To 7) As Double&lt;BR /&gt;
Dim oPoly As AcadLWPolyline&lt;BR /&gt;
&lt;BR /&gt;
' Assign vertice values to the array.&lt;BR /&gt;
   VerticesList(0) = 49&lt;BR /&gt;
   VerticesList(1) = 13&lt;BR /&gt;
   VerticesList(2) = 49&lt;BR /&gt;
   VerticesList(3) = -9&lt;BR /&gt;
   VerticesList(4) = -15&lt;BR /&gt;
   VerticesList(5) = -9&lt;BR /&gt;
   VerticesList(6) = -15&lt;BR /&gt;
   VerticesList(7) = 13&lt;BR /&gt;
' watch word wrap on next line&lt;BR /&gt;
   Set oPoly = ThisDrawing.ModelSpace.AddLightWeightPolyline(VerticesList)&lt;BR /&gt;
   oPoly.Closed = True&lt;BR /&gt;
   oPoly.Layer = "myLayer"  ' If you wish to set the polyline layer&lt;BR /&gt;
&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Laurie Comerford&lt;BR /&gt;
&lt;BR /&gt;
mahenderson wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; This Worked!&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; ThisDrawing.SendCommand "rectangle" &amp;amp; vbCr &amp;amp; "49',13'" &amp;amp; vbCr &amp;amp; "-15',-9'&lt;BR /&gt;
&amp;gt;</description>
      <pubDate>Mon, 10 Nov 2008 23:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378076#M17344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-10T23:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378077#M17345</link>
      <description>Thank You Laurie. I will give that a whirl.</description>
      <pubDate>Tue, 11 Nov 2008 16:11:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378077#M17345</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-11T16:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378078#M17346</link>
      <description>&lt;P&gt;
The term Carriage Return is an old fogey term that refers to typewriters.  (Cue big band music. . .)&lt;BR /&gt;
&lt;BR /&gt;
In the old days, folks would whack away at an old Underwood typewriter, and the paper would step to the right one space at a time.  When they got close to the right margin of the page, a little bell would DING, letting them know that they should wrap it up and RETURN the CARRIAGE, which was what they called the cylinder that the paper wrapped around.  Otherwise, they might type right off the right side of the page.  They would then push a lever on the right side of the machine and slide the whole thing back to the left.  This was a CARRIAGE RETURN.&lt;BR /&gt;
&lt;BR /&gt;
One other important typewriter-based action was the Line Feed.  If you returned the carriage, but didn't give it that little extra nudge at the end, the carriage would not roll up the paper to the next line, and you could end up typing right over your previous line.  So the Line Feed is another important term, and it's usually directly connected to the carriage return.&lt;BR /&gt;
&lt;BR /&gt;
You'll see the VB term vbCR, but you'll also see vbCRLF, which is Carriage Return/Line Feed.  You may need to use vbCRLF in some cases where vbCR doesn't quite get the job done.&lt;BR /&gt;
&lt;BR /&gt;
But I agree with Laurie - Use AutoCAD methods like AddPolyline whenever possible.  Sendcommand isn't always consistent.&lt;BR /&gt;
&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2008 19:11:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378078#M17346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-11T19:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378079#M17347</link>
      <description>I agree with the others, coding the polyline in is more flexible and gives you more control than the command line.  However it is worth noting that, because autocad excepts the spacebar instead of return (enter) at the command line, you could send one string to the command line by replacing vbCrs with " " -&amp;gt; ThisDrawing.SendCommand "rectangle 49',13' -15',-9'"</description>
      <pubDate>Wed, 12 Nov 2008 12:35:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378079#M17347</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-12T12:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: vbCr and SendCommand</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378080#M17348</link>
      <description>I have two questions/comments regarding some of the replies. What if I wanted to code in a FENCE. Could I use the polyline concept for that as well? Also, I have seen the " " before in command line code and I am glad to see that it mean space. Thank you to all of you for your replies.</description>
      <pubDate>Wed, 12 Nov 2008 13:20:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vbcr-and-sendcommand/m-p/2378080#M17348</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-12T13:20:06Z</dc:date>
    </item>
  </channel>
</rss>

