Adding a DPL Program to Your Workspace
To add a DPL program to your workspace, select Home | Workspace | Add | Blank Program. DPL will open a new Program window. To import a program file, select Home | Workspace | Add | Imported Program, then browse for the Workspace (.da) file from which you'd like to import the program or for the DPL program file you would like to import (program files have a .DPL file extension).
Alternatively, you can create a program from a spreadsheet. Choose Home | Workspace | Add | Converted Spreadsheet. Select the spreadsheet and DPL will create a program with DPL code that is equivalent to the "spreadsheet code".
Incorporating a DPL Program in Your Model
Once you have a DPL program in your workspace, the next step is to tell DPL how to incorporate the program into your model. To do that, follow these steps:
- Activate a model.
- Click the dialog box launcher for Model | Links.
- DPL displays the Links dialog. If your program defines DPL nodes or has values to be referenced in the Influence Diagram, use the Choose button in the DPL Program for Data Definitions section to select the program.
- If your program is a converted spreadsheet or contains calculations using nodes defined in the Influence Diagram, use the Choose button in the DPL Calculation Program section to select the program.
- DPL displays the Select Program dialog, which lists all of the programs in the workspace. Select the program you want.
- Click OK.
The program is now part of your DPL model. (Note: Programs in the workspace which are not referenced in the Links dialog are NOT incorporated in a model during a run. To have DPL incorporate a program into the model, you must follow the steps outlined above.)
Compiling a Program
Before you can run a DPL program, it must be compiled. A program included in a model as above will be compiled along with the model. During compilation, DPL checks for syntax errors in the program. If you'd like to compile a program before running, select Home | Run | Compile from the Program window. If compilation is successful, a message to that effect is written to the Session Log (no news is good news). If compilation is not successful, a dialog will present an error message with a description of the nature of the problem. After you choose OK, the cursor is placed at the location of the error.
DPL can have only one program compiled at once. If you compile another program after a program has already been successfully compiled, DPL will ask you to confirm that the currently compiled program should be replaced. Choose OK to compile the new program.
Export a Program
To export a DPL Program, choose Data | Export | Data. A dialog will appear, prompting you for a file name. DPL assigns a default extension of .DPL to all program files unless you specify otherwise.
Printing a Program
To print a DPL program, choose File | Print. For more information, see Printing.
Editing and Searching in a Program
The Home | Home | Edit | Find/Replace/Replace commands allow you to search and replace. For an explanation of these functions, see Editing DPL Programs.
Formatting a Program
To change fonts in the Program window, go to View | Font. Notice that there are usually fewer fonts available when chaning the Program window font. Because spacing is important in a DPL program, only fixed pitch fonts are available for use.
To change the tab size, click the dialog box launcher for View | Layout.
Versions: DPL Professional, DPL Enterprise, DPL Portfolio