Command-line commands (the hyphen versions)

Plans: Free CAD Tools Geo Tools Urban Highways Aero
Command: -CAPCAD_SIGN_INSERT, -CAPCAD_MARKING_STRIP_CONTRAN Updated 2026-11-19 Also in: Español Português
Ask about this page
Answers from this page only. General assistant
Commands on this page -CAPCAD_SIGN_INSERT (insert one sign) and -CAPCAD_MARKING_STRIP_CONTRAN (draw a stretch of the alignment as a marking line)
Shortcuts none. The shortcuts that do exist — IV, 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_MARKING_STRIP_CONTRAN has no button on the English CapCad tab — type them
Category Command Line Command Versions
Form none
Hosts AutoCAD, BricsCAD, GstarCAD, ZWCAD and ARES Commander
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. Install, Detect, Alignment: 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 all five CADs: AutoCAD, BricsCAD, GstarCAD, ZWCAD and ARES Commander.

The 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_COUNTRY_STANDARDS Activates a country profile by its key, name or code Country profiles
-CAPCAD_3D_ASSISTANT Runs the 3D conversion with no window, from an options file whose path it asks for (3D Exporter options file:) 3D Assistant
-CAPCAD_SIGN_INSERT Inserts a sign referenced to the alignment 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 in an English interface.
  • A keyword in brackets is a typable option; as in any CAD command, the leading capitals are enough (I for Install, D for Detect).
  • Enter accepts the stated default; Esc cancels the whole command.
  • Numbers accept a comma or a dot as the decimal separator.

The prompts follow the language of the interface. A Portuguese or Spanish interface asks the same questions in its own language, and the keywords are typed in that language too. The Portuguese keyword names written with an underscore in front (_Implantar, _Eixo, _Identificar, _Não) are accepted in every language, which is what a script meant to run anywhere should use.

-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 No active alignment. and ends. Set the alignment first, with -CAPCAD_PROJECT_SET or from the Alignment Manager.

# Prompt Answers Default
1 Sign: The sign code, no spaces — R-1, A-2a, MA-01… — (empty cancels)
2 Action [Install/Keep/Remove]: I, K or R Install
3 [Alignment/ClickedPoint]: A inserts referenced to the alignment; C only reads a point and ends without inserting Alignment
4 Point: The point in the drawing where the sign goes —
5 Direction [Increasing/Decreasing/Identify]: Increasing, D or Identify (type the two words that start with I in full) — Identify deduces the direction from the side the point fell on — (no default: you must answer)
6 Numeric offset from the alignment or [Detect]: A number in metres, or D Detect
7 Left edge? [No/Yes]: N or Y No
8 attribute (<Enter> for none): The name of one of the block's attributes, or Enter to finish Enter ends the loop
9 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.

The same prompts in the other two languages:

# Portuguese interface Spanish interface
1 Placa: Señal:
2 Ação [Implantar/Manter/Remover]: Acción [Insertar/Mantener/Retirar]:
3 [Eixo/PontoClicado]: [Alineación/PuntoClicado]:
4 Ponto: Punto:
5 Sentido [Crescente/Decrescente/Identificar]: Sentido [Creciente/Decreciente/Identificar]:
6 Valor numérico para afastamento do eixo ou [Detectar]: Valor numérico de separación de la alineación o [Detectar]:
7 Bordo esquerdo? [Não/Sim]: ¿Borde izquierdo? [No/Sí]:
8 atributo (<Enter> para nenhum): atributo (<Enter> para ninguno):
9 valor: valor:

Details worth knowing:

  • The ClickedPoint 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.
  • Detect 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.
  • A script never stops on a question about the view. A sign inserted outside the current view does not ask whether to navigate to it.

Script example

An R-1 sign, to install, 3.50 m to the right of the alignment, with the post attribute filled in, written so that it runs in any language:

-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_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 to choose — the layer name you write decides them.

It needs an active alignment. Without one: No active alignment.

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

The first prompt is in English in every language. In a Portuguese interface the other three read Offset (positivo ou negativo) ou [0]:, Primeiro ponto: and Segundo ponto ou estaca...:; a Spanish interface shows them in English.

What happens next:

  1. The stretch of alignment between the two points is identified. If it cannot be: Segment 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. If the layer does not exist it is created through the active style, and the polyline is drawn on it.
  4. If the layer had to be created, the command says so: <layer> wasn't defined, with the name the layer actually received.

Important cautions:

  • The layer follows the active style. A name the style recognises as one of its layers is created with the colour, linetype and description the style gives it, and may receive the style's layer prefix; any other name is created as typed, with the default colour. For a complete marking line — with 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.

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.

Notes

  • None of these commands opens anything and none remembers what you answered. Every run starts from scratch.
  • 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 "No active alignment", the problem is the project, not the command: see The Alignment and the Alignment Manager.

See also