Setting up your system for DCAL
There are a few things you will need in order to write DCAL macros.
First, you will need the DCAL compiler and linker. If you have a default installation of DataCAD you should have a subdirectory under your main DataCAD directory named DCAL. If you do not have this directory you can install DCAL by running the DataCAD installation program and selecting install DCAL as an option. It is not necessary to install anything else from the DataCAD installation while installing DCAL, so avoid reinstalling the main DataCAD program as this may overwrite your custom settings. Make a note of the directory you install DCAL into.
You will need to add the path to the compiler and to the linker to your system path. The compiler and linker will be located in the directory you specified during the install (typically C:\DataCAD 12\DCAL). You should also add the path to your include files. The include files are typically located in a subdirectory of the main DCAL directory named INC (C:\DataCAD 12\DCAL\INC). If you do not add the path to your DCAL files to your system path you will not be able to compile your source code easily from other directories.
You can modify your system path by editing the Windows Path variable. In Windows XP, right-click on My Computer then select Properties. In the System Properties dialog, select the Advanced tab.
In the Advanced tab, select Environment Variables.
In the System variables section, highlight the Path variable then select Edit.
Add the following path based on where you installed DCAL.
C:\DataCAD 12\DCAL;C:\DataCAD 12\DCAL\INC
What this will do is add the path to the compiler, linker and include files to your system path.
Next you will need a text editor. This is one area where you will have some freedom. You can use any editor capable of generating unformatted text. Note that you can use your favorite word processor but you should avoid this temptation. The reason not to use a word processor is that it will default to adding formatting when you attempt to save your source code. The compiler will not understand your source code if your editor adds formatting codes such as fonts, margins, etc. You can use Notepad which ships with Windows. We recommend getting an editor designed for programming as these tools have powerful functions that can aid you. Select any editor that you are comfortable using as long as it saves plain, unformatted text files.
The last thing needed is a DOS session. For this you can use the Windows Command Prompt.
Once these things are configured you are ready to test your setup.