Create Section From Gridline
Coming soon
, , , , // 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).
, , , // 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
- , , // 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.
, // 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.
Debug detail lines may be drawn on active view (for development).
Inputs
| Name | Kind | Type | Required | Default | Description |
|---|---|---|---|---|---|
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
| Name | Type | Description |
|---|---|---|
CreatedSection | ViewSection | The 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
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
| Related commands | CreateSectionForCorridorCommand · PlaceViewOnSheetCommand |
|---|---|
| Pillar |