| Commands | CAPCAD_RESTRAINT (the Road restraint form) and CAPCAD_BATCH_RESTRAINT (batch insertion) |
| Shortcut | DEF for CAPCAD_RESTRAINT; the batch insertion has none |
| Ribbon | CapCad tab › Safety panel › Restraint split button › Defensa & Barreira and Inserir Defensa em Lote |
| Category | Safety for CAPCAD_RESTRAINT; the batch insertion is mapped as Horizontal: tools |
| Forms | DefensaForm — "Road restraint", 7 tabs; DefensaBatchForm — "Defensa Batch Insert". Both are modeless: you click points in the drawing with them open. Running the command again brings the open form back instead of opening a second one |
| Hosts | Both commands: AutoCAD, BricsCAD, GstarCAD, ZWCAD, ARES Commander |
| Also opened by | the 2D button of the 3D Assistant opens CAPCAD_RESTRAINT; the restraint requirement analysis opens the batch form with its stretch table and columns already filled in |
A guardrail is a parallel of the alignment with a length that is a whole number of beams and a terminal at each end — and that is what this command delivers in one go. With OFFSET, TRIM and INSERT you do the same thing in five steps and still have to check the metreage.
- Four ways of saying where. Two clicked points, one point plus a length, a station plus a length, or station to station — whichever is closest to your design table. An existing polyline can also be converted.
- Metreage that closes. Offsetting from the alignment changes the length through a curve; the body is re-anchored at the start point and rounded to whole beams.
- Layers by action. Body and terminals go to the restraint layers of the active catalogue for Insert, Keep, Remove or Replace, so the drawing reads as a plan of works.
- Terminals with attributes. The blocks are brought from the library, scaled, rotated and stamped with station, coordinates, span, function and your own attributes; whatever is not found is named in the report, not silently dropped.
- Labels and slope in the same pass. Terminal labels from the drawing style and the embankment hatch can be drawn together with the body.
- Editing what is already drawn. Insert a block or a gap into an existing guardrail, change its action, round its length, or draw a whole road's worth from a table with the batch insertion.
What it does
CAPCAD_RESTRAINT draws a lateral restraint device — a metal guardrail, a concrete barrier or a custom object — as a polyline parallel to the alignment, plus the two terminal blocks at the ends.
The chain is always the same:
- The alignment. With Select alignment (15) ticked, you pick it on screen first; otherwise the project's alignment is used.
- Two points. The positioning method you chose produces a start and an end point: clicked, or computed from a station and a length.
- Projection onto the carriageway. The two points are projected perpendicularly (a 500-unit reach) onto the carriageways of the alignment and ordered by station. A typed km is first found on the alignment's reference line and then moved onto the carriageway on the side of the chosen direction.
- The stretch. The part of that carriageway between the two stations becomes the device's reference line.
- The offset. That stretch is shifted sideways by the offset. A positive offset draws the body to the right of the alignment's increasing direction (CapCad calls that Increasing); Decreasing puts it on the left.
- The metreage. Through a curve, the parallel comes out longer or shorter than the alignment stretch. The body is then re-anchored at the start point and rounded to the object's multiple: 4 m (one beam) for the guardrail and for the custom object, 1.50001 m for the barrier — the extra 0.00001 keeps the length from landing exactly on a linetype pattern boundary.
- Terminal clearance. When asked for (see 42 and 136), the body shrinks by 24 m — three 4 m beams at each end — so that the blocks occupy the extremities.
- The terminals. Two blocks are placed at the ends of the body, facing outwards, scaled and stamped. Then the labels, the body label and the slope hatch, if asked for.
Layers. The body goes to the restraint layer of the active layer catalogue for the body action: the guardrail family (DEFENSA_IMP, DEFENSA_MAN, DEFENSA_REM, DEFENSA_SUB) for a guardrail, the barrier family (BARREIRA_…, with SIMPLES or DUPLA) for a barrier. A Type (39) is added to the layer name. Each terminal goes to the terminal layer of its own action (…_TERMINAL_ENTRADA, …_TERMINAL_SAIDA), for the barrier too. The custom object goes to the layer of list 138. The slope hatch goes to the slope layer of the catalogue.
Workflow
- Run
CAPCAD_RESTRAINT(or typeDEF). The form opens beside the drawing, on the Main tab, with the options of the last session. - On the Main tab, choose the positioning method (2, 3, 5 or 8) and fill its boxes. Clicking inside a box already selects the method it belongs to.
- Choose the object (27, 28 or 29) and the offset: Detect from the point (11) measures the distance from the clicked point to the alignment, or Fixed (12) uses the value in 13.
- Adjust the terminals (1, 16 to 21), the body action (48, 49, 51, 52) and the labels (32 to 36).
- Choose Yes (41) or No (42) under Terminal block overlapping the guardrail body: Insert does not run until one of them is chosen.
- Click Insert (40). The form hides while you work in the drawing.
- With Select alignment (15) ticked, the command asks you to select the alignment — a polyline or a line.
- In the point methods, the command asks for Ponto inicial and, in 2 points, also for Ponto extensão. While you move the cursor, a dashed line shows the foot on the carriageway, as when inserting signs (the same preview option).
- The body is drawn, then the double line, the slope hatch, the terminal blocks and the labels that were asked for, and the command line sums it up: body length, start and end station, direction, and how many terminals went in out of how many were planned.
The form comes back for the next stretch. Update (43), Zoom (44), Reset (45) and the two Flip links (55, 56) act on that last run.
The Road restraint form
Numbers 1 to 95 and 133 to 154 run through the seven tabs of Road restraint; 96 to 132 and 155 are the batch insertion, further down. Some controls only appear in some states; they keep their number in every picture.

The Main tab as a fresh form opens: method 2 points, object Guardrail, terminals from Blocks, action Insert.

The same tab with km to km, Custom, Different terminal actions and overlap No: the Direction frame (30, 31), the layer list (138), the two terminal action frames (139 to 146) and box 136 appear.

In Convert mode the offset frame and the alignment controls give way to box 137, and the main button reads Converter.
Tab 1: Main
Positioning method (top left frame)
| # | Control | What it does |
|---|---|---|
| 2 | 2 points | The command asks for two points in the drawing; they are projected onto the carriageway and bound the stretch. |
| 3 | 1 point + length: | The command asks for one point; it gives the start station, and the end is that station plus the length in 4, on the clicked point's carriageway. |
| 4 | length (default 32) | Method 3's length, in metres — or in beams, if Beams (=4m) (84) is ticked, when each unit is worth 4 m. Typing here already selects method 3. A zero is refused. |
| 5 | km (+ length) | Start station in kilometres in box 6, plus the length in box 7. A zero in either is refused, so a stretch starting exactly at km 0+000 cannot be typed. |
| 6 | start km | In kilometres (the command multiplies by 1,000). |
| 7 | length (default 32) | Method 5's length, in metres or in beams. |
| 8 | km (to km) | Start station in box 9 and end station in box 10, both in kilometres. It also refuses zero. |
| 9, 10 | start km, end km | In kilometres. |
| 22 | Convert | Turns existing polylines into restraints. Insert asks you to select the guardrail; the end nearer to the click becomes the start, the length is rounded to the object's multiple when 86 is ticked, and the body, terminals and labels are drawn as in a normal run, on the side of the Direction choice (30, 31), which is hidden in this mode and keeps its last value. It repeats until you cancel the selection. Stations come from the project's alignment when there is one. |
| 137 | Eliminar entrada | Convert mode only: deletes the polyline you picked, so only the converted restraint remains. |
| 23 | In existing assembly… | Jumps to the Utilities tab; Insert then runs the insertion into an existing body described there (57). |
In both km methods, the command frames the view on the resolved stretch.
Alignment offset
| # | Control | What it does |
|---|---|---|
| 11 | Detect from the point | The offset is the distance from the clicked point to the alignment. It only makes sense in methods 2 and 3, which have a clicked point; in the km methods there is no point to measure from and the value in 13 is used. |
| 12 | Fixed: | Uses the value in box 13 as the offset. |
| 13 | fixed offset | Distance from the alignment, in drawing units. The box is disabled while Detect from the point is ticked. Default 8. |
| 15 | Select alignment | Ticked, Insert asks you to pick the alignment on screen before the points. Unticked, the project's alignment is used. When the form opens it is ticked if the drawing has no project alignment and unticked if it has one; you can change it either way. |
| 14 | ⟳ | Checks again whether the drawing has a project alignment and sets 15 accordingly. |
In the point methods, the side of the clicked point decides the direction: a point to the left of the alignment makes the stretch Decreasing, one to the right, Increasing. The Direction frame applies to the km methods and to Convert.
Object, Direction, Characteristics
| # | Control | What it does |
|---|---|---|
| 27 | Guardrail | Metal guardrail: length rounded to multiples of 4 m; body on the guardrail layer of the action. |
| 28 | Barrier | Concrete barrier: multiples of 1.50001 m; body on the barrier layer of the action. Choosing it sets both terminal lists (19, 20) to <sem>. |
| 29 | Custom | A generic object; it rounds like the guardrail, in multiples of 4 m. It hides the Characteristics frame and shows the Layer list (138). |
| 138 | Layer | Custom object only: the body layer. <current> (the default) leaves the body on the current layer; the list also offers the layers of the Insert Motiva layers set (95). A name the catalogue or the style knows is created with its colour, linetype, width and linetype scale; any other name is brought into the drawing as typed. |
| 30 | Increasing | Body to the right of the alignment's increasing direction. The Direction frame only shows in the km methods. |
| 31 | Decreasing | Body to the left, and the offset goes in with a negative sign. |
| 37, 38 | Single, Double | Double on a guardrail or custom object draws a second, continuous line 0.56 units off the body, on the same layer. On a barrier it chooses the DUPLA layer instead of SIMPLES. |
| 39 | Type | A list of guardrail types (or barrier types, for the barrier); the choice is added to the body layer name. It can be left empty. |
Body action, scale and slope
| # | Control | What it does |
|---|---|---|
| 48, 49, 51, 52 | Insert, Keep, Remove, Replace | The stretch's action: it chooses the body layer, it is inherited by both terminals unless Different terminal actions (21) is ticked, and it chooses which terminal block is used when Differentiate status (78) is on. It is also written into the DEF_ACAO attribute. |
| 50 | Change existing | Asks you to select entities in the drawing and moves the restraint pieces among them to the layers of the chosen action (and Type). The command line says how many entities changed. |
| 53 | Scale | Scale of the terminal blocks. Empty, zero or negative counts as 1. |
| 54 | Add slope | After drawing the body, draws the embankment hatch from it, with the four values of the Slope tab (88 to 91), on the slope layer of the catalogue. |
Terminals (right column)
| # | Control | What it does |
|---|---|---|
| 1 | Use terminals | Unticked, no terminal block is inserted, and the command line reports that terminals are off. The Terminals and Terminal attributes frames are disabled with it. |
| 16 | System | Both terminals are CapCad's terminal block, DEF_TERMINAL_IMP, set to the terminal type chosen in 19 and 20. The lists offer <sem> and a fixed set of terminal abbreviations, each with its description in Portuguese. |
| 17 | Blocks | The lists offer the drawings of the DEFENSA folder of the project's library (names containing 3D are left out), and the names chosen are the blocks inserted. If the project has no library folder, the form offers to open the Project Manager. A fresh form starts on this option; on the Brazilian profile it starts on System. |
| 18 | Actions | The lists are hidden; the blocks are the names of the Terminal blocks tab (81, 82), varied by action when Differentiate status (78) is ticked. |
| 19, 20 | Start, End | The terminal at each end. System and Blocks each remember their own last choice. |
| 21 | Different terminal actions | Unticked, both terminals inherit the body's action. Ticked, the Ação entrada (139 to 142) and Ação saída (143 to 146) frames appear, and each terminal takes its own action: its layer and, with 78, its block. |
| 139 to 142 | IMP, MAN, REM, SUB (entry) | The entry terminal's action. |
| 143 to 146 | IMP, MAN, REM, SUB (exit) | The exit terminal's action. |
| 24 | Span | Written into the DEF_TRAMO and TRAMO attributes of both terminals. |
| 25 | Function | A list of guardrail functions (fixed obstacles, embankment slopes, drainage, sign supports, central reserve…); typed text is accepted. Written into DEF_FUNCAO, FUNCAO and TIPO. |
| 134 | attribute grid | Your own attributes: type an attribute name and a value on the empty row; clearing the name removes the row. Every pair is written into both terminal blocks, before CapCad's own attributes. The grid is remembered between sessions. |
| 87 | Insert terminal attribute as invisible if not found | Ticked (the default), a grid attribute that the terminal block does not have is added to it as an invisible attribute; unticked, it is skipped. |
Labels
The labels need an alignment: without one, the command line says no label was inserted.
| # | Control | What it does |
|---|---|---|
| 32 | Do not insert | No labels. |
| 33 | Insert from style | Inserts the guardrail labels the active drawing style marks for the restraint: its guardrail start label at the first end of the body, its guardrail end label at the other, its guardrail label at the start. Enabled only when the style marks at least one of them; the form then switches to it, unless Do not insert is chosen. |
| 35 | Insert | Inserts the label chosen in list 34. |
| 34 | label list | The style's labels, when it defines them (Style: guardrail start / end, Style: guardrail (at the start)), then term geo km and acao term geo km (one label at each terminal) and DEFENSA - acao term i corpo term f kmi xy ext (one label at the start of the body). Enabled only with 35; the choice is remembered. |
| 36 | Guardrail body | Adds a label at the middle of the body with its length and action. |
| 135 | Scale 1: | Scale of the labels; it is the same label scale the sign forms use. |
With a label at each terminal, the action, length and terminal names (DEF_ACAO, DEF_EXT, DEF_TERM_INICIAL, DEF_TERM_FINAL) are written on the labels; otherwise they are written on the terminal blocks.
Overlap and direction reference
| # | Control | What it does |
|---|---|---|
| 41 | Yes | The terminal block may overlap the body: the body keeps its whole length. |
| 42 | No | The blocks are turned to sit outside the body, and box 136 appears. |
| 136 | Referência ponto clicado: terminal | Shown with No. Ticked, the body makes room for the blocks: it shrinks by 24 m (12 m at each end). If the rounded body does not exceed 24 m, the command refuses with "extensão mínima não atingida para os terminais" (minimum length for the terminals not reached). The pull-back does not apply with terminals from Blocks (17), in Convert mode, or when Round output length to multiples of 4 (86) is off. |
| 46 | km direction | Reference for a decreasing stretch: the stationing. The default. |
| 47 | Flow direction | Reference for a decreasing stretch: the traffic flow. On a decreasing stretch this choice decides whether the two terminals swap ends — with km direction in the point methods, with Flow direction in the km methods. |
Neither Yes nor No is ticked on a fresh form; Insert warns that the overlap methodology must be selected and does not run until you choose.
Footer actions
| # | Control | What it does |
|---|---|---|
| 40 | Insert | Runs the whole chain. In Convert mode it reads Converter. |
| 43 | Update | Erases the last run and draws it again with the form's current values, on the same points and alignment (the km methods take the boxes again). With no run yet, it says there is nothing to update. |
| 44 | Zoom | Frames the body of the last run on screen. |
| 45 | Reset | Erases what the last run drew: body, double line, terminals and labels. The slope hatch stays. |
| 55 | Flip group | Swaps the Start and End terminals (19, 20) and draws the last run again; the body stays where it is. |
| 56 | Flip side | Redraws the body of the last run reversed; the terminals are not touched. |
| 133 | 3D cube | Opens the 3D Assistant. |
When the command cannot resolve the stretch, the command line says why. The refusals are written in Portuguese in every language: selecione um método de posicionamento (choose a positioning method), informe a extensão (give the length), valores de km inválidos (invalid km values), impossível determinar — muito longe ou fora do eixo (cannot determine — too far or off the alignment), extensão mínima não atingida para os terminais (24 unidades), extensão provida muito pequena (menor que 4) (length given too small, under 4), mesmo ponto inicial e final (OSNAP ligado?) (same start and end point — is OSNAP on?) and impossível determinar o offset (cannot determine the offset).
Tab 2: Utilities

The Utilities tab: editing restraints that are already drawn.
| # | Control | What it does |
|---|---|---|
| 57 | insert button | Inserts into an existing guardrail. Its caption follows the two frames below (Inserir + replacement + por + method). It asks you to select the guardrail, then the point or points the method needs, cuts the body and deletes the original. Insert (40) does the same when In existing assembly… (23) is chosen. |
| 58 | 2 points | The cut runs between two clicked points. |
| 59 | 1 mid point + length: | The cut is centred on one clicked point, with the length in 60 (default 8). The default. |
| 60 | length | The length of the cut. |
| 61 | End + length: | Shortens the guardrail by the length in 60, at the end nearer to where you selected it. The command line says end adjusted. |
| 62, 63 | Round to multiples of (4) | Saved with the form; not used by this version. |
| 64 | Adjust terminal if present | Saved with the form; not used by this version. |
| 65 | Beams | The cut stretch becomes new beams on the Insert guardrail layer, with a copy 4 units off on the Remove layer; the rest of the guardrail goes to the Keep layer. Needs the project's alignment. |
| 66 | Block | A block from list 67 is inserted at the cut point, along the guardrail; the rest keeps its original layer. If the block is not found, a message names it. |
| 67 | block list | The drawings of the DEFENSA folder of the project's library (names containing 3D are left out). Default H2 B W2 I2. |
| 68 | Empty | Only the gap is left; the rest keeps its original layer. |
| 69 | Insert block: guardrail/barrier transition | Opens the Road Library on its restraint folder, set to insert at an end, rotated 90°. |
| 70 | Insert terminal in existing restraint | Opens the Road Library on its guardrail folder, set to insert at an end, rotated −90°. |
| 71 | Replace terminal in existing restraint | Opens the Road Library on its guardrail folder, set to replace, rotated −90°. |
| 72 | Round existing length to multiples of… | Steps an existing guardrail to the next multiple of 73. You select one curve, it is redrawn on its own layer at the new length (the command line says Length went from … to …), and the command offers C to grow or D to shrink it by another step; anything else ends. With 73 at 0, the step is the linetype pattern of the curve. |
| 73 | multiple | Default 4. |
| 74 | Include terminals | Blocks sitting on the old ends move with the new ends. Ticked by default. |
| 75 | Multiple mode | You select many entities at once; every curve on a guardrail layer (a name with DEF_ or DEFENSA, or starting with a layer of list 138) is stepped once. |
Tab 3: Terminal blocks
The Terminal blocks tab holds the block names used when option Actions (18) is chosen: the Use custom: (76) and Differentiate status (78) boxes on the left, three preset buttons (77, 79, 80) on the right, the Entry (81) and Exit (82) names, the Blocos por situação frame (147 to 152, shown with 78) and Open library folder (83).
| # | Control | What it does |
|---|---|---|
| 76 | Use custom: | Follows option Actions (18): ticked when it is chosen. |
| 77 | Simplified | Writes DEF_TERM in both boxes and chooses Actions (18). |
| 79 | second preset | Downloads the DEF_TERM_ENT block into the DEFENSA folder of the project's library, writes DEF_TERM_ENT in both boxes and chooses Actions (18). |
| 80 | third preset | Ticks Differentiate status and fills the eight boxes with one entry and one exit block per action (Terminal de entrada-Implantar … Terminal de saida-Substituir), choosing Actions (18). |
| 78 | Differentiate status | Shows the Blocos por situação frame (147 to 152): each terminal then uses the block of its own action. Insert uses 81 and 82. |
| 81 | Entry | Name of the entry terminal block. Default TERMINAL ENTRADA. Typing here chooses Actions (18). |
| 82 | Exit | Name of the exit terminal block. Default TERMINAL SAIDA. Typing here chooses Actions (18). |
| 147, 148 | Manter Entrada, Saída | The entry and exit blocks for Keep. |
| 149, 150 | Remover Entrada, Saída | The blocks for Remove. |
| 151, 152 | Substituir Entrada, Saída | The blocks for Replace. |
| 83 | Open library folder | Shows a note on custom terminal blocks, then opens the project's library folder in Explorer. |
Tab 4: Options

The Options tab: units, length rounding and the list of automatically filled attributes.
| # | Control | What it does |
|---|---|---|
| 84 | Beams (=4m) | The length boxes (4 and 7) start counting beams: each unit is worth 4 m. It never applies to the km boxes. |
| 85 | Metres | The length boxes are in metres. The default. |
| 86 | Round output length to multiples of 4 | Turns the whole length rounding on. Unticked, the body keeps the raw length of the parallel — and the minimum-length checks and the terminal clearance are skipped along with the rounding. |
The list of attributes filled automatically when the terminal block has them: LATITUDE, LONGITUDE, KM, DEF_LAT, DEF_LON, DEF_KM, DEF_TRAMO, DEF_FUNCAO, DEF_TERMINAL, DEF_ACAO, ACAO, TRAMO, FUNCAO, TERMINAL, DEF_EXT, DEF_TERM_INICIAL, DEF_TERM_FINAL. The station (KM, DEF_KM, as 0+000) and the coordinates (LATITUDE, LONGITUDE, DEF_LAT, DEF_LON, in the project's coordinate system) are those of the end where each block sits; DEF_TERMINAL and TERMINAL carry its terminal type.
Tab 5: Info
This tab is text only, in Portuguese: a note on the length rounding and the glossary of the terminal abbreviations offered by option System (16).
Tab 6: Slope

The Slope tab: the four numbers of the embankment hatch.
| # | Control | What it does |
|---|---|---|
| 88 | Offset | Distance between the restraint body and the base line of the hatch drawn with Add slope (54). Zero draws the hatch on the body itself. Default 5. |
| 89 | Smaller | Length of the short tick. Default 2. |
| 90 | Larger | Length of the long tick. Default 4. |
| 91 | Inner distance | Spacing between ticks along the base line. Default 3. |
| 92 | Draw standalone | Draws a slope hatch with no guardrail, as CAPCAD_ROAD_EMBANKMENT does: Select the curve, then Side...; the hatch goes to the slope layer and the picked curve is deleted. It uses 89 to 91; the Offset (88) does not apply here. An Inner distance of zero is refused. |
The hatch is described in detail on the embankment hatch page.
Tab 7: Extra

The Extra tab: maintenance of linetype, terminal block, layers and the library.
| # | Control | What it does |
|---|---|---|
| 93 | Redefine guardrail linetype | Reloads the guardrail linetype from CapCad and puts it back on every layer that used it and on every layer with defensa in its name, then regenerates. The form also does this by itself the first time it opens in each drawing. |
| 94 | Redefine terminal block | Replaces the definition of DEF_TERMINAL_IMP in the drawing with the one in the library, so the terminals already drawn follow it, and says Ok. If the library file is open elsewhere or the block is not found, a message says so. |
| 95 | Insert Motiva layers | Brings the Motiva layer set, with its linetypes, into the drawing. |
| 153 | Check updates... | Downloads the block library of the active profile into the project's library folder. If the project has no library folder, it offers to open the Project Manager. |
| 154 | Overwrite existing files | Ticked (the default), a library file that differs from the one available is replaced; unticked, existing files are kept and only the missing ones are downloaded. |
How the options combine
The figures below were produced by running the command's own positioning engine on a 340 m sample alignment (a straight, a curve and another straight), in the km to km method, from 0.040 to 0.260 — a 220 m stretch of alignment.
Offset and direction
Offset 8 m, increasing direction: the body (orange) sits to the right of the alignment (dashed). Here that is the inside of the curve, so the parallel came out at 218.99 m; rounded to multiples of 4 m, the delivered body is 220 m.
The same stretch in the decreasing direction: the body moves to the other side, on the outside of the curve, and the parallel lengthens to 221.16 m; the rounding takes it to 220 m all the same.
Clearance for the terminals
With No under "Terminal block overlapping the guardrail body" and box 136 ticked, the body loses 12 m at each end: from 220 m to 196 m. The two terminal blocks (blue arrows) sit at the ends of the body, facing outwards — the entry one at the lower station, the exit one at the higher.
Multiples per object
The rounding uses the multiple of the chosen object. On the same stretch, the raw 218.99 m parallel becomes:
| Object | Multiple | Delivered length |
|---|---|---|
| Guardrail, Custom | 4 m | 220.00 m |
| Barrier | 1.50001 m | 219.00 m |
The batch insertion
CAPCAD_BATCH_RESTRAINT draws a whole road's worth of restraint from a pasted table. It is the natural destination of the stretch table the restraint analysis produces, which can open this form with the table and the columns already filled in.

The batch form: the text area on the left takes the table, and the lists on the right say which column is what.
Each line of the text area is a stretch. The columns are separated by tabs — pasting straight from Excel already gives you that — and each list on the right names the column letter (A, B, C…) that datum comes from. A line with no tab at all is silently ignored.
The command uses the project's alignment (it asks for no selection) unless Straight line (103) is ticked. Each stretch is resolved by the same chain as the interactive form, and the body plus the two terminal blocks go to the action's layer (DEFENSA_IMP, DEFENSA_MAN, DEFENSA_REM or DEFENSA_SUB). In Km mode each station is found on the alignment's reference line and moved onto the carriageway on the side given by the offset's sign.
The controls
| # | Control | What it does |
|---|---|---|
| 96 | Paste form clipboard | Brings the clipboard text in, reports how many lines arrived and saves the text area. It appends the literal " linhas inseridas" to the end of the pasted text; the extra line has no tab and is therefore ignored. |
| 97 | To Excel | Sends the text area to Excel as a table. With no data, it warns. |
| 98 | Offset | The offset column. The sign gives the side: positive = increasing (right), negative = decreasing (left). The absolute value is the distance from the alignment. |
| 99 | Action | Either one of the four fixed actions of the list, or a column letter, in which case the action comes from each line. In the column, any text containing imp, man, rem or sub is accepted. |
| 100 | See the accepted values | Shows the list of words accepted in the action column. |
| 101 | text area | The table. The counter below shows how many lines there are. On running, the content is saved in the exports folder and reloaded next time the form opens. |
| 102 | Coordinates | Each line carries the coordinates of the two ends, in columns 104 to 107. |
| 103 | Straight line | Coordinates mode only: the stretch is the straight segment between the two points, with no projection onto the alignment, no parallel and no length rounding. Of the offset, only the sign survives, giving the side. In this mode the project's alignment is optional. |
| 104 to 107 | Lat i / Long i / Lat f / Long f | The columns of the two ends. The labels change to Y and X when E, N (109) is chosen. |
| 108 | LAT, LON | The values are geographic and are converted into the project's coordinate system. |
| 109 | E, N | The values are already in the drawing's system. |
| 110 | Km (in metres) | Each line carries the start and end station, in columns 111 and 112. Despite the "Km" label, the values are read in metres. |
| 111, 112 | Km i, Km f | The columns of the two stations. |
| 113 | Insert items | Runs the batch. The form hides while it runs. At the end it shows, when there is one, the block report, the interruption message and the list of per-line errors. |
| 114 | Test points | Resolves the lines without drawing any restraint and marks the two ends of each stretch on the point-test layer, offering to frame the view on them. It is the way to check the table before drawing. |
| 155 | Reset | In AutoCAD, a link to the right of Test points: erases what the last Insert items or Test points drew. |
| 115 | Insert mark | Inserts each stretch's two informative labels. |
| 116 | Add | Adds an attribute/column pair to list 126: first the column letter, then the attribute name. Each pair is written into both terminal blocks of that line. |
| 117 | System | Both terminal blocks are CapCad's default block. Only in this mode are the Terminal type lists (125 and 128) enabled. |
| 118 | Custom | Fixed names, typed in 119 and 120, the same for every line. |
| 119, 120 | Entry, Exit | The fixed names. Defaults TERM_ENTRADA and TERM_SAIDA. |
| 121 | Column | The block names come from table columns, given in 122 and 123. Before drawing, the command checks line by line whether each block exists and stops with a report if any is missing. |
| 122, 123 | Entry, Exit (column) | The columns of the block names. |
| 124 | Folder… | Opens the project's block library folder in Explorer. |
| 125, 128 | Entry, Exit (terminal type) | Columns carrying the terminal abbreviation, written into the block's attribute. Enabled only in System mode. |
| 126 | attribute list | Attribute → column pairs applied to each line's terminal blocks. |
| 127 | Del | Removes the selected pair from the list. |
| 129 | See the accepted values | Shows the glossary of terminal abbreviations. |
| 130 | Sample km | Fills the text area with seven sample lines in km mode, sets the matching columns and highlights the lists used in light blue. |
| 131 | Sample coordinates | The same for Coordinates mode, with geographic coordinates. |
| 132 | Tutorial | Opens the tutorial video in the browser in a Portuguese interface; in other languages it shows Coming soon. |
An empty column list means column A. The letters are upper case: a lower-case letter points at no column and the cell is simply not found.
What interrupts a batch
Three situations stop the whole run (the lines already drawn stay): in Coordinates mode, a coordinate column past the end of the line; in Km mode, both station columns past the end of the line; and, also in Km mode, only one of them past the end. Single-line errors — a point that does not project onto the alignment, two coincident points, an offset that fails — are listed in the final report and the batch carries on.
Remembered between sessions
The Road restraint form remembers all its options — every method, object, action, box, list and tab setting — and comes back as you left it, always on the Main tab. Select alignment (15) is the exception: it follows whether the drawing has a project alignment. The attribute grid (134), the label chosen in list 34 and the last Start and End terminals of System and of Blocks (each its own) are remembered as well.
A fresh form starts on: 2 points, Guardrail, Single, Increasing, Insert, offset detected from the point (fixed value 8), terminals on with Blocks (System on the Brazilian profile), neither overlap option chosen, reference km direction, metres, rounding to multiples of 4 on, invisible attributes on, labels Insert with term geo km.
The batch form stores: the terminal-type columns (125, 128), the four coordinate columns (104 to 107), the two station columns (111, 112), the Km / Coordinates choice (110, 102), the LAT, LON / E, N choice (108, 109), Straight line (103), the terminal block mode (117, 118, 121), the two fixed names (119, 120), the two block columns (122, 123) and the attribute list (126). The Offset (98) and Action (99) columns are written but not read back on opening. The text area is restored from the exports folder.
Notes
- Choose the overlap first. A fresh form has neither Yes (41) nor No (42) ticked, and Insert does not run until one of them is.
- The 24 m pull-back needs box 136. No (42) alone turns the blocks outwards but keeps the whole body; tick Referência ponto clicado: terminal (136) to shorten it for the terminals.
- The command-line prompts Ponto inicial and Ponto extensão, the refusals and the summary of a run are written in Portuguese in every language.
- The km methods refuse the value zero, so a stretch starting exactly at km 0+000 cannot be typed. Use 2 points in that case.
- The km + length method mixes two station readings. The start point is looked up by the raw measure along the alignment, but the end is computed from the normalised station. On an alignment starting at km 0 with no station equations the two coincide; on any other alignment, the end of the stretch may come out displaced. Check the result when the alignment's start km is not zero.
- In the batch, the terminal types come out crossed and the station is the higher end's. The entry block, at the lower station, gets the value of the Exit terminal-type column (128) and the exit block the Entry one (125);
DEF_KMandKMof both blocks are read at the higher-station end.