by cncdrive » Mon Nov 20, 2017 6:18 pm
Rob's document is a good point to start with.
You can also check the UCCNC/Documentation folder.
And another advice is to study the existing UCCNC macros, just open them with a text editor (e.g. the Windows notepad) from the UCCNC/Profile/Macro_yourprofile/ folder.
And you can also google "C# programming tutorial" if you are not yet familiar with the C# programming language, it is a very popular language, so you will find lots of tutorials online.
And to write a macro and to test it you can try to run them any time using the UCCNC, e.g. with typing in the macro number in the MDI.
You simply have to create the same Mxxx.txt file and then type in the Mxxx number in the MDI to see if the macro runs.
And if the macro has an error then you get an error message in the UCCNC status box and you can check the Errorlog.txt file in the UCCNC/Profile/Macro_yourprofile/ folder, that file contains the latest macro compiler error message. So if you check that file after a macro compile error then you can get an idea about what is the error in the macro code.