Setting a Single Background Color for Publishing Drawings
Setting a Single Background Color for Publishing Drawings
The default functionality is to publish enterprise graphics using the colors used in your AutoCAD drawings. However, you can specify a single fixed color to use when publishing the entities for background graphics, as opposed to using the colors from your original AutoCAD drawings. Typically, you would use black or dark gray for the background color.
This feature is supported for both AutoCAD and Revit.
SWF publishing
To use a single color for publishing enterprise graphics, you can do either of the following:
-
Set the new afm_dwgpub.color_mapping field to a color value which can be either a RGB hexadecimal value, or a named color value.
Example of valid RGB values: 0xff0000, xff0000, ff0000 (not case sensitive)
Example of valid named colors: Red, SlateBlue, Black, DarkGray
-
Call this feature from the new AutoLISP function:
(AFM_NET_LISP "PublishSetEntityColor" 'T "0xAAAAAA")
The afm_publish.lsp file describes its usage and provides an example of its use.
SVG publishing
For SVG rules for publishing for use with the Archibus mobile apps, the feature maps the colors of non-asset layers. For instance, if you set the Color Mapping value to grey (e.g. "0xAAAAAA"), the publishing routine will output all background layers (e.g. WA, WA-EXT, DR, PL, SITE) in grey, but will show any asset layers (e.g. BL, RM, EQ) as the color that they appear in AutoCAD.
The publishing routine creates a <style /> section in the head of the SVG file and sets the color for all elements on each layer of the drawing by adding to this <style /> section a subclass element for each layer (e.g. ".wn { stroke:#808080; }"). The Color Mapping override changes this style to the specified color (e.g. ".wn { stroke:#AAAAAA; }").