AutoCAD – Drawings

The BOUNDARY command in AutoCAD: close an area with one click — islands, overlaps, and how big a gap breaks it

The BOUNDARY command in AutoCAD (alias BO) makes a closed polyline or region from an area in one click. Islands give two boundaries; a 100-unit gap finds none.

  • TS. Đỗ Quốc Hoàng
  • 8 min read
Four cases of the BOUNDARY command: four loose lines, an area with an island, the overlap of two circles, and a gap Photo: Diagram by the Institute of Information Technology in Civil Engineering

Floor plans are usually drawn line by line: walls as segments, rounded corners as arcs, doors as gaps. To get the floor area of a room, hatch one zone, or take an outline for a 3D solid, you need one closed shape. The boundary command in AutoCAD does that with one click: pick inside the area and AutoCAD finds the surrounding lines and draws a closed polyline.

This article tries BOUNDARY in AutoCAD 2027 with the acadiso.dwt template, through the command-line form -BOUNDARY so every prompt can be quoted. Each boundary's area is read back from the object. For drafting and quantity work taught properly, the Institute runs an AutoCAD course for construction.

The BO command in AutoCAD is BOUNDARY

RouteWhere
Type BOUNDARY, or aliases BO, BPOLYCommand line; -BOUNDARY skips the dialog
RibbonHome → Draw → Hatch drop-down → Boundary
MenuDraw → Boundary

Locations and aliases come from the 2027 acad.cuix and acad.pgp files, so the bo command in AutoCAD is simply this command. Rounding corners is FILLET, covered in fillet in AutoCAD. The Autodesk documentation on BOUNDARY explains that the interior point you specify uses the surrounding and interior objects to create closed polylines or regions.

Step by step with -BOUNDARY

StepThe promptWhat you do
1Specify internal point or [Advanced options]:Pick a point inside the area
2AutoCAD reports Selecting everything..., Analyzing the selected data..., Analyzing internal islands...Wait
3Specify internal point or [Advanced options]:Pick another area, or Enter to finish

At the end the command line reports what was made, for example BOUNDARY created 1 polyline.

Four loose lines forming a 4000 × 3000 rectangle: pick in the middle and AutoCAD creates one closed polyline of 12 000 000, exactly 4000 × 3000. That is the quickest way to get a closed polyline from lines. The four original lines remain: the object count goes from 4 to 5. The new polyline lies exactly on the old lines, so select it with L (Last) straight after the command, or keep it on its own layer.

Areas with islands: island detection on or off

A rectangle with a circle of radius 500 inside; pick between the two. The result depends on island detection:

Island detectionResult
On (default)BOUNDARY created 2 polylines: the outer boundary, 12 000 000, and the circle as a polyline, 785 398
Off1 polyline, the outer boundary only, 12 000 000

The real area between the two shapes is 12 000 000 − 785 398. With islands on, AutoCAD hands you both boundaries to subtract; calculating areas in AutoCAD covers adding and subtracting areas.

Turning islands off at the command line takes three answers: A (Advanced options), I (Island detection), N. AutoCAD then also asks Enter type of ray casting [Nearest/+X/-X/+Y/-Y/Angle] <+X>:; press Enter for the default. Turn it back on with A, I, Y.

The overlap of two shapes

BOUNDARY does not need the area to exist as a shape. Two circles of radius 1000, centres 1000 apart, overlap. Pick inside the overlap and AutoCAD creates one lens-shaped polyline of 1 228 370.

By hand, the overlap of two equal circles is 2 × 1000² × arccos(0.5) − 500 × √(4 × 1000² − 1000²) = 2 094 395 − 866 025 = 1 228 370, exact to the unit. It is the fastest way to get areas nobody drew separately: the yard between two buildings, the floor between two cores, the part of a plot inside a setback line. Drawing that lens by hand would take two trims and a join; BOUNDARY gives it in one pick and leaves both circles untouched for later use.

Polyline or region

The default output is a polyline. Through A (Advanced options), O (Object type), AutoCAD asks Enter type of boundary object [Region/Polyline] <Polyline>:. Choose R, pick inside the 4000 × 3000 rectangle, and the command line reports 1 loop extracted., 1 Region created.; the new object is a Region of 12 000 000.

TypeUse it for
PolylineEditing vertices, perimeter, EXTRUDE, hatch boundaries
RegionAdding and subtracting areas, section properties with MASSPROP

Regions have their own article: the region command in AutoCAD. To go back to polylines, take the same route and choose P.

Valid hatch boundary not found: gaps

Pick inside an area that is not closed, or outside every shape, and AutoCAD says:

Valid hatch boundary not found.

The message mentions hatch; it is the same message the HATCH command gives when it cannot find a closed area. A rectangle with one corner left open:

Gap at the cornerResult
1 unitStill makes the 12 000 000 polyline, at both a wide and a close zoom
100 unitsValid hatch boundary not found.
100 units with HPGAPTOL set to 150Still Valid hatch boundary not found.

Very small gaps are ignored, a 100-unit gap is not, and HPGAPTOL did not rescue BOUNDARY here. The cure is to close the gap: snap the lines to each other's endpoints with object snaps, or extend them until they meet. Finding gaps is covered in detail in when hatch will not work.

Room areas with BOUNDARY

The commonest use. Walls drawn as loose lines, floor area needed for each room:

  1. Create a layer such as ROOM-AREA and make it current. The boundaries BOUNDARY creates go on the current layer, not the layer of the original lines: a rectangle on layer 0 gives a boundary on the current layer.
  2. Type BO, pick inside each room in turn, Enter when done. Each room becomes a closed polyline.
  3. A room with a column or shaft in the middle also gets an island boundary; the net floor area is the outer boundary minus the island.
  4. Select a polyline and read its area, or use an area command.
  5. Any room that reports Valid hatch boundary not found. has a gap in a wall or at a door: close it and pick again.

Step 5 has a side benefit: BOUNDARY is the fastest way to find loose joints on a large plan before they spoil hatching or quantities later. A room that refuses to close is a room whose walls do not really meet, and it is far cheaper to learn that now than from a hatch that refuses to fill on the day of submission.

Summary of results

CaseAutoCAD saysCreates
Four loose lines, 4000 × 3000BOUNDARY created 1 polylinePolyline 12 000 000, old lines kept
Island, detection onBOUNDARY created 2 polylinesOuter boundary and island boundary
Island, detection offBOUNDARY created 1 polylineOuter boundary only
Overlap of two circlesBOUNDARY created 1 polylineLens 1 228 370
Object type Region1 Region created.Region 12 000 000
100-unit gap, or pick outsideValid hatch boundary not found.Nothing

Every area in the table matches the hand calculation to the unit, which makes BOUNDARY a dependable way to measure irregular zones: the number comes from the geometry itself rather than from a person clicking corners.

One practical habit follows from the first row. Because the original lines stay, a drawing that has been run through BOUNDARY many times fills up with overlapping polylines on top of the walls. Keep all boundaries on one dedicated layer, and delete or freeze that layer before sending the drawing to others, so they do not pick a boundary thinking it is a wall.

Three things often repeated that are not true

Often repeatedWhat holds on the 2027 release
BOUNDARY joins the old lines into a polylineThe old lines remain; the polyline is an extra object
The BO command rounds cornersBO is BOUNDARY; rounding is FILLET
Raising HPGAPTOL lets BOUNDARY close gapsA 100-unit gap still fails with HPGAPTOL at 150

Frequently asked questions

What does the boundary command in AutoCAD do?

It creates a closed polyline or a region from the area you pick, even when that area is made of many loose lines.

What is BO in AutoCAD?

The alias of BOUNDARY. For rounded corners use FILLET.

Why does BOUNDARY say "Valid hatch boundary not found"?

The area has a gap, or you picked outside every shape. Close the gap with object snaps and try again.

I cannot see the new polyline. Where is it?

Exactly on top of the old lines. Select it with L straight after the command, or freeze the layer of the original lines.

Why did I get two boundaries instead of one?

The area has an island and island detection is on. Turn it off if you only need the outer boundary.

How do I get a region instead of a polyline?

-BOUNDARY, type A, O, R, Enter, then pick the area.

About the author

TS. Đỗ Quốc Hoàng — Vice Director of the Institute of Information Technology in Civil Engineering, Hanoi University of Civil Engineering, and a specialist in software development for construction