Styles

Updated 2026-09-03 Also in: Português
Ask about this page
Answers from this page only. General assistant
What it is The project's presentation standard: layers, colours, sign appearance, sheet formats, property sets and reports
File .capstyle (JSON). Also exists as a cloud style, identified by name
Where the project stores it The item CapCad.Paradigm of project.config
Where the drawing stores it The keys capcad.dwg.style and capcad.dwg.style.owner of the capcad dictionary
Editor CAPCAD_STYLE_EDITOR (form MainFormSingle, 10 tabs)
Set without opening the editor CAPCAD_PROJECT_MANAGER (Main tab) or -CAPCAD_STYLE_SET
Migrate the drawing -CAPCAD_STYLE_MIGRATE
Hosts AutoCAD, BricsCAD, GstarCAD, ZWCAD, ARES Commander

A stop sign is a stop sign in any project; what changes is how it appears — and that is the style. The style separates the project's content from its presentation, so the same work can be delivered in different graphic standards without being redrawn.

  • One file decides the whole delivery. Layer names and colours, the prefix, the station mask, the decimal separator, the appearance and attributes of signs, sheet formats, property sets and the columns of the reports all live in one .capstyle.
  • Layers are generated, not typed. The style says which colour, which linetype and which name each layer role gets; commands ask for the role and CapCad creates the right layer in the drawing.
  • Rules by pattern, not by layer. Layer domains paint whole families of layers with a single rule, of the kind "every white line to be installed".
  • Shared styles. Besides local files there is the cloud style library: CapCad's public styles and those of your own login or company.
  • The style travels with the project. It can be recorded on the project, on the alignment or in the drawing itself — and the drawing also records which cloud the name came from.
  • Swapping is not redrawing. Setting the style changes what comes next; to relabel what is already drawn there is a dedicated migration.

What a style decides

A style is a .capstyle file (JSON). It describes the graphic representation of the project, grouped into the sections below — which are also the editor's tabs.

Section What it decides
Info Style name and comments
General Layer prefix, km format (0+000), decimal separator (Comma / Period), CTB file, linetype file, model and paper units, usual scales, sheet splitting / grouping / numbering, disciplines
Vertical appearance The style of the sign's leader per action (deploy, keep, remove), the post's style, the sign's position when replacing, the attribute height, and a free action → style map for actions beyond the three
Vertical attributes Which of the sign block's attributes are used, in which order, and which stay invisible
Layers The project's layer list: for each role (var), the name, colour, linetype, lineweight, transparency and whether it plots
Layer Domains Rules by pattern (name, pattern, colour) that paint whole families of layers
Formats Per sheet format: the title block, the position of the viewport and of the north arrow, the default width, the arrows, and overrides of the title block's attributes
Reports The columns of each report, the template and the first row
Property Sets The property sets installed in the drawing, with the name, type and default value of each property
Raw JSON The whole model as text — the escape hatch for any field the interface does not show

Not every command uses every part of a style: a project that only does road markings will use the layers, the domains and the km format, and never touch the sheet formats.

The most important mechanism: the layer variable

Each row of the Layers tab has a variable (var) — CapCad's logical key for that layer role, for example SINA_HOR_BR_ZPA. CapCad does not write layer names by hand: it asks the layer catalogue for the layer matching the role, and the style intervenes at three points:

  1. a layer domain whose pattern matches the role can change the colour;
  2. an explicit entry on the Layers tab can change the name, the colour and the linetype;
  3. the style's layer prefix is glued in front of the final name.

The result is the layer that actually appears in the drawing. A role SINA_HOR_AM_ZPA under a style with prefix CAPCAD_ becomes the layer CAPCAD_ROAD_MARK_YE_ZPA in an English session; if the style renames the role SINA_VERT_MAN to V-SIGN-KEEP, the layer becomes CAPCAD_V-SIGN-KEEP — and the internal role is still SINA_VERT_MAN, so every command goes on understanding every other.

Applying a style therefore does not merely describe the layers: it creates them in the drawing, with colour, linetype, lineweight, transparency and the plot flag.

Where styles live

Local files

A .capstyle on disk. The full file path is the style's identifier. This is the format for a specific client's standard, a style derived from another, or a style still in development.

Cloud styles

CapCad's online library. A cloud style is identified by two fields:

  • Name — the style's name;
  • Owner — the verified CapCad login that saved it.

Together those two are the style's identity. An empty Owner is the public / official CapCad style; a filled Owner is that login's cloud. Because a CapCad login can be an e-mail (individual) or a company name (shared by the team), the company cloud is the same for everyone using that login — which is why each organisation can have its own style called, say, Normal, without colliding with anyone else's.

In the editor, the online library panel has two scopes: CapCad (the public styles) and the user's own. The Owner is never sent by the application: the server derives it from the authenticated login.

When a cloud style is registered in a drawing, the drawing writes two keys: capcad.dwg.style with the name and capcad.dwg.style.owner with the owner — so a plain name is never ambiguous between the public cloud and somebody's own.

How the project's style is chosen

Asked "what is the style?", CapCad walks this order and returns the first answer:

# Source When it applies
1 Session cache Already resolved earlier in this session
2 Project CapCad.Paradigm in project.config, with an active project
3 Alignment The CapCad.Paradigm property of the alignment file
4 Drawing capcad.dwg.style in the dwg dictionary (where urban projects usually keep it)
5 Default capcad.default

The Project Manager form shows which of those answered, as fonte: projeto, fonte: alignment, fonte: dwg or fonte: default.

Setting the style writes to project.config when there is an active project; with no project the value stays in memory for the session only.

Named style families

The Style combo of the Project Manager offers a fixed list of six names CapCad recognises as families. Two of them are country-neutral:

Name Family
capcad.default The default applied when nothing is set
capcad.urbano CapCad Urban

The other four are the standards of specific Brazilian agencies and are documented on the Portuguese edition of this page. Any other style — a local .capstyle or a cloud style of your own — is set by typing or picking its name, and does not have to be in this list.

CapCad tests these families by name prefix, not by equality, so a style named after a family plus a suffix (<family>.<agency>) still counts as that family. Three of the six form the urban group, which changes the behaviour of several commands; the urban test is made without the default fallback, meaning a project with no style set is not urban.

What changes in the drawing when you swap the style

Two different actions, easily confused:

Registering the style in the drawing

-CAPCAD_STYLE_SET (or the Style field of the Project Manager, or Apply local to DWG in the editor) only registers which style the drawing uses.

What follows from that:

  • Everything drawn afterwards comes out in the new standard: the layers commands ask for are created with the new style's names, colours and linetypes; signs inserted use the new leader styles and the new attribute list; the station mask and the decimal separator change in the annotations and in the reports.
  • What is already drawn does not move. The entities stay on the layers they were created on.

Migrating the drawing

-CAPCAD_STYLE_MIGRATE (or Update DWG in the editor) relabels the existing drawing: it is given a base style — the standard the drawing was made under — and rewrites the entities from the base style's layers to the matching names of the active style, role by role.

That is the route for taking in a drawing made to another standard and bringing it into yours. Without telling it the base style, the migration will not run: the base style is what says what each old layer meant.

Order matters. In the editor, Update DWG saves the style, registers it in the drawing and only then migrates — because migrating against a style that has not been saved and registered would use stale data.

Checking before migrating

The editor's Layers tab has the QA: compare with DWG check, which changes nothing: it reads the active drawing's layers and compares them with the style's, reporting

  • style layers missing from the drawing;
  • extra layers in the drawing that the style does not know (only when there is a prefix — without one there is no way to tell CapCad's layers from the drawing's own);
  • differences of colour, linetype and plot — colour and linetype are only compared when the style actually defines a value, since an empty field means "inherit from the domain".

The style editor

CAPCAD_STYLE_EDITOR opens the editor. It is modeless: you keep working in the drawing with the window open, and running the command again brings the existing window to the front.

The bottom bar has the file buttons on the left — Open…, New, Save, Save as…, Save to the cloud, Reset — and the two drawing buttons on the right: Apply local to DWG and Update DWG.

When the editor runs outside a CAD, the drawing buttons are disabled: with no active drawing there is nothing to apply or migrate.

Notes

  • The name is required and so is the layer prefix. The km format has to match 0+000, and the decimal separator only accepts Comma or Period. The editor validates all of that before saving.
  • The Raw JSON tab is the escape hatch. Every field of the model that no tab shows is still editable there.
  • A style is not a norm. The style decides the presentation; the widths, spacings and angles the norm mandates come from the country profile and from the project's criteria.
  • One style per project, not per drawing. Several drawings pointing at the same project folder share the same style — unless one of them has its own record in the dwg, which is only consulted when the project defines nothing.

See also