Hello, string dxlString = "string strFilename = \"" + cfgDxlOutputPath + "\""; System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = cfgDoorsPath; string pArgs = "-u " + cfgDoorsUsername + " -P " + cfgDoorsPassword + " -d " + cfgDoorsServer + " -D \"" + dxlString + "\" -b " + cfgDxlScript + ""; proc.StartInfo.Arguments = pArgs; proc.StartInfo.UseShellExecute = false; proc.Start(); proc.WaitForInputIdle();
-E- DXL: <Line:1> undeclared variable (d) -E- DXL: <Line:1> incorrect arguments for (=) -E- DXL: <Line:1> syntax error -R-E- DXL: <D:\\dxl\\test.dxl:11> unassigned variable (strFilename) -I- DXL: execution halted
hme - Mon Oct 25 04:24:40 EDT 2010 |
Re: Pass parameters in batch mode Even when you get that working, your '-D' declaration is not accessible to your '-b' script due to context. I don't deal with 'context' like this, but your '-D' script could define your output path parameter in the 'top context' which will make it acccessible. Its likely you will need to change '-D' dxl script with '-C' cli script to run the top context stuff ahead of time, which will need to do something like this: string dxlCli = "evalTop_(\"string strFilename = \\"\" + cfgDxlOutputPath + \"\\"\")" string pArgs = bla bla bla "-C " + dxlCli Its possible the 'cli' switch always puts stuff in the top context, and I'm sure someone else here will correct or clarify that for me.
|
Re: Pass parameters in batch mode
The -D string is evaluated in a separate context than the batch file, that is why the parameter won't stick. string parameter1 = "blah" string par2 = "blub" #include <myBatchFile.dxl>
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Pass parameters in batch mode Thank you! |