Ask questions about DataCAD 20, DataCAD LT 20, or previous versions here.
#37908 by boerewors
Wed Jul 16, 2008 10:15 am
When exporting a file to .dwg, one of the options is to select if you would like to use the 'DEFAULT.TBL' for colours. Any idea where this is and how I edit it. Same for importing a .dwg file.

Thanks
Pierre Jordaan
Shaftesbury UK
#37909 by Roger D
Wed Jul 16, 2008 10:29 am
boerewors wrote:When exporting a file to .dwg, one of the options is to select if you would like to use the 'DEFAULT.TBL' for colours. Any idea where this is and how I edit it. Same for importing a .dwg file.


If the file exists, it would be under the C:\DataCAD 12\Support Files directory.
To edit, Tools/DXF/DWG Color Map File
#37936 by Daniel Kaczor
Wed Jul 16, 2008 4:05 pm
boerewors wrote:When exporting a file to .dwg, one of the options is to select if you would like to use the 'DEFAULT.TBL' for colours. Any idea where this is and how I edit it. Same for importing a .dwg file.


Take a look at this thread. It's for DC 11, but applies to 12 as well.


edit: I guess if I had posted the url, this post would have made a little sense.

http://forum.datacad.com/viewtopic.php?t=8211
#37946 by boerewors
Thu Jul 17, 2008 2:54 am
'If you don't have a DEFAULT.TBL, go to Tools/DXFDWG Color Map.
Make the color translations that you want and say ok, save file.
this is on v12.'


Thanks for this. I've had a look at the color map in the menu of my V12. Not sure what to do with it thought ... one side is DCAD and the other DWG ... so how do you relate them to one another, or am I being dim here?

There seems to be a selection tool - circle in color block - does this mean you change them one at a time ..?
Thanks
Pierre
#37950 by Roger D
Thu Jul 17, 2008 8:01 am
boerewors wrote:Thanks for this. I've had a look at the color map in the menu of my V12. Not sure what to do with it thought ... one side is DCAD and the other DWG ... so how do you relate them to one another, or am I being dim here?
There seems to be a selection tool - circle in color block - does this mean you change them one at a time ..?


I believe it works like this.
You select on the bottom what you are defining, DatacCAd to DXF/DWG, then pick the colors.
In the image below, I have picked the upper red (with the white cirlce) to map to Blue in a DWG drawing.

Image

Yes, you do need to make the selection 1 at a time for the colors that you need to have mapped. When all done, select OK. and answer yes to overwrite DEFAULT.tbl.
#37952 by Dick Eades
Thu Jul 17, 2008 8:57 am
The engineers I work with, frustrated by their inability to change colors in the blocks written by DataCAD, insisted that I explode all the blocks I use before exporting. Instead, I mapped all the export colors to LtGrey for their screened bases and now they are happy campers even with unexploded blocks.

However, sometimes I need to export to other consultants that would be impaired by everything being one color. In those cases, I switch to the DXFDWG.rgb file or the export.rgb file and then switch back when I'm done. Did you know that the color mappings for the export are saved in your .rgb file?

What would be better yet is for us to be able to specify different export tables instead of default or not.
#37954 by Roger D
Thu Jul 17, 2008 9:09 am
What would be better yet is for us to be able to specify different export tables instead of default or not.


It would be nice that we could add, maybe a line to the transfer.ini file
ColorMap=Filename.tbl

I'd have a unique transfer file for each of engineering firms that I work with. Within each file I would have the color table file for that consultant named.
#37981 by Mark F. Madura
Thu Jul 17, 2008 1:46 pm
DXF/DWG Color Index Mapping Table

If you're reading this post, it's probably because you've determined that DataCAD colors do not equal AutoCAD colors. So when you transfer one way or the other, your drawings do not display or print as you intended. One solution is to load (i.e., use) the DXFDWG.RGB color palette in any drawing you might export to DXF/DWG. If you don't want to do that, please read on.

When you export your drawing to DXF/DWG, DataCAD evaluates the current drawing color palette and tries to make mathematical matches to AutoCAD's default color palette. Based on these matches, DataCAD creates a color index mapping table. So DataCAD's White (color index 1) is mapped to AutoCAD's White (color index 7).

Note: (Assuming DEFAULT.RGB is the current color palette). If DEFAULT.TBL does not exist in the Support Files folder, then DataCAD creates a temporary table in memory. Otherwise, DEFAULT.TBL is used.

When you import (or open) a DXF/DWG file, DataCAD maps AutoCAD's default colors to best matches in the current drawing color palette. So AutoCAD's Red (color index 1) is mapped to DataCAD's Red (color index 2).

All is well for White, Red, Green, and Blue. By default, these color indexes round-trip consistently. However, Light Grey (color index 8) becomes color #253 on the way out, and color #253 becomes color #26 on the way in.

So, it's possible for color indexes to get 'scrambled'. To prevent this, you have to make sure the color index mapping from DataCAD to AutoCAD is reversed when mapping from AutoCAD to DataCAD.

Note: If you open DEFAULT.TBL in a text editor you'll notice the values are stored in an INI file format. There are two sections; [Export] and [Import].

All of this occurs automatically if 'Translate colors using color table file' is checked in the 'Import / Export Color Translation' section on the DXF/DWG tab in Program Preferences. The state of this option is the default 'program' state.

Image
Figure 1 - Option on DXF/DWG tab in Program Preferences

You can override this setting during export by changing the status of 'Translate colors using color table file -> DEFAULT.TBL' on the Export file dialog.

Image
Figure 2 - Option on Export File dialog

The same option is available on the DWG Import Assignments dialog if 'Interactively assign fonts and line types during import' is enabled in the 'Import Method' section on the DXF/DWG tab in Program Preferences.

Image
Figure 3 - Option on DXF/DWG tab in Program Preferences

If you select DXF/DWG Color Map from the Tools pull-down menu, DataCAD will display a dialog with the current drawing color palette on the left, and AutoCAD's default color palette on the right. If you select a color on the left, a dot will appear on the right indicating the 'map to' color. If you select a color on the right, you are setting the 'map to' color for the color that is selected on the left (which is not readily apparent).

When you click OK, DataCAD writes out a .TBL file to the Support Files directory using the same name as the currently selected palette. Typically, this name is DEFAULT.TBL which corresponds to DEFAULT.RGB. If PRIZMA.RGB was the current palette, then PRIZMA.TBL would be created. So it is possible to use multiple mapping tables, but requires using multiple (or uniquely-named) palettes.

Image
Figure 4 - DXF/DWG Color Index Mapping Table

DataCAD Default Colors
Image
Figure 5 - First 15 DataCAD Colors
White/Black, Red, Green, Blue, Cyan, Magenta, Brown

AutoCAD Default Colors
Image
Figure 6 - First 15 AutoCAD Colors
Red, Yellow, Green, Cyan, Blue, Magenta, White/Black

Default DataCAD Palette
Image
Figure 7 - Default DataCAD Palette (DEFAULT.RGB)

Default AutoCAD Palette
Image Image
Figure 8 - Default AutoCAD Palette as displayed in R14 and in DataCAD (DXFDWG.RGB)

Default DataCAD to AutoCAD Color Mapping
(First 15 Colors)
(1) White/Black = (7) White/Black
(2) Red = (1) Red
(3) Green = (3) Green
(4) Blue = (5) Blue
(5) Cyan = (134)
(6) Magenta = (214)
(7) Brown = (30)
(8) Light Grey = (253)
(9) Dark Grey = (250)
(10) Light Red = (13)
(11) Light Green = (93)
(12) Light Blue = (173)
(13) Light Cyan = (131)
(14) Light Magenta = (211)
(15) Yellow = (51)

Image
Figure 9 - Illustration of Default DataCAD to AutoCAD Color Mapping

Default AutoCAD to DataCAD Color Mapping
(First 15 Colors)
(1) Red = (2) Red
(2) Yellow = (239)
(3) Green = (3) Green
(4) Cyan = (209)
(5) Blue = (4) Blue
(6) Magenta = (224)
(7) White/Black = (1) White/Black
(8) = (131)
(9) = (28)
(10) = (2) Red
(11) = (10) Light Red
(12) = (43)
(13) = (164)
(14) = (41)
(15) = (162)

Image
Figure 10 - Illustration of Default AutoCAD to DataCAD Color Mapping

Default Color Palette
DataCAD 11 and later versions store the name of the Color Palette (i.e., RGB) file in the drawing. So the default color palette is determined by your default drawing. If you create a new, non-default drawing, then DataCAD tries to use the RGB file specified in the [PaletteFile] section of DCADWIN.INI (RGBFile=DEFAULT.RGB).

You can force DataCAD to load a specific color palette temporarily (the drawing palette name will be restored when you close the file) by adding the following entry to the [PaletteFile] section of DCADWIN.INI.

Store In Drawing=TRUE
; If FALSE, DataCAD will always read the external (.RGB) color palette instead of the embedded one.
#37982 by Mark F. Madura
Thu Jul 17, 2008 1:56 pm
Roger D wrote:It would be nice that we could add, maybe a line to the transfer.ini file ColorMap=Filename.tbl

I'd have a unique transfer file for each of engineering firms that I work with. Within each file I would have the color table file for that consultant named.


For now, you can copy DEFAULT.RGB to FIRM-01.RGB. Then, load FIRM-01.RGB prior to exporting to DWG. Customize the DXF/DWG Color Mapping Table to create FIRM-01.TBL.

FWIW,

MFM
#37992 by Roger D
Thu Jul 17, 2008 4:08 pm
For now, you can copy DEFAULT.RGB to FIRM-01.RGB. Then, load FIRM-01.RGB prior to exporting to DWG. Customize the DXF/DWG Color Mapping Table to create FIRM-01.TBL.


Thanks Mark, I was looking for the easier way out. I generally have only 1 consultant and have it set good for him.
#37993 by joshhuggins
Thu Jul 17, 2008 4:38 pm
Roger D wrote:
What would be better yet is for us to be able to specify different export tables instead of default or not.


It would be nice that we could add, maybe a line to the transfer.ini file
ColorMap=Filename.tbl

I'd have a unique transfer file for each of engineering firms that I work with. Within each file I would have the color table file for that consultant named.
Yeah this would be handy for those repeat clients. Here's a mock up I made for something like this. To help in the import translation of dwg colors we created a RGB file that only has the first 15 colors mapped so it forces any autocad colors to map to our first 15 colors we use so we don't have to worry about the import translation. If the file needs to be exported back out, then at that point we would tweak the TBL export to map our colors back to their's at export as Mark has shown above. Keeps pen table setup and assigning colors a lot quicker when working with imported files. But it's pretty simple to work with now, so we can wait til after those new smarts work their way out ;)
Image

Who is online

Users browsing this forum: No registered users and 61 guests

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.

DataCAD

Software for Architects Since 1984