Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions docs/printing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ rvtio print project.rvt plan.svg --level 355 --scale 100
rvtio print project.rvt plan.pdf --level "Уровень 1" --scale 200 --paper A3
```

`--level` takes the element id or the exact level name (case-insensitive). Without it the level with the most walls and
columns is printed. `--scale` is the view scale denominator: 100 prints 1:100, one model metre to ten millimetres of
`--level` takes the document-local element id, the original 64-bit Revit element id (or `source:<id>` / `native:<id>`),
or the exact level name (case-insensitive). `--view` and `--sheet` accept the same local and 64-bit native ID
selectors as well as view names / sheet numbers. When an element in a Revit 2024+ file was renumbered from a wide
64-bit native ID into a distinct 32-bit document-local ID, `--list-levels`, `--list-views`, and `--list-sheets` keep the
local ID in the first column for compatibility and append `source=<id>` with the lossless decimal 64-bit Revit ID
(the same value exposed by `PlanLevel.SourceElementId`, `PlanView.SourceElementId`, `ElevationView.SourceElementId`,
`PrintableSheet.SourceElementId`, and `ComposedSheet.SourceElementId`). In `--list-views` a plan whose level was
renumbered also appends `level-source=<id>` (`PlanView.SourceLevelId`); the `level <local id>` column is unchanged.
Without `--level`, the level with the most walls and columns is printed. `--scale` is the view scale denominator: 100 prints 1:100, one model metre to ten millimetres of
paper. `--paper` takes A4, A3, A2, A1 or A0; without it the smallest landscape paper that holds the drawing at the scale
is chosen, and a drawing larger than A0 is scaled down to fit. Exit codes: 0 written, 1 usage error or an unwritable
output path (also a level or view that is not printable), 2 the file cannot be read, 3 a reader limit cut a stream, 4
Expand Down
12 changes: 6 additions & 6 deletions docs/public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ No compact JSON override is implemented.
| Type | Use |
|---|---|
| `SheetCatalog` | `Extract(document)` (or a `RevitFileInfo`) returns the sheets of the file, the viewports placed on them and the limits of this release: `Sheets`, `Viewports` and `Issues`. Nothing is read from the file again. |
| `SheetRecord` | A sheet: `ElementId`, `Number`, `Name`, `IssueDate`, `Scale`, `DrawnBy`, `DesignedBy`, `CheckedBy`, `ApprovedBy`, `ViewportIds`, `OwnedElementIds`, `Parameters` (text/whole-number project/shared params; Yes/No params read as `Yes`/`No`) and `YesNoParameters` (their names). |
| `ViewportRecord` | A placed view: `ElementId`, `SheetId` and `DetailNumber`; `DisplayedViewId` is null until the viewer element is decoded. |
| `SheetRecord` | A sheet: `ElementId`, `SourceElementId`, `OwnedElementSourceIds`, `Number`, `Name`, `IssueDate`, `Scale`, `DrawnBy`, `DesignedBy`, `CheckedBy`, `ApprovedBy`, `ViewportIds`, `OwnedElementIds`, `Parameters` (text/whole-number project/shared params; Yes/No params read as `Yes`/`No`) and `YesNoParameters` (their names). |
| `ViewportRecord` | A placed view: `ElementId`, `SourceElementId`, `SheetId`, `SourceSheetId` and `DetailNumber`; `DisplayedViewId` is null until the viewer element is decoded. |
| `SheetIssue`, `SheetIssueKind` | What this release does not decode: page size, view placement, displayed view, view content and crop region. |
| `SheetFilter` | A `--where` filter (`NAME=VALUE`, `!=`, `~`, `*`/`?` wildcards; `true`/`false`/`1`/`0` aliases apply only to Yes/No params); `SheetCatalog.FromFiltered` keeps matching sheets. |

Expand All @@ -172,16 +172,16 @@ See [sheets and viewports](sheets.md) for what is decoded, what the limits are a
|---|---|
| `PlanPrinter` | `Levels(document)` lists the printable levels. `Render(document, levelId, scale, options)` returns a `PdfDocument` with the plan of one level, including walls with their stored width, column footprints, and clipped grids. `RenderSvg(document, ...)` returns the same level plan as SVG text. `WriteSvg(document, output, ...)` writes it as UTF-8 to a stream. |
| `PlanPrintOptions` | `PaperSize` (null picks the smallest paper that holds the drawing), `MarginMillimetres`, `FallbackWallWidthMillimetres`, `DrawFrame`. |
| `PlanLevel`, `PlanView` | A printable level (id, name, elevation) and a printable plan view (id, name, level, scale). |
| `PlanLevel`, `PlanView` | A printable level (id, name, elevation) and a printable plan view (id, name, level, scale); `SourceElementId` and `PlanView.SourceLevelId` hold renumbered 64-bit Revit ids. |
| `ViewPrinter` | `Render(document, viewIds, options)` prints views into one PDF document, one page per view: a plan, an elevation or a section (`PlanPrinter.Views`, `ElevationPrinter.Views`), a 3D view (an isometric massing page) and a rendering (its image page). `OtherViews(document)` lists the 3D views and the renderings. |
| `ElevationPrinter` | `Views(document)` lists the elevations and the building sections (North, South, East, West, Section, Stair Section) with their scale; `Collect(document, direction, stairsOnly, planeView)` projects the model faces on the plane of the view when the reader decoded it (a section is cut at that plane: the geometry in front of it is removed and the crossing polygons are clipped) or on the plane of the direction taken from the name; a stair section projects the stairs alone. `DrawContent` writes them. |
| `ElevationView` | An elevation view: id, name, direction (north, south, east, west, section, iso) and scale. |
| `ElevationView` | An elevation view: id, name, direction (north, south, east, west, section, iso), scale and `SourceElementId`. |
| `SheetComposer` | `Sheets(document)` lists the numbered sheets with the page their title block spans; `Render(document, sheetId, options)` and `RenderSheets` compose pages: each placed viewport draws its plan at the stored offset and view scale, labelled with the view name and scale, and the sheet's own text notes are written. |
| `SheetComposeOptions` | `PaperSize` (null takes the title block extent, snapped to A4-A0), `DrawViewLabels`, `ViewMarginMillimetres`. |
| `ComposedSheet` | A composed sheet: id, number, name, page, placed viewport count, text count. |
| `ComposedSheet` | A composed sheet: id, number, name, page, placed viewport count, text count and `SourceElementId`. |
| `SheetPrinter` | `Sheets(document)` lists the sheets with page-sized decoded linework; `Render(document, sheetId, options)` and `RenderSheets` print one page per sheet from the lines the sheet owns, on the paper the linework spans. |
| `SheetPrintOptions` | `PaperSize` (null uses the linework extent, snapped to A4-A0), `MarginMillimetres`, `PaperToleranceMillimetres`, `DrawSheetFields`. |
| `PrintableSheet` | A printable sheet: id, number, name, linework extent, curve and text counts. |
| `PrintableSheet` | A printable sheet: id, number, name, linework extent, curve and text counts, and `SourceElementId`. |

See [printing a plan](printing.md) for what is drawn, what is not, and the roadmap to sheet printing.

Expand Down
18 changes: 17 additions & 1 deletion docs/sheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,33 @@ owner, when the stored owner is not a view, or when it is the element itself.

| Field | Source |
|---|---|
| `SheetRecord.ElementId` | document-local 32-bit element id of the sheet |
| `SheetRecord.SourceElementId` | lossless decimal string of the original 64-bit Revit element ID when the file renumbered it to fit `ElementId` (omitted from JSON when unchanged) |
| `SheetRecord.Number` | `Sheet Number` parameter (`SHEET_NUMBER`) |
| `SheetRecord.Name` | `Sheet Name` parameter (`SHEET_NAME`) |
| `SheetRecord.IssueDate` | `Sheet Issue Date` parameter (`SHEET_ISSUE_DATE`) |
| `SheetRecord.Scale` | `View Scale` parameter (`VIEW_SCALE`), the denominator of 1:N |
| `SheetRecord.DrawnBy`, `DesignedBy`, `CheckedBy`, `ApprovedBy` | the `SHEET_*` by-line parameters |
| `SheetRecord.ViewportIds` | the viewports whose sheet is this sheet |
| `SheetRecord.OwnedElementIds` | elements whose `OwnerViewId` is this sheet |
| `SheetRecord.OwnedElementSourceIds` | original 64-bit Revit element IDs, as decimal strings keyed by the local id, of the renumbered entries of `OwnedElementIds` (omitted from JSON when none was; not a CSV column) |
| `SheetRecord.Parameters` | text and whole-number project/shared parameters; `SHEET_SCHEDULED` as `Appears In Sheet List` |
| `ViewportRecord.SheetId` | the referenced sheet |
| `ViewportRecord.ElementId` | document-local 32-bit element id of the viewport |
| `ViewportRecord.SourceElementId` | lossless decimal string of the viewport's original 64-bit Revit element ID when renumbered |
| `ViewportRecord.SheetId` | the referenced sheet's document-local 32-bit element id |
| `ViewportRecord.SourceSheetId` | lossless decimal string of the referenced sheet's original 64-bit Revit element ID when renumbered |
| `ViewportRecord.DetailNumber` | `Detail Number` parameter (`VIEWPORT_DETAIL_NUMBER`) |

### Local IDs vs. 64-bit Revit element IDs

Revit 2024 and newer files can assign 64-bit element IDs that exceed 32-bit `int.MaxValue`. When `RvtIO` reads such
a file into a document-local `int` table, each wide element gets a distinct 32-bit local `ElementId` (used for internal
links such as `ViewportIds`, `OwnedElementIds`, and `ViewportRecord.SheetId`), while its original 64-bit Revit ID is
preserved in `SourceElementId` (`ViewportRecord.SourceSheetId` and, for owned elements,
`SheetRecord.OwnedElementSourceIds`) as lossless decimal text so JSON and CSV consumers never lose precision. In CSV
output (`--csv`), the last column, `SourceElementId`, holds the original 64-bit decimal ID when renumbered and is empty
when the ID was unchanged.

Sheets are ordered by number (ordinal, case-insensitive; a sheet without a number keeps document order behind the
numbered sheets) and then by element id. Viewports, viewport ids and owned element ids are ordered by id.

Expand Down
Loading
Loading