Okay, the notepad version of this works great. very cool.
Following your logic, I changed my batch program code to match. I can't explain why, but the process dies immediately.
I'm confident the command syntax is good. I've been checking this all along in VS2008 with debug.WriteLine(p). Though the tricky syntax doesn't offer confidence to the programmer ... JavaScript is easier.
In checking all of this, however, I discovered a problem on my end. I'm writing my code in a virtual environment (Vista64) on a Mac. I inadvertently failed to connect the "L:\ drive" which, of course, the command requires in order to run! Upon fixing that problem, I tried your earlier suggestion again, and it worked great.
So for the sake of clarity, should anyone else ever visit this post, the new code looks like this:
Using mp As New Process
With mp.StartInfo
.FileName = fn
.Arguments = p
.UseShellExecute = False
.CreateNoWindow = False
.RedirectStandardInput = True
End With
mp.Start()
'mp.StandardInput.WriteLine(p)
Debug.WriteLine(p)
mp.WaitForExit()
mp.Close()
End Using
Where fn is:
Dim fn As String = "C:\Program Files\proeWildfire 4.0\bin\proe.exe"
and p is:
Dim p As String = "-g:no_graphics -i:rpc_input +batchedrw " & Chr(34) & "+input=L:\MechEng\Pro_E\Work_Order\W026637\tank_shell_master.asm.130" & Chr(34) & " " & Chr(34) & "+output=C:\Users\Rob Frei\Desktop\tank_shell_master.easm" & Chr(34) & " +measure"
This code sends the command in "p" to Pro/Engineer. It tells the eDrawings batch publisher (loaded on top of Pro/E) to publish an assembly for viewing in eDrawings. The batch program I'm writing will eventually automate the process.
Thanks, coat, your help is greatly appreciated, and I think the code you offered in the notebook example will prove to be very useful for others (I know I'll be keeping the snippet on file).