From The Beginning Overview
In this section, some of the more advanced uses for the SmartCAM Macro system will be explored. This will include developing a complex macro from scratch; defining what it does, what parameters it will need, writing the code, and testing.
The next section of this documentation, Creating a User Interface, will take the macro created in this chapter and give it a user-interface. It will also be integrated into your SmartCAM application.
The Macro
Before beginning to write any MCL code, it is wise to understand what exactly the macro will be doing, as well as what input and output is needed.
The following describes the macro that will be developed in this tutorial.
The macro will step element by element through the current Process Model database. It will total up the cutting distances for each Step used in the model. After processing the entire process model, it will generate a text report, saved to the hard drive, which lists the total length of the toolpath for each Step as well as the combined total cutting length.
The Process
The following general process steps will be used to develop this macro.
- Designing the Macro
Document what inputs and outputs are needed, what issues need to be addressed, and what process will be used to generate the correct result. - Coding the Macro
The bulk of the macro development will be spent on actually writing the code. This section shows a typical macro development session. - Testing the Macro
Make sure it works and fix it if it does not. - Creating a User Interface
Add a simple user interface to the macro and integrate it into the SmartCAM application.
Please note that this macro development tutorial will be far more complex than the previous examples. However, everything used in the development of this macro was described in simpler terms in other sections of the documentation. This tutorial shows how the combined application of a number of simple techniques can be used to create a fairly complex results.
Related Topics