Command-line commands (the hyphen versions)

Command: -CAPCAD_SIGN_INSERT, -CAPCAD_SIGN_FILL, -CAPCAD_MARKING_STRIP_CONTRAN Updated 2026-09-03 Also in: Português
Ask about this page
Answers from this page only. General assistant
Commands on this page -CAPCAD_SIGN_INSERT (insert one sign), -CAPCAD_SIGN_FILL (validate a sign dwg) and -CAPCAD_MARKING_STRIP_CONTRAN (draw a stretch of the alignment as a marking line)
Shortcuts none. The shortcuts that do exist — IV, VA, DF — point at the versions with a form
Ribbon -CAPCAD_SIGN_INSERT: CapCad tab › Road Signing panel › Signs split button › Insert Sign Command Line. -CAPCAD_SIGN_FILL and -CAPCAD_MARKING_STRIP_CONTRAN have no button on the English CapCad tab — type them
Category Command Line Command Versions
Form none
Hosts AutoCAD
Equivalent commands with a form Insert Vertical · Fix Traffic Signs · Marking Strip by Code

The same command, with no window at all. A command with a hyphen in front does the work by asking questions on the command line — which is exactly what a .scr, a ribbon macro or a call from outside the CAD knows how to answer.

  • Questions in a fixed order. Each command always asks the same questions in the same order: a script is just the list of answers.
  • Keywords, not clicks. Implantar, Detectar, Eixo: the options are words you type, and the leading letter is enough.
  • Enter is an answer. Almost every question has a default, and Enter accepts it — a short script covers the common case.
  • It is the same engine. Nothing here is a second implementation: the insertion, the validation and the drawing are the form's own.
  • Built for batches. Combined with Batch Script, these are how you repeat an operation across dozens of drawings.

What a hyphen command is

The hyphen in front of the name is the CAD's own convention for "the version without a dialog box", as in -LAYER or -INSERT. CapCad follows it: where CAPCAD_SIGN_INSERT opens a form, -CAPCAD_SIGN_INSERT asks the same questions on the command line.

That matters in three situations:

  1. .scr scripts and batch files, which can only send text to the command line.
  2. Ribbon, menu and keyboard macros, which are also text.
  3. Automation from outside the CAD — another program sending commands to the open drawing.

Every CapCad hyphen command runs on AutoCAD only.

The eight hyphen commands

Command What it does Documented in
-CAPCAD_PROJECT_SET Sets the project folder (and the alignment, if you give it a file) Project Manager
-CAPCAD_STYLE_SET Registers a style in the drawing CapStyle Editor
-CAPCAD_STYLE_MIGRATE Relabels the drawing's layers to the active style CapStyle Editor
-CAPCAD_DEVICE_INSERT Inserts a block from the road library Road Library
-CAPCAD_ROAD_SET Applies a linear-set definition to a stretch of alignment Linear Sets and the Compositor
-CAPCAD_SIGN_INSERT Inserts a sign referenced to the alignment this page
-CAPCAD_SIGN_FILL Validates a sign's dwg without opening the form this page
-CAPCAD_MARKING_STRIP_CONTRAN Draws a stretch of the alignment as a marking line on a layer you name this page

How to read the prompt tables

  • Prompt is the exact text that appears on the command line.
  • A keyword in brackets is a typable option; as in any CAD command, the leading capitals are enough (I for Implantar, D for Detectar).
  • Enter accepts the stated default; Esc cancels the whole command.
  • Numbers accept a comma or a dot as the decimal separator.

The prompts are in Portuguese in every language of the product. They are quoted below exactly as they appear, with the English meaning beside them. Type the Portuguese.

-CAPCAD_SIGN_INSERT — insert a sign

Inserts a sign referenced to the alignment, with station, side and offset computed — the same path as Insert Vertical, without the form.

It needs an active alignment. Without one the command answers Sem eixo ativo. ("no active alignment") and ends. Set the alignment first, with -CAPCAD_PROJECT_SET or from the Alignment Manager.

# Prompt Meaning Answers Default
1 Placa: Sign The sign code, no spaces — R-1, A-2a, MA-01 — (empty cancels)
2 Ação [Implantar/Manter/Remover]: Action [Install / Keep / Remove] I, M or R Implantar
3 [Eixo/PontoClicado]: [Alignment / Picked point] E inserts referenced to the alignment; P only reads a point and ends without inserting Eixo
4 Ponto: Point The point in the drawing where the sign goes
5 Sentido [Crescente/Decrescente/Identificar]: Direction [Increasing / Decreasing / Identify] C, D or IIdentificar deduces the direction from the side the point fell on — (no default: you must answer)
6 Valor numérico para afastamento do eixo ou [Detectar]: Numeric offset from the alignment, or [Detect] A number in metres, or D Detectar
7 Bordo esquerdo? [Não/Sim]: Left edge? [No / Yes] N or S Não (no)
8 atributo (<Enter> para nenhum): attribute (\<Enter> for none) The name of one of the block's attributes, or Enter to finish Enter ends the loop
9 value: value That attribute's value

Questions 8 and 9 form a loop: each turn you give one name/value pair, until you answer Enter at the name. The pairs go onto the inserted sign's attributes.

Details worth knowing:

  • The PontoClicado option inserts nothing. It reads the point and leaves. To insert without an alignment, use CAPCAD_SIGN_INSERT_SIMPLE, which asks for the code and inserts at the picked point.
  • Detectar is the fallback answer. Answering with Enter, with D, or with any text that is not a number, makes the command measure the distance from the picked point to the foot of the perpendicular on the alignment (up to a limit of 1000 units) and use that as the offset.
  • An empty value at step 9 also ends the loop — after writing that attribute with an empty value. To go on giving attributes, give each one a non-empty value.

Script example

An R-1 sign, to install, 3.50 m to the right of the alignment, with the post attribute filled in:

-CAPCAD_SIGN_INSERT
R-1
Implantar
Eixo
125430,74580
Identificar
3.5
Não
SUP_COD
SP-2

(one blank line to end the attribute loop)

-CAPCAD_SIGN_FILL — validate the sign's dwg

Runs the validation of a sign drawing — hatches from ByLayer to ByColor, frame, millimetres to metres, insertion point, INSBASE, zoom extents and saving — without opening the form. The validation itself is described in Fix Traffic Signs.

This command asks nothing. Its parameters come from the form's last configuration:

  • If the Validate and Publish Sign form is open, the command uses exactly what is on screen.
  • If it is closed, the command builds an invisible copy of it and uses the stored preferences: frame policy (layer 0 / by colour / by a named layer), Renew border, Draw border if missing and the forced width and height.

Three things to consider before putting it in a script:

  • The drawing is saved. Building the form from the drawing always ticks the Save box, whatever the preferences hold — so a scripted run writes the file.
  • It is not entirely silent. On the first run of the installation's life, a box asks whether you want the sign saved at the end (and your answer there overrides the Save box for that run); if a forced width or height is set, another box asks for confirmation. Run the command by hand once before automating it, so those questions are already answered.
  • The all open drawings box is never on in a freshly built form: from the command line, only the current drawing is validated. To validate every open drawing, use the form.

-CAPCAD_MARKING_STRIP_CONTRAN — draw a stretch of the alignment as a marking line

Extracts the stretch of the active alignment between two points, optionally offsets it, and draws it as a polyline on a layer you name. It is the minimal, scriptable version of drawing a marking line: there is no marking catalogue of the active country profile, no cadence, no stud and no colour — you choose all of that yourself, by writing the layer name.

It needs an active alignment. Without one: Sem eixo ativo.

# Prompt Meaning Answers Default
1 Enter layer (use double quotes if it has spaces) or [0]: — (in English already) The layer name. Double quotes when it has spaces 0
2 Enter offset (pos or neg) or [0]: — (in English already) The offset in metres, positive or negative 0
3 Primeiro ponto: First point A point on (or near) the alignment
4 Segundo ponto ou estaca...: Second point or station… The other end of the stretch

What happens next:

  1. The stretch of alignment between the two points is identified. If it cannot be: Trecho não identificado no eixo. ("stretch not identified on the alignment").
  2. With a non-zero offset, the stretch is displaced. Positive is to the left of the stationing direction; negative, to the right.
  3. The layer is created if it does not exist, and the polyline is drawn on it.
  4. If the layer had to be created, the command says so: <layer> wasn't defined.

Important cautions:

  • The layer is created raw. The layer is born with the default colour and linetype, without the colour that its code would carry and without the cadence linetype, and with no validation of the name's grammar. If what you want is a complete marking line — with colour, cadence, studs and material — use the command with a form, described in Marking Strip by Code, or Marking Strip.
  • Only one polyline is drawn per run. Double lines and studs do not come out of here.
  • The first two prompts are in English and the next two in Portuguese, in every language of the product.

Script example

A right edge line, 3.60 m to the right of the alignment, between two known points:

-CAPCAD_MARKING_STRIP_CONTRAN
ROAD_MARK_WH_EDGE
-3.6
125430,74580
125630,74612

The layer name there is just a string you type; use whatever name your own layer catalogue resolved for the line you are drawing — the command creates it verbatim.

Notes

  • None of these commands opens anything and none remembers what you answered. Every run starts from scratch — with the exception of -CAPCAD_SIGN_FILL, which reads the form's preferences.
  • Esc cancels the whole command, at any question; nothing already answered is kept.
  • To repeat the operation across many drawings, combine these commands with Batch Script, which assembles a routine and runs it in the open drawing.
  • If a command answers "Sem eixo ativo", the problem is the project, not the command: see The Alignment and the Alignment Manager.

See also