Hi,
When passing arguments through command line to EPLAN, if there is a space character in the value, then the quotes("") used to identify parameters are not correctly. This leads to missing parameters when EPLAN is being run, which causes script to fail.
Example:
"C:\Program Files\EPLAN\Electric P8\2.7.3\Bin\W3u.exe" ExecuteScript /ScriptFile:"script.cs" /path:"test.elk" /system:"Test system" /subsystem:"test"
EPLAN error when I run it:
Expected parameter 'subsystem' is missing. And the console output:
Code:
"C:\Program Files\EPLAN\Electric P8\2.7.3\Bin\W3u.exe" ExecuteScript /ScriptFile:"script.cs" /path:test.elk /system:"Test system /subsystem:test"
You can see Eplan automatically removes the quote in between, so subsystem parameter is inside system parameter quote, which is why it is missing. If I remove the space in the value passed to 'system' parameter as shown below, then script works:
Code:
"C:\Program Files\EPLAN\Electric P8\2.7.3\Bin\W3u.exe" ExecuteScript /ScriptFile:"script.cs" /path:"test.elk" /system:"Test_system" /subsystem:"test"
Console output:
Code:
"C:\Program Files\EPLAN\Electric P8\2.7.3\Bin\W3u.exe" ExecuteScript /ScriptFile:"script.cs" /path:test.elk /system:Test system /subsystem:test
So how do I fix this problems? Because of this issue, none of my parameter values can have spaces in them, even though I use double quotes to separate them.. Thanks!
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP