Template and Symbol Primer:
(Click Here To Download a MS Word file of this page)
The following is the keyboard macro we currently use in our office. We feel that Multi-Scale Plotting, 3D GotoViews and Clip Cubes are so
DATACAD TEMPLATE & SYMBOL PRIMER
A "symbol" (.SYM) file contains the actual image that will be placed in your drawing. A "template" (.TPL) file is a simple TEXT file that tells DataCAD where to find the "symbols" that you want to place in your drawing. Here is the text from the 3D-BED1.TPL template file:
DataCAD template file. version 01.10.
1
4
*
sym\12-furn\bedroom\beds\twin
sym\12-furn\bedroom\beds\full
sym\12-furn\bedroom\beds\queen
sym\12-furn\bedroom\beds\king
The "DataCAD...01.10" line is the header. The "1" tells DCAD to display 1 horizontal row of boxes in, and the "4" tells DCAD to display 4 vertical columns of boxes when you turn on the template in DataCAD. The * separates the column number from the next four lines. Those four lines tell DataCAD where to find the symbols to be displayed in your drawing. The actual name of the symbol is the LAST name after the last "\" character. The .SM3 extension is not written. So the name of the first symbol is "TWIN.SYM", and it can be found in the \SYM directory, in the \12-furn\bedroom\beds\ sub-directory. Notice that the full path of the symbol does not need to be written! This template file will work if your symbols were located in either of these examples:
C:\cadstuff\dcad\sym\12-furn\bedroom\beds\twin
or
C:\dcad\sym\12-furn\bedroom\beds\twin
Writing template files with the SYM\ directory shown first is called the "Relative Path Method". The other method is called the "Absolute Path Method". The above example, written in this later method, would look something like this:
DataCAD template file. version 01.10.
1
4
*
c:\dcad\sym\12-furn\bedroom\beds\twin
c:\dcad\sym\12-furn\bedroom\beds\full
c:\dcad\sym\12-furn\bedroom\beds\queen
c:\dcad\sym\12-furn\bedroom\beds\king
There are some distinct advantages
and disadvantages to both methods, and how they behave depends partly on
whether you have you symbols located on a local hard drive or a network
drive.
RELATIVE PATH METHOD:
All of the original DataCAD template files that come with the program are written with the "Relative Path Method." Presumably part of the reason is so that the installation program does not have to deal with writing new paths to all 146 template files, based on what drive and path the user might want their symbols in.
Using this method, in the example above the TWIN.SYM file would get saved like this:
\sym\12-furn\bedroom\beds\twin
One thing about the DOS version -- as long as your symbols are in a subdirectory called "SYM", located in the root DCAD directory, DCAD will find your symbols regardless of whether they are written via the "Relative Path" or "Absolute Path" methods. Once you place the SYM directory outside of the root DCAD directory, however, DCAD gets very touchy about how its template files are written.
What's so GOOD about using the "Relative Path Method":
1. If done properly, it allows you to freely relocate your SYM directory at will. For instance, you could move your symbols from the C:\DCAD\SYM directory to the C:\DCADWIN\SYM directory, or the S:\SYM directory (which you will probably want to do if you run DCAD on a network) you want to store your TPL and SYM directories on network drives).
2. It makes it easy to transfer and copy TPL and SYM directories to other users and computers and have them work without re-writing any of the .TPL (template) files.
3. As noted above, as long as your
symbols are in a subdirectory called "SYM", located in the root DCAD directory,
Relative Path and Absolute Path definitions will coexist peacefully.
What's so BAD about using the "Relative Path Method":
1. If your symbols are NOT located in the \SYM directory in the root DCAD directory (perhaps they are on a network drive like S:\SYM), mixed Relative Path and Absolute Path definitions will cause your system to go horribly wrong. This is because when a new symbol is saved, that path of that symbol is appended to the SYM PATH setting in the CONFIG program (DOS) or the PREFERENCES options (Windows). This is the path used by the AUTOPATH option in DCAD (see the end of this document for an explanation).
2. If your symbols are located in a different directory than the DCAD root \SYM directory, keeping your the Relative Path templates working properly takes a lot of user intervention. This is because DCAD does not allow you to save new symbols via the relative path method, so you will have to open the .TPL file every time you create new symbols, in order to manually delete the full path to the symbol. More on this later.
Curiously, there is one difference in the way the DOS and WINDOWS versions handle path settings in the CONFIGURATION or PREFERENCES menus for "Relative Path" templates. In DCAD DOS, as long as the \SYM directory is in the DCAD root directory, DCAD will always find that \SYM directory, even if the path in the CONFIGURATION program points to a different drive or directory. So none of these path settings would keep DCAD from finding the \SYM directory:
(Assuming DCAD is in C:\DCAD)
SYM path: C:\DCAD\SYM\
SYM path: C:\
SYM path: D:\
SYM path: C:\WINDOWS\
However, the same is not true for the Windows version of DataCAD. It is very sensitive to the path settings for the \SYM directory. In the above \sym\12-furn\bedroom\beds\twin example ONLY the following will work (in the Preferences/Options/Path Names menu):
SYM path: C:\DCAD\
If your symbols are located on drive S:\ in the SYM directory (S:\SYM), then you must have your path set to:
SYM path: S:\
So if you ever have the problem where
your template windows are displayed without symbols in them, check your
path settings and/or your template paths.
ABSOLUTE PATH METHOD:
The other way to save symbol locations in a template file is via the "ABSOLUTE PATH" method. This is the most consistent and foolproof method of creating and saving symbols, but becomes tedious if you need to move symbols to another path on your computer or network, or if you want to share symbols with another DCAD user. Using this method, in the example above the TWIN.SYM file might get saved like this:
c:\dcad\sym\12-furn\bedroom\beds\twin
This means DCAD will ONLY search for the TWIN.SM3 file in that specific location, and nowhere else. If you decide to change your DCAD directory name from "c:\dcad" to c:\dcadwin" (as in the example above), then you will have to rewrite ALL of your template files to make hem read:
c:\dcadwin\sym\12-furn\bedroom\beds\twin
This becomes a long and tedious process to rewrite 100, 200 or more template files. There are Windows utilities that help eliminate much of this tedium.
You might ask, "when would I ever want to rename or move my template or symbol directories?" Perhaps:
1. If you start a network in your office you will want the template and symbol directories on their own drive partitions (like S:\ and/or T:\).
2. If you want to share your symbols with consultants.
3. If you need to move or copy symbols
to a computer with different template and symbol paths.
RECOMMENDATIONS FOR YOUR NEW CSI TEMPLATES:
1. If you plan to keep all your symbols and templates in the root DCAD directory (like: C:\DCAD\SYM ), then leave the Relative Paths that are installed by this Program.
2. If you are installing your templates and symbols in directories OTHER than the root DCAD directory (like C:\SYM, or S:\SYM, or T:\TPL, etc.) then you should change all the symbol paths in the .TPL files to Absolute Paths, pointing to the proper location. To do this, use the Ultra Edit program, or something similar to change them all at once.
TROUBLESHOOTING
If, when you open a template file, the template boxes appear, but there are no symbols in any of them, it is most likely because your DCAD path to the symbols does not match the path for the templates. Correct the .TPL file and reset the symbol path to rectify the problem.
KEEPING THE CSI SYMBOL DIRECTORY STRUCTURE
Now that you have all the symbols in CSI format you will want to ensure that all the new symbols you create maintain this order. This turns out to be both easy and difficult. It's easy to do, but difficult to get users to do properly and consistently. Here are the basic steps.
Let's assume our templates and symbols are located on the K:\ drive partition. We want to create a TEMPLATE by the name of TEST.TPL, and we want to place a SYMBOL in it, called FIRSTSYM.SYM. So when we are done it will look like this:
K:\DCAD\TPL\80-DETLS\TEST.TPL and
K:\DCAD\SYM\80-DETLS\TEST\FIRSTSYM.SYM
(These directions assume the DOS version
of DCAD. For the Windows version simply use the Windows dialog boxes to
change directories and type in new names.)
Create Template file:
1. Open the Template menu.
2. Select NewPath and scroll to and/or type the following:
Create Symbol file:
1. Select SaveSymb.
2. The prompt line will display a path based on the last path used, and will ask: "Create it?"
8. The prompt line will then read, "Item name: ". Type:
You have now created a new template
file, and saved a new symbol, while keeping the CSI format intact.
Note, however, that there is no way in DataCAD to save new template files via the Relative Path Method. In the example above the only way to do it would be to save the symbols as outlined. Then you would open the TEST.TPL file in an plain text editor (like Windows notepad) and delete all references to K:\dcad\. So:
Original .TPL line:
USING "ULTRA EDIT" TO EDIT MULTIPLE .TPL FILES AT ONCE:
There is a shareware utility called Ultra Edit that will allow you to open all of your .TPL files at one time, change all the paths in them in one fell swoop, and save them with one click. It's called Ultra Edit. With this utility it took me 10 minutes to change the paths of a little over 200 .TPL files (really!).
Ultra Edit is available for both Win3.1 and Win95/NT. You can find it at the company's web site.
1. Open Ultra Edit
2. First change one configuration setting.
4. Go to your Template directory
5. Go into each folder and open every .TPL file. You can pick multiple files in the Windows dialog box by dragging a bounding box around all the files, then pressing OPEN. This will save a lot of time.
7. Assuming your templates now say --> SYM\... :
10. Select File/SaveAll
11. Select File/Close All Files
NOTE:
One thing to be careful of: If some of your templates already have absolute paths, like C:\DCAD\SYM\ and some have relative paths, changing all your files at once, as in the example above, will result in some text being duplicated like this:
C:\DCAD\S:\SYM\
I got around this by FIRST replacing all: C:\DCAD\SYM\ text
Also, if a path says something like:
SYM\NEW-SYM \SINKS
you will get something that looks like:
S:\SYM\NEW-S:\SYM\SINKS
You probably won't run into too many
of these, but if you do you will just have to rewrite the path correctly
in a text editor
WHAT IS "AUTOPATH"?
It is a good concept gone awry. The DCAD manual says it, "appends a subdirectory, with the same name as the template file, to the symbol path that you set in the Configuration program."
But part of the problem is that every time DCAD accesses a different symbol with an absolute path (like c:\dcad\sym\lights) the Configuration program's symbol path is updated to this new path. So if you are not careful you will wind up with symbols in very different locations.
I would suggest that you do NOT use
Autopath. In DCAD DOS you will see the Autopath prompt when you try to
save a new symbol. In DCAD for Windows you will find Autopath in Preferences/Options/Misc/Symbol
Auto Path. Make sure the box is UN-checked.