Is it possible to execute more than one line using ExecuteCommand?
For instance, if you wanted to insert a sleep command in front of something else?
ExecuteCommand Multiple Lines
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: ExecuteCommand Multiple Lines
You can use & and && to use multiple commands. Using && will mean that the first command has to be successful for the next one to work. E.g.PlanningDev wrote:Is it possible to execute more than one line using ExecuteCommand?
Code: Select all
sCommand = 'cmd /c type tm1s.cfg > temp1.txt && dir > temp2.txt';
ExecuteCommand ( sCommand, 0 );
Are you aware that TM1 has a sleep command - it isn't documented. The usage is:PlanningDev wrote:For instance, if you wanted to insert a sleep command in front of something else?
Code: Select all
nMilliseconds = 10000;
Sleep ( nMilliseconds );
Robin Mackenzie
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: ExecuteCommand Multiple Lines
Nope! Another undocumented nugget like breakrmackenzie wrote:Are you aware that TM1 has a sleep command - it isn't documented. The usage is:Code: Select all
nMilliseconds = 10000; Sleep ( nMilliseconds );
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: ExecuteCommand Multiple Lines
Hey, lotsa... you should check out the difference between this, this and this... and this and this.lotsaram wrote:Nope! Another undocumented nugget like break
Then... if you can crack the undocumentedness then perhaps you'll be able to tell us how to do this and this in rules!

I guess our TM1 friends at IBM have a lot of this! It's something a lot of us are probably guilty of though

Robin Mackenzie