C-Hooks and NET-Hooks are add-in applications or utilities that customize, enhance, or extend Mastercam's functionality. They can be created by individual users, resellers, third-party application developers, or by CNC Software itself. C-Hooks are written in C/C++, while NET-Hooks can be written in major .NET languages such as Visual Basic.NET, C#, or J#. Both are compiled into standalone DLLs and installed in the \Chooks folder in your Mastercam program directory.
Your Mastercam installation CD includes the necessary resources for you to create your own C-Hooks or NET-Hooks.
The C-Hook development kit includes all the necessary SDKs and documentation. You can install it separately anywhere on your workstation.
The NETHook.dll is installed in your Mastercam program directory when you install Mastercam. It contains all the NET-Hook programming resources that your .NET development tool needs.
The included APIs expose a significant amount of Mastercam's functionality and feature set. In addition, a number of useful C-Hooks are already supplied with Mastercam. Mastercam also provides a number of ways for you to integrate C-Hooks or NET-Hooks into the Mastercam workspace to further customize the interface.
To run a C-Hook or NET-Hook that hasn't been added to the interface, select Settings, Run User Application from the menu, or press [Alt+C]. Mastercam displays a list of all the C-Hooks and NET-Hooks available on your workstation. Select the desired DLL and click Open.
Notes:
You must have the necessary C/C++/.NET programming skills and the proper development tools to compile and link your program. These include Microsoft® Visual Studio®.NET 2003 (version 7.1) or later. These topics are outside the scope of Mastercam and this documentation.
You can also create scripts using Visual Basic. Mastercam supplies a number of classes and objects for your use, as well as an editor and run-time environment (Settings, VBScript). Unlike NET-Hook DLLs, scripts do not need to be compiled, so their development is simpler.