TI ExecuteCommand double/single quote syntax?

Post Reply
TM1modeler
Posts: 1
Joined: Fri Sep 10, 2010 5:01 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2003

TI ExecuteCommand double/single quote syntax?

Post by TM1modeler »

Hi,

I'm attempting (and failing) to use ExecuteCommand in TI to run the following cmd line:

cmd /k "C:\Progra~1\modelerclient.exe -stream ""C:\Progra~1\streams\Sample_ForecastV2.str"" -PBeginDate=""1994-01-01"" -PEndDate=""1999-12-01"" -execute"

The above works via Windows Start\Run...

Below is the ExecuteCommand TI syntax. The .exe executes, process is visible in Task Manager. However it appears that the commands from '-stream' forward are not being passed correctly. I suspect it is double/single quote setup. Any thoughts?

S_Run = 'cmd /c "C:\Progra~1\modelerclient.exe -stream" "C:\Progra~1\streams\Sample_ForecastV2.str"" -PBeginDate=""1994-01-01"" -PEndDate=""1999-12-01"" -execute"';
ExecuteCommand(S_Run, 0);
John Hammond
Community Contributor
Posts: 300
Joined: Mon Mar 23, 2009 10:50 am
OLAP Product: PAW/PAX 2.0.72 Perspectives
Version: TM1 Server 11.8.003
Excel Version: 365 and 2016
Location: South London

Re: TI ExecuteCommand double/single quote syntax?

Post by John Hammond »

put your command in a .bat file that is in the current directory of the server . ExecuteCommand seems to be very inflexible and the way I get round this is to use .bat files.
Post Reply