CNCSimulator Pro

user guide
×
Menu
Index

7.7. Translate CNC code

You find this function in the Tools menu. (available from Version 3.1.)
 
 
It can be used to translate one CNC code format to another using C# scripts.
Very advanced translations can be made depending on the complexity of the translate script.
 
We have provided an example script that does a translation of basic Heidenhain dialogue code to CNCSimulator Pro standard ISO.
 
In order to create your own scripts, you need to know the C# (C-sharp) programming language. We do not teach or give support to C# scripting as there are thousands of tutorials, courses and books online, covering the topic.
 
If you want to write and edit scripts with full IntelliSense support, you can use the popular Notepad++ program together with the CS-Script plugin.
 
There are a couple of things to know regarding the scripts.
 
1. You need to have the provided TranslatorLIB.dll file in the same folder as the script.
2. You need to put a "using TranslatorLIB" at the beginning of the script.
3. You must have a Translate function with the following signature in the script:
    static public string Translate(string cncprog)
    (This function will be called from the simulator with the full program as the argument.)
4. The Translate function should return the translated program.