CM Automation examples

Discussion created by peter_festesen on Jan 31, 2020
Latest reply on Feb 20, 2020 by kendall_hiles

This discussion thread deals with CM Automation (as opposed to Automation for CES, the ‚old‘ API)


This thread is mainly started to trigger the discussion about how to start, connect to, and close Constraint Manager (CM) by means of automation. For that reason, the ‘body’ of the script is kept very simple, it simply lists the Diffpairs that are declared for the given project.  





This script is expected to be  run from the MGC BSD CMD Shell with


mgcscript <path>/CM_Example1.vbs <project name>


It will start a new instance of CM and create a list of Diffpairs to C:\Temp\diff_pair.txt (output file is hardcoded in line 72)

As far as I can tell, CM is closed when the script is done. Task Manager does NOT show a CM icon, and Process Monitor shows no signs of ces.exe. But Process Monitor clearly shows iCDBNetServer start the project and close it again when the script is done.  



CM_External.vbs – a derivate of #1

Run with


mgcscript <path>\CM_External.vbs


It is a derivative of the above, but connect to a running instance of CM, which is already opened on a project.

It does the same as #1, then asks if CM should be closed or not.

Here I am sure that CM is closed, as it is showing and gets removed from the Taskbar when the script is done



CM_Internal.vbs – another derivative of #1

Run in the command bar of CM (which is opened on a project). Note that you only specify the full path to the vbs, no ‘run’ statement as for Designer.


Alternatively, this can be bound to a pulldown menu – have a look at the AATK ( The file scipts.ini has a few entries for CES (IDE_MENU.vbs shows how to build the pulldown menu structure)    


I hope you find the above and the attached examples useful in your quest.