Framework:MakroExecutor
Description
The MakroEcecutor allows executing CoPlanner macros without an open CoPlanner client. You start the macro in the command prompt.
Establish the connection
There exists a configuration file with the name "ClientConfig.xml". You find this file in the same folder as the MakroExecutor.
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ClientConfig>
<IpSettings>
<Version>1</Version>
<Server>localhost</Server>
<Port>8963</Port>
<MaxRows>100000</MaxRows>
<MaxCells>0</MaxCells>
<TcpFormatter>Bin</TcpFormatter>
</IpSettings>
</ClientConfig>
At server insert the name or the IP of the Computer, on which CoPlanner Server was installed. Insert the port number of CoPlanner Server. MaxRows isn't necessary.
Run
In this example the CoPlanner server is installed at "C:\Programms\CoPlanner". You will find the MakroExecutor in the folder CoPlanner\Server\Tools. the name of the MakroExecutor is CopMakro. The name of the macro, which we want to run is "MyCopMakro". So insert in the command prompt following command:
C:\Programme\CoPlanner\Tools\MakroExecutor\CopMakro.exe Makroname=MyCopMakro
| Hint The expression is casesensitive. |
There is the possibility to run the macro with an certain user, plan and company. You define these in the file "SessionSetting.xml".
<?xml version="1.0" standalone="yes"?> <SessionSetting> <Version>1</Version> <User>Administrator</User> <Password>pwd</Password> <Entity>Bike GmbH</Entity> <Plan>Plan Bike GmbH</Plan> </SessionSetting>
Insert the necessary values at User, Password and Entity.
| Hint No special characters are allowed! |
SSPI
The macro executer is allowed to run as SSPI user (beginning with version 9.3 HF 2.3)
In favour a seperate SSPI user must be created in the domain and in CoPlanner. This user is only in charge of the macro execution. Each macro is running under these user.
| Hint The macros have to be protected |
For this propose you have to define a continuation condition previous to the first macro.

The expression is the Copsys_ID of the "Macro-User".
For the SSPI LogOn you have to modify the file SessionSettings.xml. Username is empty and the password is "SSPI"
<?xml version="1.0" standalone="yes"?> <SessionSetting> <Version>1</Version> <User></User> <Password>SSPI</Password> <Entity>Bike GmbH</Entity> <Plan>Budget 2013</Plan> </SessionSetting>