Cross Reference Table
What is a Cross Reference Table?
A Cross Reference Table (CRT) contains data which refers to related or synonymous information elsewhere, usually within the same document. Therefore, a Cross Reference Table helps OCAD to transcribe data (symbols, text etc.) with new information.
Cross reference tables by OCAD are saved in the folder C:\Program Files\OCAD\OCAD 2018 EDITION\Crt.
A CRT-File (with the ending .ocdCrt) is a text file with the necessary information for the translation. All CRT-Files which are saved by OCAD contain a table with two columns. Information from the second column gets translated into the information of first column.
In some cases it is the other way round.
The following table from the Convert Imported Layers to Symbols function can be taken as an example. In the first column symbol numbers of the OCAD File are listed. In the second column the layer names are listed. The two columns are separated by a space character or a [Tab]. OCAD converts now each layer to an object with the symbol listed in the first column.
101.000 CONTOUR 102.000 INDEXCONTOUR 103.000 FORMLINE 502.000 ROAD 506.000 PATH 527.000 BUILDING
CRT-Files are used for many OCAD functions:
Function | First Column | Second Column |
---|---|---|
Convert Imported Layers to Symbols | Symbol number | Layer name |
Convert Text Objects to Point Objects | Symbol number of point object | Plain text |
Convert Text Objects from OEM to Unicode | Unicode (0..65535) | OEM character code (0..255) |
Load Colors and Symbols From | Symbol number of the current OCAD-File | Symbol number of the symbol to replace with of the other OCAD-File |
Import OCAD Map | Symbol number of the map to be imported | Symbol number of the currently opened OCAD-File |
Import DXF File | Symbol number in the OCAD Map | Name of the corresponding DXF-Layer |
Import GeoPackages | Symbol number in the OCAD Map | Name of the corresponding DXF-Layer |
Import PDF File | Symbol number in the OCAD Map | Name of the corresponding layer in the PDF-File |
Import Open Street Map Files | Symbol number in the OSM symbol set | Name of the corresponding layer in the OSM-File |
More are following... | - | - |
In some of the functions, the CRT-File can be created, edited, loaded or saved directly in the function dialog. This part of the dialog looks as follows:
You have the following options:
- Load: Click this button to load an existing CRT-File.
- Save: Click this button to save the changes to a CRT-File.
- Save as: Click this button to save the changes to a different CRT-File.
- First Column (in the example OEM [0..255]): In this column you can select or enter the data which you want to translate.
- Second Columng (in the example Unicode [0..65535]): In this column you can select or enter the data which the first column shall be translated into.
- Move Up: Click the Move up icon to move the selected line upwards in the table.
- Move Down: Click the Move down icon to move the selected line downwards in the table.
- Add: Click this button to add a reference to the list.
- Delete: Click this button to delete the selected reference.
You can edit a CRT-File with a text editor (e.g. Microsoft Notepad), too.
Examples
Load Colors and Symbols From
The CRT-File of the Load Colors and Symbols From function is defined as follows:
In the first column of the cross reference table the symbol numbers of the current map are listed. In the second column symbol numbers of the other OCAD-File are listed, namely those numbers of symbols, which the current symbol has to be replaced with.
Example:
526.000 813.001
If a row of the CRT-File looks as in the example, the symobls of all objects with the symbol number 526.00 will get the symbol of the other OCAD-File with the number 813.001.
Import OCAD-Files
The CRT-File of the Import OCAD Map function is defined as follows:
In the first column of the cross reference table the symbol numbers of the map to be imported have to be listed. In the second column the symbol numbers of the currently opened OCAD-File have to be listed.
Example:
101.000 305.000
All objects with the symbol 101.000 in the file which is to be imported are assigned with the symbol 305.000 of the currently opened OCAD-File.
Import DXF-Files
Click the CRT button in the Import DXF File dialog box to load a cross reference table. A cross reference table is used when Importing or Exporting a DXF file. It defines how DXF layers are translated to OCAD symbols and vice versa.
Each line in this file contains an OCAD symbol number and the name of the corresponding DXF layer. The two are separated by a space character. Use an application such as Microsoft Notepad to create a cross reference table.
This is an example:
101.000 CONTOUR 102.000 INDEXCONTOUR 103.000 FORMLINE 502.000 ROAD 506.000 PATH 527.000 BUILDING
When importing from DXF to OCAD, all objects in the DXF file with the layer name CONTOUR are translated into symbol 101.000. When exporting from OCAD to DXF, all objects with the symbol 101.000 get the layer name CONTOUR. Choose Convert layers from the Map menu to create a CRT file for an imported map.
-1 as symbol number means that OCAD delete these objects.
Convert DXF Geobau layers to OCAD ISSOM symbol set with this CRT-Table: DxfGeobau_to_Issom.zip
Import PDF-Files
When you import a PDF-File in an OCAD map, you are asked if you want to save a CRT-File. This CRT-File is helpful when you want to convert the layers in the PDF-File to symbols later on. The layer names are saved in the second column of the file. In the first column you will have to enter the corresponding symbol number manually.
Import Open Street Map Files
The corresponding CRT-File to the Import Open Street Map Files function in the OCAD directory looks as follows:
1001.0 way_highway_motorway 1001.1 way_highway_motorway_tunnel_yes 1002.0 way_highway_motorway_link 1002.1 way_highway_motorway_link_tunnel_yes 1003.0 way_highway_trunk . . .
In the first column, the symbol numbers of the Open Street Map symbol set are listed. In the second column, the name of the corresponding Open Street Map object can be found.
At the end of the importing process you have to save another CRT-File. This is the same CRT-File as the loaded one but, in addition, the layer names of objects, which the standard symbol set does not provide, are added with a symbol number 0.0. You can add these symbols to the symbol set and enter the number directly in the CRT-File with a normal Text Editor (e.g. Microsoft Notepad). Then use the Convert Imported Layers to Symbols function to symbolize the Unsymbolized Objects.