Chatham Building Height LSP

CBH.LSP — Chatham Building Height Grade Plane Calculator AutoLISP tool for Carlson IntelliCAD

Overview

CBH.LSP automates the calculation of the Grade Plane elevation as defined by the Town of Chatham's building height bylaw. The Grade Plane is the weighted average elevation of the finished grade at the perimeter of a building, measured within 20 feet of the structure or to the property line, whichever is closer. This tool takes a closed 3D polyline representing that perimeter offset, breaks it into consistent slope segments, and returns a weighted average elevation — the Grade Plane — along with annotated drawing output and formatted report files.

Requirements

Carlson IntelliCAD with AutoLISP support. The tool has been developed and tested in the Carlson version of IntelliCAD. DIMSCALE must be set correctly before running, as the tool reads it automatically to scale tic marks and label text. The input polyline must be closed and must carry real Z elevation values — the tool will reject flat or zero-elevation polylines.

Installation

Load the file using the APPLOAD command or add it to your IntelliCAD startup suite. On load, the command line will confirm: CBH.LSP v7 loaded. Commands: CBH CBHSET (settings). The tool defines two commands: CBH and CBHSET. Global settings persist for the duration of the IntelliCAD session and reset to defaults on restart.

Workflow

Step 1 — Establish the offset perimeter. In plan view, offset the building footprint 20 feet (or to the property line if closer). Further modifications to this line are to be made to follow the low points. This becomes the measurement perimeter.

Step 2 — Set Z values from the surface. Using Carlson's surface tools, convert the 2D offset polyline to a 3D polyline by draping it over the existing or proposed grade surface. Alternatively, this can be completed with points, objects with Z values, or manually. The resulting 3D polyline will typically be a series of short line segments. If the conversion produces arc segments, CBH will automatically polygonize them into line segments before processing.

Step 3 — Set the layer. Place the 3D polyline on any layer. CBH will read the layer from the selected entity and place all tic marks and labels on the same layer automatically.

Step 4 — Set DIMSCALE. Confirm that DIMSCALE reflects your drawing scale (e.g., 20 for a 1"=20' drawing). CBH reads this variable on startup to size all annotation.

Step 5 — Run CBH. Type CBH at the command line. The prompt will display current settings and prompt for entity selection. Click the 3D polyline to begin processing.

What CBH Does

Once the polyline is selected, CBH performs the following operations automatically:

It polygonizes any arc segments into short chord segments. It reorders the vertices starting from the northernmost point (easternmost if tied) and winds clockwise. It groups consecutive segments into legs based on slope consistency — consecutive segments whose grade difference falls within the slope tolerance are merged into a single leg. It places a perpendicular tic mark at each leg break point, sized at 1/20th of the drawing scale on each side of the polyline. It places an MTEXT label at the true midpoint of each leg, on the polyline, aligned tangent to the segment and readable from the south. Legs are labeled A, B, C and so on. It computes the weighted average elevation across all legs, weighting each leg's average elevation by its 2D length.

Output

The Grade Plane result is always printed briefly to the command line. Additional output depends on the current Output setting:

Screen prints the full leg-by-leg report table to the command line.

Text saves a plain text report as a .txt file. The report includes layer, scale, slope tolerance, a table of legs with distance, average elevation, and the distance-times-elevation product for each leg, running totals, and the final Grade Plane.

HTML saves a formatted HTML table as a .htm file, suitable for opening in Word or Excel for use as an OLE object in the drawing or for submission to the Building Department.

All produces screen output plus both file types in a single operation.

When saving files, the dialog defaults to the drawing's current folder with the name BUILDING HEIGHT. Changing the base name in the dialog changes both the .txt and .htm filenames simultaneously — they are always written as a matched pair.

Commands

CBH — Runs the calculator. Displays current Slope Tolerance and Output settings on startup. Select the closed 3D polyline to proceed.

CBHSET — Opens the settings dialog. Prompts for a new Slope Tolerance value and Output format. Settings persist for the session.

Settings

Slope Tolerance controls how aggressively consecutive segments are merged into legs. The default is 0.005 ft/ft, equivalent to a 0.5% grade change. If a polyline with many closely spaced vertices is producing too many short legs, increase this value. If meaningful grade breaks are being merged, decrease it. Reasonable working range is 0.002 to 0.02.

Output Format controls where the report is sent. Options are Screen, Text, HTML, and All. Default is All.

Notes for Chatham Practice

The 20-foot offset perimeter should reflect post-grading conditions for proposed construction, or existing conditions for existing buildings. Where the 20-foot offset falls beyond the property line, the polyline should be clipped to the property line at those locations. Points of low grade within 20 feet that are not captured by the surface drape should be added manually as vertices with appropriate Z values before running the tool — the weighted average is only as accurate as the 3D polyline input. The slope tolerance default is conservative and will produce more legs on complex grade conditions, which generally improves accuracy of the weighted average.