docs: document legacy and Plant 3D 2026 viewport mapping APIs
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Ortho viewport membership API
|
||||
|
||||
## Scope
|
||||
|
||||
This report records the Plant 3D 2026 contract used to map source-model
|
||||
DataLinks objects to one Ortho view. Autodesk binaries were inspected in
|
||||
`<PLANT3D_2026_INSTALL>` and are not part of this repository.
|
||||
|
||||
## Confirmed Plant 3D 2026 contract
|
||||
|
||||
| Assembly | Version | Type/member | Purpose |
|
||||
| --- | --- | --- | --- |
|
||||
| `PnPDwg2dDef` | `0.0.0.0` | `IDwgViewDef.DwgQuery` | Returns the query stored by an Ortho view. |
|
||||
| `PnPDwg2dDef` | `0.0.0.0` | `DwgQueryByBox.Execute(StringCollection, StringCollection)` | Executes the stored view selection and returns `IDwgSet`. |
|
||||
| `PnPDwg2dDef` | `0.0.0.0` | `IDwgSet.GetItem(int, ref MdObjectId)` | Enumerates selected source identities. |
|
||||
| `PnPDwg2dUtil` | `0.0.0.0` | `MdObjectId.PrjObjectId` | Exposes the selected project object identity. |
|
||||
| `PnPDataLinks` | `17.0.60.1` | `DataLinksManager.FindAcPpRowId(PpObjectId)` | Maps a selected project object to its DataLinks row. |
|
||||
|
||||
`DwgQueryByBox` also exposes `CoordinateSystem`, `XLength`, `YLength`,
|
||||
`ZLength`, and `SelectionMask`. `DwgViewDef` exposes orientation, clipping,
|
||||
and layout fields. They are not used as a heuristic in this slice because the
|
||||
query result provides a stronger project-object identity.
|
||||
|
||||
## Selected implementation
|
||||
|
||||
`PlantViewportMembershipReader.Read` locates exactly one view by the stable
|
||||
ID already generated from the sheet GUID and view name. It executes that
|
||||
view's stored `DwgQuery`, converts every returned `MdObjectId.PrjObjectId`
|
||||
through `DataLinksManager.FindAcPpRowId`, and intersects the result with the
|
||||
source drawing's Piping rows.
|
||||
|
||||
Matching rows receive `Resolved` with
|
||||
`VIEW_MEMBERSHIP_FROM_CONFIRMED_PNP_ID`. Source rows absent from the confirmed
|
||||
query result receive `ObjectOutsideView` with
|
||||
`VIEW_MEMBERSHIP_OBJECT_OUTSIDE_CLIP`. An unsupported or ambiguous runtime
|
||||
contract stays `NotResolved` with `VIEW_MEMBERSHIP_API_UNSUPPORTED`; the code
|
||||
does not guess alternate Autodesk properties or select an arbitrary view.
|
||||
|
||||
## Legacy analysis
|
||||
|
||||
The read-only legacy source at
|
||||
`\\phpsrv03\NBIM\code\CS\P_Rec_Annot\v1.0.4\repo` was available. Its
|
||||
`UpdateOrthoDrawings/Commands.cs` configured `DwgQuery.ModelFiles` and called
|
||||
`DwgQuery.Execute`; `OrthoAutoAnnotate/Commands.cs` and
|
||||
`AutoAnnotateView/ViewPorts.cs` also used viewport and entity extents. Those
|
||||
extents checks are a geometric filter, not an authoritative object identity,
|
||||
so they were not ported as `Resolved` membership.
|
||||
|
||||
## Side effects and failure handling
|
||||
|
||||
The reader opens no Autodesk write transaction and calls no persistence API.
|
||||
It does not modify DWG, DCF, or project metadata. `DLException` while mapping
|
||||
an individual generated identity is ignored only for that non-Piping identity;
|
||||
other failures yield the stable API diagnostic and preserve no false positive.
|
||||
Runtime DryRun and paired control/DryRun hash comparison remain required to
|
||||
verify actual no-write behavior.
|
||||
Reference in New Issue
Block a user