CTB
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
AutoCAD Plot Style Table.
At a glance
| Original creator | Autodesk (AutoCAD) |
| Purpose | An AutoCAD colour-dependent plot style table: how each of the 255 colour indices prints, with pen colour, screening, lineweight, linetype and line end and join styles. |
| Extensions | .ctb |
| Poka parser | poka-ctb |
| Viewer | poka-tree-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16: parsers/poka-ctb/src/lib.rs (header, length check, zlib inflate, brace parser, tree builder, unit tests) and tests/samples.rs run over the 4 real corpus tables (ixhlbxi_arm, lendres_standard_full_size, opencadstudio_ocad, pirogoeth_navfacstnd). Covers CTBVER1 colour-dependent tables with the pmzlibcodec zlib wrapper, the only variant Poka claims.
What Poka does not read
- linetype codes 0 to 30 are named from ezdxf's documentation of the plot style editor's linetype list; no corpus table sets one (all four use 31), so the code-to-name pairing is not checked against a real file
- the aci_table block (per-colour-index names) is not shown
- pen number and virtual pen assignments are shown as raw numbers, not explained
- named plot style tables (.stb) and any CTB without the pmzlibcodec wrapper are rejected, not read
- no indication of which colour indices are actually used by a drawing
Background
The file starts with an ASCII header line (PIAFILEVERSION_2.0,CTBVER1,compress) and a codec tag, then three little-endian lengths and a zlib stream; it is not plain text. The inflated payload is a brace-structured configuration. Poka checks the declared lengths against the stream before trusting it, inflates it and shows the table per colour index, so a reader can see whether a drawing plots in colour or greyscale and at what line weights without opening AutoCAD.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| CTBVER1 | PIAFILEVERSION_2.0,CTBVER1,compress |
Read |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- flate2 (used; MIT OR Apache-2.0; Rust)
- ezdxf acadctb add-on (candidate; MIT; Python; https://github.com/mozman/ezdxf/blob/master/src/ezdxf/addons/acadctb.py)
- unzip_pc3 (reference; no licence; C#; https://github.com/avbrakel/unzip_pc3) — no licence stated; reference only
Sources
- parsers/poka-ctb/src/lib.rs
- https://github.com/mozman/ezdxf/blob/master/docs/source/addons/acadctb.rst