Commands  ›   ›  Create Section From Gridline

Create Section From Gridline

writes to model Public API · not yet exposed

Coming soon

Before you run this

, , , , // 2. Added attributes: [Keywords], [SelectionInput], [Output] // 3. Added ONE LINE at top of Execute(): using var tracker = CommandTracker.Track(this); // // That's it! Everything else stays the same. using System; using Autodesk.Revit.Attributes; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; using Adelphos.Revit.Tracking; using Nice3point.Revit.Toolkit.External; namespace Adelphos.Revit.SheetSetup.Commands { Phase 7 Command: Creates a section view along a selected gridline. User selects TWO inputs: 1. Gridline (from host or linked model) 2. Room (from host or linked model) Uses grid-room boundary intersection for section bounds. Scale: 1:50 Active document must be open. User must have access to select elements. At least one grid and one room must exist in the model (host or linked).

After it runs

, , , // 2. Added attributes: [Keywords], [SelectionInput], [Output] // 3. Added ONE LINE at top of Execute(): using var tracker = CommandTracker.Track(this); // // That's it! Everything else stays the same. using System; using Autodesk.Revit.Attributes; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; using Adelphos.Revit.Tracking; using Nice3point.Revit.Toolkit.External; namespace Adelphos.Revit.SheetSetup.Commands { Phase 7 Command: Creates a section view along a selected gridline. User selects TWO inputs: 1. Gridline (from host or linked model) 2. Room (from host or linked model) Uses grid-room boundary intersection for section bounds. Scale: 1:50 Active document must be open. User must have access to select elements. At least one grid and one room must exist in the model (host or linked). A new ViewSection is created in the document, oriented along the selected gridline. Section bounds are clipped to the room boundary intersection. Section is NOT placed on a sheet (separate command).

When to use this

Don't use this when

, // 2. Added attributes: [Keywords], [SelectionInput], [Output] // 3. Added ONE LINE at top of Execute(): using var tracker = CommandTracker.Track(this); // // That's it! Everything else stays the same. using System; using Autodesk.Revit.Attributes; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; using Adelphos.Revit.Tracking; using Nice3point.Revit.Toolkit.External; namespace Adelphos.Revit.SheetSetup.Commands { Phase 7 Command: Creates a section view along a selected gridline. User selects TWO inputs: 1. Gridline (from host or linked model) 2. Room (from host or linked model) Uses grid-room boundary intersection for section bounds. Scale: 1:50 Active document must be open. User must have access to select elements. At least one grid and one room must exist in the model (host or linked). A new ViewSection is created in the document, oriented along the selected gridline. Section bounds are clipped to the room boundary intersection. Section is NOT placed on a sheet (separate command). User wants to create a section view showing MEP services along a specific grid line. User needs to see building cross-section at a particular grid location. User wants section through a room at a grid intersection. Creating sections through corridors (use CreateSectionForCorridorCommand instead). Creating arbitrary sections not aligned to grids. Creating plan views or 3D views.

Side effects

Debug detail lines may be drawn on active view (for development).

Inputs

NameKindTypeRequiredDefaultDescription
Grid selection Grid yes Gridline to create section along
"Select a gridline"
Room selection Room yes Room to determine section bounds
"Select a room"
Scale config int no 50 View scale for the section

Returns

NameTypeDescription
CreatedSectionViewSectionThe created section view

Decision flow

check: currentSelection.hasGrid → useSelectedGrid
check: visibleGrids.count == 1 → autoSelectGrid
check: currentSelection.hasRoom → useSelectedRoom
check: visibleRooms.count == 1 → autoSelectRoom
check: visibleRooms.count > 1 → ask "Which room?"
resolve: room.isCorridor → CreateSectionForCorridorCommand, else → this

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/create_section_from_gridline
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

grid section · section along grid · gridline section · room section
Patterns: create * section * grid · section * along * grid · grid * section

Related commandsCreateSectionForCorridorCommand · PlaceViewOnSheetCommand
Pillar