Historical Context & Motivation
Before the era of digital CAD, engineers and drafters produced drawings with ink on vellum or mylar, carefully selecting pen weights, ink colors, and line types to convey information hierarchy on the printed page. When AutoCAD arrived in 1982, it digitized the drawing process but initially offered limited control over how on-screen colors mapped to physical pen plotters. Early pen plotters had carousels holding pens of different widths, and AutoCAD simply mapped object colors to pen numbers — a crude but effective scheme. As the software matured and electrostatic and inkjet plotters replaced pen-based hardware, Autodesk recognized that separating visual appearance from geometric data was essential for professional output workflows.
The central question that plot styles answer is fundamentally one of abstraction: how do you maintain a single source drawing while supporting multiple output appearances — monochrome construction documents, color presentations, and screened background sheets — without duplicating geometry? This is the same separation of concerns principle familiar from software engineering, where data logic is isolated from presentation.
Core Principles & Definitions
A plot style is a collection of property overrides that modify how an object is rendered at plot time without changing its properties in the drawing database. These overrides are organized into plot style tables — files with either a .ctb or .stb extension — that are attached to layouts and referenced during the plot pipeline. Understanding the distinction between these two table types, and when to use each, is foundational to mastering AutoCAD output.
CTB — Color-Dependent
STB — Named Style
Plot Style Properties
PSTYLEPOLICY System Variable
PSTYLEPOLICY variable (0 or 1) determines whether new drawings use CTB or STB mode. This is set at drawing creation time and is difficult to change retroactively, making early planning critical.<h1> looks the same), while an STB file is like styling by class name (you assign classes freely to any element regardless of its tag).Visual Explanation — The Plot Style Pipeline
.ctb table, which defines the output lineweight and screening percentage. The on-screen colors remain unchanged — only the printed result is affected.The diagram above illustrates the fundamental pipeline. On the left, the drawing contains objects assigned to various AutoCAD Color Index (ACI) colors — red for walls, yellow for dimensions, green for hatching, and so on. These colors are chosen for on-screen legibility against a dark model-space background. In the middle, the CTB table acts as a lookup function: each color index (1 through 255) maps to a set of output properties. On the right, the final printed sheet renders all objects in black with varying lineweights and screening percentages, producing a professional, hierarchical document. The critical observation for computer science students is that this pipeline implements a classic decorator pattern — the plot style table wraps the drawing data with presentation logic without modifying the underlying objects.
How Plot Styles Work — The Rendering Pipeline
When you issue a PLOT command (or Ctrl+P), AutoCAD traverses every visible object in the designated plot area and evaluates it through the plot style table. The resolution order depends on whether the drawing uses CTB or STB mode, and understanding this resolution is essential to debugging unexpected output.
CTB Resolution Logic
In a CTB drawing, the resolution is deterministic and simple. AutoCAD reads the object's effective ACI color (which may be inherited from its layer via ByLayer or set explicitly via ByObject). It uses this color index as a key to look up the corresponding entry in the attached .ctb file. The entry's properties — output color, lineweight, screening, line-end style, line-join style, and fill style — override the object's native properties for the duration of the plot. This can be expressed as a function:
ACI_Color(obj) returns the effective color index (1–255) of the object, and CTB_Table is an array of 255 style entries. This is essentially a hash map with integer keys — O(1) lookup.STB Resolution Logic
In an STB drawing, the resolution involves an extra level of indirection. Each object (or its layer) carries a plot style name property — a string like "Heavy Walls" or "Light Annotation". AutoCAD looks up this name in the attached .stb file's dictionary of named styles. If the name is not found, the object plots with its native properties. This is analogous to CSS class-based styling where a missing class simply results in default rendering.
StyleName(obj) returns the named plot style string assigned to the object or its layer, and the ?? operator falls back to native properties if the style name is unresolved. This is a dictionary lookup — also O(1) amortized.Detailed Breakdown — CTB vs. STB
Choosing between CTB and STB mode is one of the first architectural decisions in an AutoCAD project, much like choosing between a relational and document database shapes your entire data access layer. Both systems achieve the same end goal — controlling output appearance — but they impose fundamentally different constraints on your drawing organization. The following diagram and table provide a side-by-side comparison to help you reason about which approach fits a given workflow.
| Feature | CTB (Color-Dependent) | STB (Named) |
|---|---|---|
| Style Selector | ACI color index (1–255) | Arbitrary name string |
| Max Unique Styles | 255 | Unlimited |
| File Extension | .ctb | .stb |
| Assignment | Automatic via object color | Manual per layer or per object |
| Industry Adoption | Dominant (~85% of firms) | Growing but still niche |
| Conversion | Can convert to STB (CONVERTPSTYLES) | Can convert to CTB (CONVERTPSTYLES) |
Worked Example — Creating and Applying a Monochrome CTB
The most common plot style task is creating a monochrome CTB that converts all colors to black while differentiating objects by lineweight. Let us walk through this process from start to finish using the monochrome.ctb as a base template.
STYLESMANAGER at the command line (or navigate to File → Plot Style Manager). This opens the directory where AutoCAD stores plot style table files, typically C:\Users\<username>\AppData\Roaming\Autodesk\AutoCAD <version>\R<xx>\enu\Plotters\Plot Styles\.monochrome.ctb and rename the copy to MyProject-Mono.ctb. Starting from the built-in monochrome template saves time because it already sets all 255 colors to output as Black. We will customize lineweights for specific color indices.MyProject-Mono.ctbMyProject-Mono.ctb to open the Plot Style Table Editor. Select Color 1 (Red) and set its lineweight to 0.50 mm — this will be used for walls and structural elements. Select Color 2 (Yellow) and set lineweight to 0.25 mm for dimensions. Select Color 3 (Green) and set lineweight to 0.15 mm with screening at 50% for background hatching.PAGESETUP) and select Modify. In the Plot Style Table dropdown, select MyProject-Mono.ctb. Check Display plot styles to preview the output visually in the layout.MyProject-Mono.ctb and displays plot style previewCtrl+P to open the Plot dialog. Confirm the plot style table is listed, choose your printer or DWG To PDF, and click Preview. The preview should show all objects in black with distinct lineweight hierarchy: walls thick, dimensions medium, hatch thin and screened to gray.Strengths, Limitations, and Trade-offs
| Criterion | Strength | Limitation |
|---|---|---|
| Simplicity | CTB requires zero per-object configuration; color assignment implicitly defines output appearance, reducing setup time | Color choices are constrained by plotting needs — you cannot freely choose display colors for aesthetics if each color has a fixed plot meaning |
| Flexibility | STB allows unlimited named styles and decouples color from output, enabling sophisticated multi-style workflows | STB requires explicit style assignment to every layer or object; migration from CTB to STB is non-trivial and may introduce errors |
| Interoperability | CTB files are universally understood by consultants, contractors, and regulatory agencies — industry standard since the late 1990s | Plot style tables are not embedded in DWG files; if you share a drawing without its CTB/STB file, the recipient gets default (uncontrolled) output |
| Scalability | A single CTB can be shared across hundreds of drawings, ensuring organizational consistency | CTB maxes out at 255 unique style entries; complex projects with fine-grained output requirements may exhaust this space |
Connection to Advanced Plotting Concepts
Plot styles are one component of a broader output ecosystem in AutoCAD. As your projects grow in complexity — from single-sheet exercises to multi-discipline construction document sets — you will encounter several advanced topics that build directly on the foundations covered here. Understanding where plot styles sit in this larger landscape helps you plan your learning path and avoid architectural mistakes that are costly to refactor later.
| Introductory Concept (This Lesson) | Advanced Extension |
|---|---|
| Single CTB for one layout | Sheet Set Manager publishing with per-layout plot style overrides across hundreds of sheets |
| Manual lineweight assignment in CTB | Automated lineweight mapping using company CAD standards (DWS files) and batch auditing with CAD Standards Checker |
| Screening percentage for grayscale | Full color plotting with transparency objects, gradient hatches, and PDF layer output for digital deliverables |
| CTB vs. STB choice at drawing creation | Enterprise template management using CONVERTPSTYLES for legacy drawing migration and ACAD.DWT customization |
| Plotting from Paper Space layouts | AutoLISP/VBA scripting for batch plotting, custom plot style programmatic manipulation via ObjectARX/.NET API |
For computer science students, the programmatic angle is particularly relevant. AutoCAD exposes its plot style infrastructure through the .NET API and ObjectARX (C++ SDK), enabling you to write plugins that dynamically generate or modify plot style tables. Imagine a CI/CD pipeline for construction documents where a commit to a CAD file repository triggers automated plot style validation, generates PDF outputs with standardized lineweights, and flags non-compliant color assignments — this is the kind of infrastructure that firms increasingly build using AutoCAD's API layer.
Practice Problems
FirmStandard.ctb. A new project requires you to produce both a standard monochrome drawing set and a color presentation set from the same DWG files. Describe a workflow using AutoCAD's layout and plot style features that achieves this without duplicating any geometry.PSTYLEPOLICY system variable is set at drawing creation time and is non-trivial to change later. Critically evaluate this design decision: Why might Autodesk have implemented it this way rather than allowing per-layout switching between CTB and STB? What software engineering principles does this reflect, and what are the consequences for large-scale CAD operations?Lesson Summary
Plot styles are AutoCAD's mechanism for separating drawing content from output appearance, analogous to the separation of data and presentation in web development. They are stored in plot style tables — either CTB (color-dependent) files that map each of 255 ACI colors to output properties, or STB (named style) files that define arbitrary named styles assignable per layer or per object. CTB offers simplicity and broad industry adoption — the color is the style selector — while STB provides maximum flexibility by decoupling color from plot treatment.
Each plot style entry controls properties including output color, lineweight, and screening percentage, which are applied only at plot time without modifying the underlying drawing database. The choice between CTB and STB is made at drawing creation via the PSTYLEPOLICY system variable and should be treated as an architectural decision. Plot style tables are attached to individual layouts through Page Setup, enabling multiple output configurations from a single drawing — the same geometry can produce monochrome construction documents and color presentations without any data duplication.