Using scripts

CleWin 6 supports scripts in five different languages: C, Lua,  MaskEngineer, Matlab and Python. Scripts are especially useful for complex, parametric designs, but also for relatively simple tasks like automatic numbering of chips. Each of the supported languages has its own merits and which language you should choose depends very much on the specific application and your previous experience with programming.

More than 20 years ago, the programming language C was the first script language that was implemented in CleWin. It is still available to be compatible with existing designs and for users who are already familiar with programming in C. If you have no previous programming experience it is probably the easiest to start with Lua or Python. 

Matlab scripts are executed in Matlab, and this requires that you have a valid Matlab license and that Matlab is installed locally on the same computer as CleWin. Similarly, Python scripts are executed in the Python interpreter and you need to install Python.

The MaskEngineer language is less known and no longer maintained, but may still be useful, especially for integrated optics designs.

Snap nodes allow parameterized symbol instances to snap together automatically at the correct angle
A script can easily generate an array of circles with equal horizontal and vertical spacing