Commands  ›  General  ›  Export Zones

Export Zones

General writes to model Public API · not yet exposed

Coming soon

Before you run this

Active document must be open and saved (for export path). At least one room must exist in the model or linked models.

After it runs

JSON files created in the Revit model folder, one per level. Files named: Zones_{LevelName}.json Coordinates are in mm, relative to the selected base point.

When to use this

Don't use this when

Not for autonomous AI execution. This command requires interactive Revit UI input (dialogs, picks, or manual confirmation).

Side effects

Creates JSON files in the model folder. Does not modify any Revit elements.

Inputs

NameKindTypeRequiredDefaultDescription
BasePoint selection XYZ yes Origin point for coordinate transformation
"Pick a base point (export origin)"

Returns

NameTypeDescription
ExportedFilesList<string>Paths to exported JSON files
ZoneCountintTotal number of zones exported
LevelCountintNumber of levels exported

Decision flow

check: document.isSaved → continue, else → error (need save location)
action: promptUserToPickBasePoint → getBasePoint
action: getAllRoomsIncludingLinks → SearchInsideCurrentModel.GetAllRoomsIncludingLinks
check: rooms.count > 0 → continue, else → error (no rooms found)
loop: foreach room → create ZoneDataStorage
action: groupByLevel → ContextZones.CreateExportModelsForAllLevels
loop: foreach level → saveJsonFile
resolve: success → showSuccess, else → showError

REST API

Not yet exposed

This command does not carry a [RestApi] attribute today. Once tagged, this section will auto-populate with:

  • POST /api/v1/commands/export_zones
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

export zones · export rooms · room boundaries · zone JSON · AutoCAD zones · room export · export room boundaries
Patterns: export * zones · export * rooms * AutoCAD · export * room * boundaries · zones * JSON

Related commandsExportJSON · DrawZonesFromJSON
PillarGeneral