Importing Custom Templates And Components
It can be useful to be able to import components and templates set up outside DesignBuilder to models. This page explains how to do it. The process is not fully documented and requires a willingness to experiment, but in most cases it is fairly straightforward. The recommended process is as follows:
- Export a .ddf file containing similar model data to that which you would like to import.
- Rename it to have extension .zip so it can be opened in WinZip, WinRAR or similar zip file editor.
- Open the .zip file to see a series of .cdt (compressed .dat files).
- Extract the .cdt files and open them in a text editor.
- Study the format - there is no documentation to explain the format, but it is usually fairly easy to work out by reference to the corresponding DesignBuilder dialogs and the headers. Each .cdt file consists of a line of category ids, followed by a header line which indicates the meaning of the fields below. Each further line is a record with fields separated using the "#" character. See below for an example of ActivityTempates.cdt.
- If you need to make more widespread edits then it is usually easiest to import the .cdt file into a spreadsheet. Here the data can be edited and exported again using tab delimiters and replacing tabs with "#" in a text editor. Note you must avoid including adjacent "#" characters in the .cdt and the easiest way to ensure this is to search for "##" and replace with "# #". Note the first column starts with "#".
- To create a .ddf file for importing to DesignBuilder use the reverse process. Create the .cdt files (by modifying equivalent existing files) paying careful attention to all fields. Then create the .ddf by zipping the .cdt files to be imported and renaming to use the .ddf file extension.
- Import the .ddf file to the DesignBuilder model.