<?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: passing parameter to batch file problem in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3706102#M52422</link>
    <description>&lt;P&gt;Thanks a lot, it is working fine now&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2012 16:24:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-11-20T16:24:44Z</dc:date>
    <item>
      <title>passing parameter to batch file problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3705922#M52420</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new in programming. I need help from expert. I got a problem to pass parameter from VB to&amp;nbsp;batch file. My code is below to run the batch file and to pass parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private &lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" color="#000000" size="2"&gt; Button4_Click(sender &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" color="#000000" size="2"&gt; System.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" color="#000000" size="2"&gt;, e &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" color="#000000" size="2"&gt; System.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;EventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" color="#000000" size="2"&gt;) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Handles&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT color="#000000"&gt; Button4.Click&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; input &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;String &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; output &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;input = &lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"C:\batchFile\test.gds"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;output =&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"C:\batchFile\test.dxf"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; batchFile &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"C:\batchFile\LC_gds2dxf.bat"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Process&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Start(batchFile, input &amp;amp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;amp; output)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;With this code the output is like below:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;IMG alt="Capture.JPG" title="Capture.JPG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/43020i60D692B7B0378D1F/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" align="center" /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you look at the screen shot you can find out that input and output variable is passing to one variable LC_gdsin. But I want that output file location will be assigned to LC_dxfout. I tried a lot but could not able to do that. Can anybody help me in this regard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using VB2010 premium and windows 7 32 bit pc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Zakir&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 15:09:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3705922#M52420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-20T15:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: passing parameter to batch file problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3706094#M52421</link>
      <description>&lt;P&gt;If your code is as written, you need a space between input and output - your code shows null (change "" to " ").&amp;nbsp; Or, you could add a leading space to the strings in Dim. Or, you could create a 3rd string that combines strings 1 &amp;amp; 2 with a space in between.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;Create a test&amp;nbsp;batch file and check (echo) that %1 and %2 are recognized correctly.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;Echo %1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;Echo %2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 16:20:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3706094#M52421</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2012-11-20T16:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: passing parameter to batch file problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3706102#M52422</link>
      <description>&lt;P&gt;Thanks a lot, it is working fine now&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 16:24:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/passing-parameter-to-batch-file-problem/m-p/3706102#M52422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-20T16:24:44Z</dc:date>
    </item>
  </channel>
</rss>

