<?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: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348316#M77884</link>
    <description>I couldn't find any documentation on a char limit acad might place on a str presented to the command line, and in practice, I havn't come up against one. Do you know what it is? Another method Nathan could use, that I forgot to mention the first time, would be to use multiple SendComand's. That would be sure to take care of both scenarios.</description>
    <pubDate>Thu, 17 Jan 2002 15:25:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-01-17T15:25:36Z</dc:date>
    <item>
      <title>Send Command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348311#M77879</link>
      <description>I am trying to run a layerstyle without regenerating my drawing by only&lt;BR /&gt;
turning on and off layers.  My question is, Is there a limitation on how&lt;BR /&gt;
many items you can have in the SendCommand?  For Example I have been trying&lt;BR /&gt;
to run layersyles in my AutoCAD drawings I am using SendCommand to do this.&lt;BR /&gt;
I get an error that says too many line continuations.&lt;BR /&gt;
&lt;BR /&gt;
If there is a better way to do what I am trying to do I am up for that as&lt;BR /&gt;
well.&lt;BR /&gt;
&lt;BR /&gt;
Below is an Example of my code (I need to add more code to this but I get&lt;BR /&gt;
the above error):&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.SendCommand ("-layer" &amp;amp; vbCr &amp;amp; "s" &amp;amp; vbCr &amp;amp; "0" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "E*|" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "E*|"&lt;BR /&gt;
&amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "H*|" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "H*|"&lt;BR /&gt;
&amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "P*|" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "P*|"&lt;BR /&gt;
&amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "S*|" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "S*|"&lt;BR /&gt;
&amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "E*" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "E*" &amp;amp;&lt;BR /&gt;
vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "H*" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "H*" &amp;amp;&lt;BR /&gt;
vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "P*" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "P*" &amp;amp;&lt;BR /&gt;
vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "S*" &amp;amp; vbCr &amp;amp; "OFF" &amp;amp; vbCr &amp;amp; "S*" &amp;amp;&lt;BR /&gt;
vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "A*" &amp;amp; vbCr &amp;amp; "ON" &amp;amp; vbCr &amp;amp; "A*" &amp;amp;&lt;BR /&gt;
vbCr &amp;amp; _&lt;BR /&gt;
                            "T" &amp;amp; vbCr &amp;amp; "A*|" &amp;amp; vbCr &amp;amp; "ON" &amp;amp; vbCr &amp;amp; "A*|"&lt;BR /&gt;
&amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A-WALL-COMP" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A-WALL-OPEN" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|A-WALL-COMP" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|A-WALL-PATT" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_CAB1" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_DEMO" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_FXT1" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_GHDH" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_GHOS" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_MISC" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP_PLB1" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|AP3DEMO" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            "OFF" &amp;amp; vbCr &amp;amp; "A*|SF_FWLN" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
                            vbCr)</description>
      <pubDate>Thu, 17 Jan 2002 09:56:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348311#M77879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T09:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Send Command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348312#M77880</link>
      <description>The limitation is with vba not the command line, that's where you're using the "_" to continue the code to the next line. You could use the Chr() function instead of vbCR. Chr(10) returns a linefeed and Chr(32) returns a space. Another way to get around line continuations for long strings is to create separate strings for each layer and then concatenate them at the end or a series of lines that keep concatenating to the same var. You may also want to look at iterating through the Layers collection rather than using the SendCommand method.</description>
      <pubDate>Thu, 17 Jan 2002 10:56:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348312#M77880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T10:56:59Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348313#M77881</link>
      <description>The limitation is in the command line, not in VBA.&lt;BR /&gt;
&lt;BR /&gt;
"elj" &lt;ELJOBE&gt; wrote in message news:f0acb64.0@WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; The limitation is with vba not the command line, that's where you're using&lt;BR /&gt;
the "_" to continue the code to the next line. You could use the Chr()&lt;BR /&gt;
function instead of vbCR. Chr(10) returns a linefeed and Chr(32) returns a&lt;BR /&gt;
space. Another way to get around line continuations for long strings is to&lt;BR /&gt;
create separate strings for each layer and then concatenate them at the end&lt;BR /&gt;
or a series of lines that keep concatenating to the same var. You may also&lt;BR /&gt;
want to look at iterating through the Layers collection rather than using&lt;BR /&gt;
the SendCommand method.&lt;BR /&gt;
&amp;gt;&lt;/ELJOBE&gt;</description>
      <pubDate>Thu, 17 Jan 2002 11:21:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348313#M77881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T11:21:59Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348314#M77882</link>
      <description>Tony, while there could be a limitation to acad's command line, I have recieved the same error message in Access while building an SQL string for a complex query. His error concerned a "line continuation" as opposed to a carriage return. The following MSDN article states the limitation is 25 lines. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vamsglinetoolong.asp  Ed</description>
      <pubDate>Thu, 17 Jan 2002 12:48:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348314#M77882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T12:48:50Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348315#M77883</link>
      <description>Okay - even if the limitation is in VBA, there is still&lt;BR /&gt;
the command line input length limit that he must contend&lt;BR /&gt;
with. This has nothing to do with the length of the code,&lt;BR /&gt;
but the length of the string it generates and sends to the&lt;BR /&gt;
command line.&lt;BR /&gt;
&lt;BR /&gt;
"elj" &lt;ELJOBE&gt; wrote in message news:f0acb64.2@WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Tony, while there could be a limitation to acad's command line, I have&lt;BR /&gt;
recieved the same error message in Access while building an SQL string for a&lt;BR /&gt;
complex query. His error concerned a "line continuation" as opposed to a&lt;BR /&gt;
carriage return. The following MSDN article states the limitation is 25&lt;BR /&gt;
lines.&lt;BR /&gt;
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/ht&lt;BR /&gt;
ml/vamsglinetoolong.asp Ed&lt;BR /&gt;
&amp;gt;&lt;/ELJOBE&gt;</description>
      <pubDate>Thu, 17 Jan 2002 14:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348315#M77883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T14:13:51Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348316#M77884</link>
      <description>I couldn't find any documentation on a char limit acad might place on a str presented to the command line, and in practice, I havn't come up against one. Do you know what it is? Another method Nathan could use, that I forgot to mention the first time, would be to use multiple SendComand's. That would be sure to take care of both scenarios.</description>
      <pubDate>Thu, 17 Jan 2002 15:25:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348316#M77884</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T15:25:36Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348317#M77885</link>
      <description>I'm pretty sure it's 512 characters.&lt;BR /&gt;
&lt;BR /&gt;
"elj" &lt;ELJOBE&gt; wrote in message news:f0acb64.4@WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I couldn't find any documentation on a char limit acad might place on a&lt;BR /&gt;
str presented to the command line, and in practice, I havn't come up against&lt;BR /&gt;
one. Do you know what it is? Another method Nathan could use, that I forgot&lt;BR /&gt;
to mention the first time, would be to use multiple SendComand's. That would&lt;BR /&gt;
be sure to take care of both scenarios.&lt;BR /&gt;
&amp;gt;&lt;/ELJOBE&gt;</description>
      <pubDate>Thu, 17 Jan 2002 15:34:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348317#M77885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348318#M77886</link>
      <description>I thought I'd give it a try since I couldn't find any documentaion. I built a string and sent it using SendCommand. It maxed out at 256. I then broke the string like: str = 256chars &amp;amp; vbCr &amp;amp; 256chars and the command line had no problem even though this str is technically 512 chars, 513 if you count the cr. It looks like the command line only sees as much as it can process at once, not the entire vb string. So, since all acad commands and parameters are relatively short strings, you shouldn't run up against a wall on the acad side. Unless, you try to do something like send a couple of paragraphs to the mtext command.</description>
      <pubDate>Thu, 17 Jan 2002 16:04:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/send-command/m-p/348318#M77886</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-01-17T16:04:57Z</dc:date>
    </item>
  </channel>
</rss>

