Mapping vector pens

 

You can make vector images more readable on view, print, or rasterize by defining and attaching a pen mapping table to a document. Pen mapping tables render specific vector pens with a different color, pattern, or width than they were defined as. Pen mapping tables can be used, for example, to convert lines drawn with vector pen 243 into a patterned bilevel line for printing.

Pen mapping tables are stored in pen mapping files. One pen mapping file can contain only one table. Pen mapping files are text files in the INI-style format. For details about creating pen mapping files, refer to the "Pen Mapping File Technical Bulletin."

Once you have created pen mapping tables and stored them in pen mapping files, you can control them using the C API. You can attach pen mapping tables to any type of document, but you will only see results with AutoCAD DWG/DXF, HPGL, Calcomp 906/907, and DGN documents.

Why?

If you want to define different settings for display, printing, and rasterization for individual pens in a specific document, then use pen mapping tables. Pen mapping tables give you the highest level of control over vector pens.

To render a vector document using pen mapping tables:

1. With the IN_OpenDocumentWindow function load the required document.

2. If required, find the total number of vector pens in the document, and their identifers, with the IN_EnumerateDocumentPens function.

3. With the IN_LoadPenMappingFile function load the pen mapping file that contains the table you want to use. The function returns the identifier for the table that the file contains. (You can load multiple tables with this property.)

4. With the IN_AttachPenMappingTable function assign the pen mapping table to the document.

5. When you are done with the document, you can remove the pen mapping tables you are not using from memory with the IN_UnloadPenMappingTable method. Repeat as required.

Vector pens in the specified vector document will be rendered on view, print, or rasterize as defined by its attached pen mapping table.

See also

Vector pens: Key concepts

Selecting vector pen settings

Defining vector pens using mask tables

Loading vector files