Skip to content
BadBit Documentation
Sign in Download the beta

Grid and units

Grid (F7)

The grid is on when the program opens, as in AutoCAD, and F7 turns it off and on. It sits beneath the drawing, with a heavier line every five lines and the X and Y axes tinted. The grid is adaptive, as in AutoCAD: when you zoom out, the spacing grows five times so that it never turns into a blur; when you zoom in and the lines get too far apart, lines five times closer appear between them (from 1 m they go to 0.2 m, then 0.04 m). The GRIDUNIT lines stay in the grid at any zoom. Grid snap (F9) does not change with zoom: it follows SNAPUNIT.

Grid
The grid turned on.

The spacing is the GRIDUNIT variable, in the project's unit. The default follows the unit as long as it has not been chosen: 1 m in a project in meters, 10 cm in centimeters, 10 mm in millimeters. Once chosen by hand, the value stays even when the unit changes.

Grid snap (F9)

With grid snap on (F9, or the icon on the status bar), the cursor crosshair moves from grid point to grid point while the command asks for a point: clicks fall exactly on the grid. The step is the SNAPUNIT variable; as long as it has not been chosen, it is the same as the grid (GRIDUNIT). Near an object, object snap still applies, as in AutoCAD. For selecting objects, the cursor is free.

Grid snap
With F9, the line goes from point (1, 1) to the grid point (5, 2), even with the mouse slightly off it.

Drawing units (UNITS, alias UN)

Units dialog box
The units dialog box of a drawing made in BadBit CAD.

The dialog box chooses a ready-made set (SI, Brazil – structures, Brazil – architecture and MEP, Detailing in millimeters, US imperial), the length unit and the decimal places, and, like AutoCAD's:

  • Length: the type (scientific 1.5500E+01, decimal 15.50, engineering 1'-3.50", architectural 1'-3 1/2", fractional 15 1/2; in engineering and architectural the number is read in inches) and the precision (the decimal places, or the fraction from 1/2 to 1/256).
  • Angle: the type (decimal degrees, degrees/minutes/seconds 45°30'15", grads 50g, radians 0.7854r, surveyor's units N 45°30'15" E) and the precision (in degrees/minutes/seconds: 0 degrees only, 1–2 minutes, 3–4 seconds, 5 to 8 seconds with decimal places).
  • Zero direction (east, north, west or south, ANGBASE) and Clockwise (ANGDIR): they apply to angles typed in polar coordinates (@10<45) and to displayed directions. With zero to the north and clockwise, angles are azimuths. Typed angles accept the marks of any type: 45d30'15", 45°30', 50g, 0.78r and the bearings N45d30'E.

In a drawing made in BadBit CAD, coordinates are stored internally in meters: the unit changes what you type (without a unit, 250 in a project in centimeters is 2.5 m), what you see in the coordinates and the default grid.

The drawing unit that came from a DXF or DWG

Units dialog box of a drawing opened from a DXF
A UTM survey opened from a DXF in meters, with angles in degrees/minutes/seconds.

A drawing opened from a DXF or DWG keeps exactly the file's numbers (not even the last digit changes) and uses its unit and formats (INSUNITS, LUNITS, LUPREC, AUNITS, AUPREC, ANGBASE, ANGDIR): the dialog box shows Drawing unit (from the file). Changing that unit does not convert the numbers, it only says what they measure (like AutoCAD's INSUNITS); the displayed unit can be a different one (the conversion is only on screen). Each tab has its own unit: a drawing in millimeters and another in meters opened side by side each show their own.

Status bar with the unit
The status bar with the drawing's "m" next to the UTM coordinates.

The status bar shows the drawing's unit next to the coordinates ("unitless" in a drawing without a unit).

Keeping or converting the file's unit

Keep or convert the unit
A DXF in millimeters: Keep (the default) or Convert to meters.

When you open a DXF or DWG in a unit other than the meter (millimeters, centimeters, inches, feet...), the Drawing unit dialog box asks:

  • Keep <unit> (the main button, the default; also Esc and closing the window): the numbers stay as in the file and the drawing works in its unit. Saving back to DXF or DWG writes the same numbers.
  • Convert to meters (m): the whole drawing is multiplied by the factor (0.001 from mm to m): model coordinates, blocks and references, dimensions (with the style sizes and overrides), texts, hatches (with the pattern scale), multileaders, tables, text, dimension, multileader and table styles, linetypes and the model side of viewports (the paper stays the same size). External references stay in their own files, with the factor in the reference's scale. It is a single undo step: U (or Ctrl+Z) brings back the file's numbers and unit together. Converting a large drawing is done in parallel.
  • Remember the choice for this file stores the answer in the profile (next time the file opens directly, as stated on the command line).

With FILEDIA 0 there is no prompt: the drawing stays in the file's unit and the command line says so.

Scale list: SCALELISTEDIT and -SCALELISTEDIT

Edit Scale List
The Edit Scale List dialog box with the default metric list.

SCALELISTEDIT opens the drawing's Edit Scale List dialog box, like AutoCAD's: Add… and Edit… (the name, the paper units and the drawing units; 1:50 is 1 paper unit to 50 drawing units), Move Up, Move Down, Delete (the last one stays), Reset (back to the default list) and Save to profile (the list becomes the default for new drawings and for Reset). OK saves the list in the drawing; Cancel undoes what was changed in the dialog box.

-SCALELISTEDIT does the same from the command line, with AutoCAD's options: [? (?)/Add (A)/Delete (D)/Reset (R)/Exit (E)] <Add>. ? lists the scales; A asks for the name and the ratio (1:50, 1=50, 2:1 or the imperial ones 1/4" = 1'-0"); D asks for the name; R asks [Yes (Y)/No (N)] <No>.

The list belongs to the drawing (it goes in the .bbd). A new drawing starts with the profile's list or, without it, with AutoCAD's metric list (1:1 to 1:1000, 2:1 to 100:1, with 1:25, 1:75, 1:200, 1:250 and 1:500 from Brazilian floor plans) or the imperial one (1/128" = 1'-0" to 1-1/2" = 1'-0") depending on whether the drawing is metric or imperial (MEASUREMENT). It appears in the annotation scale list and in the viewport scale list of the status bar and in the Plot dialog box.

Changing the list (the dialog box's OK, or each Add, Delete and Reset of -SCALELISTEDIT) is an undo step with the command's name and leaves the drawing modified (the asterisk on the tab and the save prompt on closing): U brings back the previous list, REDO puts it back again.

Scales are true ratios, in any unit: 1:100 is one hundredth of the real size. In a drawing in mm, a viewport at 1:100 shows 100,000 mm of the model per meter of paper; in one in meters, 100 m. ZOOM nXP inside the viewport (1/100XP) sets the viewport to 1:100 in the drawing's unit, and a new MVIEW viewport in an empty drawing starts at 1:100.

Scales of annotative objects: OBJECTSCALE and -OBJECTSCALE

The Annotation Object Scale dialog box
OBJECTSCALE with two annotative texts chosen: 1:100 for one and 1:50 for the other.

OBJECTSCALE adds and removes annotation scales on annotative objects (texts, multiline texts, dimensions, multileaders and tolerances), like AutoCAD's. With no selection, it asks Select objects: (those that are not annotative are left out; the command line says how many annotative ones were included) and opens the Annotation Object Scale dialog box:

  • the object's scale list, with the name and the paper and drawing units (1 = 100);
  • List all scales for selected objects or List scales common to all selected objects only;
  • Add… opens the Add Scales to Object dialog box with the drawing's scale list (the one from SCALELISTEDIT): check one or more and click OK;
  • Delete removes the selected scale (the object always keeps at least one).
Add Scales to Object
The Add Scales to Object dialog box, on top: the drawing's scales, each with a check box.

OK applies everything in a single undo step; Cancel changes nothing. An object that gains the current scale (CANNOSCALE) starts appearing at it; one that loses the scale at which it was appearing starts appearing at the current one, if it supports it, or at the first one left.

-OBJECTSCALE does the same from the command line, with AutoCAD's options: Enter an option [Add (A)/Delete (D)/? (?)] <Add>:. A asks Enter named scale to add or [? (?)] <1:100>: (the name in the list or a ratio such as 1:30); each scale typed is added immediately and the prompt comes back, until Enter (Enter right away adds the current scale). D does the same to remove, and ? lists the objects' scales and those common to all.

ANNOALLVISIBLE controls whether annotative objects that do not support the current scale are displayed: 1 (the default) shows all of them (each at the scale it is at); 0 shows only those that support CANNOSCALE, and the others also cannot be selected or snapped to. Changing the annotation scale with 0 changes which ones are displayed. In a layout, each viewport shows annotative objects at its own scale (the one on the status bar inside the viewport), as AutoCAD does — and the plot comes out the same. The variable belongs to the drawing, as in AutoCAD: it goes in the .bbd and in DXF and DWG (2007 onward), is recorded in undo and leaves the drawing modified. A positive ANNOAUTOSCALE still adds the new scale to all annotative objects when CANNOSCALE changes.

ANNOALLVISIBLE 0 in the viewports
ANNOALLVISIBLE 0: the viewport on the left, at 1:100, shows only "SALA 1:100"; the one on the right, at 1:50, only "SALA 1:50".

The dynamic input angle

The angle that dynamic input (F12) shows next to the cursor follows the drawing: it is measured from the zero direction (ANGBASE), in the ANGDIR direction, on the shorter side, in the AUNITS format with AUPREC decimal places (decimal degrees, 45°30'00", 50g, 0.7854r; in surveyor's units, the bearing N 30°00' W). An angle typed in the angle field (after Tab) is read like the one in @10<45, in the same format and from the same base.

An external reference in another unit comes in scaled by the factor between the units, and its file's unit is stored in the drawing: if the reference's file changes to another unit (from mm to cm, for example), reloading the reference, even after saving, closing and reopening the drawing, multiplies the scale of its references by the ratio between the new factor and the old one (0.001 → 0.01). Converting the drawing to another unit does not disturb the calculation.

The INSUNITSDEFSOURCE and INSUNITSDEFTARGET variables (stored in the profile, as in AutoCAD's registry; the INSUNITS code, 6 = meters by default) set the unit of an incoming unitless file (INSERT, XREF or opened with FILEDIA 0) and that of the unitless drawing that receives it.

Search the documentation