10-07-2010 01:35 PM - edited 10-07-2010 01:38 PM
Hello
Can anyone show me comparable code to the following vb.net code?
I have an application that is call by many other applications when a failure occurs. I have to start that process and send it a few arguments that the application needs.
Here is the code I use from vb.net
'========================================================================
Dim args As String 'start yellow tag application
Dim myProcess As Process = Nothing
args = pStrBNSN & "@" & gStrPartNumber & "@" & gStrBodyNumber & "@" & gStrSerialNumber
myProcess = System.Diagnostics.Process.Start(pStrServerPath, args)
myProcess.WaitForExit()
NOTE: pStrServerPath IS THE ACTUAL PATH WHERE APPLICATION RESIDES
'========================================================================
Thanks
10-07-2010 01:44 PM
I'm not certain, but I think what you want to look at in LabVIEW is the "System Exec" call under "Connectivity:Libraries& Exectuables" on the diagram pallettes.
10-07-2010 02:18 PM
Yes Shortly after posting the questions I found a good sample app.
Here is the snippet that is working:
Thanks
10-11-2010 10:34 AM
It is weird. I had this working fine and then it just stopped working.
My vb.net application no longer receives command line arguments from my labview vi. Nothing changed in my labview vi.
Not sure why this would happen.
10-12-2010 10:58 AM
JCollado:
Are you simply calling the VB.net exe from the command line using system exec? Is there any difference if you use the "cmd /c" prefix on the command? Ordinarily, the system exec VI is like entering a command in the Windows "Run" dialogue. If it's something that would normally be entered in a command prompt window, the "cmd /c" prefix will accomplish that.
If nothing changed in the LabVIEW VI, did anything change in your VB exe or the operating environment?
10-12-2010 11:57 AM
You are right. I did manage to fix this issue by just using it just like the command prompt.
I added the parameters right after the path (path\app.exe parameters "para1@para2"
Thanks again for your help