BuildingSession.
Import
Example
Notes
- Start the geometry kernel first.
- The
rootof the result is already a child of the parent that you give. elementsByIdgives the element for an id in the model.sourceByLiveIdgives the model id for a live element.- Read
warningsafter the build. - A door, a window or a hole that does not fit on its wall at its saved
offsetis drawn there without a hole. The build does not change the model. It gives the warningopening-does-not-fit: itsopeningFitgives the offsets where the opening fits and the nearest one. Move the opening to such an offset to remove the warning. - A placed block whose asset has no plan symbol (no
profileViewelement) draws its footprint in plans. The build gives the warningno-plan-symbolwith the block’s asset key and element id. - Call
disposeBuildResultwhen you replace or remove the build. - Give the content of external assets in
assetSources. The function does not download them.
Signature
Parameters
Returns
disposeBuildResult
Release a completed build after replacing it or closing its owner.BmBuildError
BlockPrototypes
The evaluated model bodies of.op blocks, built once per block content and shared by every placed copy as kernel instances.
checkBuildingClashes
The model’s clashes, a model check run on demand: building and editing never run it, so call it when the clashes are wanted, with a model and a build of exactly that model (aBuildingSession’s snapshot() and currentBuild).
Types
BuildOptions
.op sources for the document’s external-op assets, keyed by their uri, as either a raw
buffer or an already-parsed definition. Fetching is the CALLER’s pre-step so this function stays
synchronous — the same split .opbase uses (OPBaseOptions.assetSources). An embedded-op asset
needs nothing here.The colour of a mass part by its use,
#rrggbb by use name, used for a part when neither it nor
its mass has a color. Replaces MASS_COLORS_BY_USE whole; a use it does not list takes
#a0b8c8. Pass it where the project is opened (ProjectManager build) so that the live build,
the plan drawings and the sheets take the same colours.Share evaluated asset prototypes across builds. Default: one registry per build, released with its
result.
Called after each element of the build and after the final flush, with its cost in
elapsedMs. A
build is synchronous: show the reports after it, or log them.BuildResult
One group per build, already added to the parent, at identity — elements are in world coordinates.
BuildingModel id -> live element, so a caller can edit without re-parsing the document.
Saved basic geometry, kept separate from BIM elements and their exporter contract.
Live element ID -> authored BuildingModel identity and feature.
Project/site/building/storey ownership context for model readers.
The evaluated asset prototypes the placed blocks share; held until the result is disposed.
PrototypeBody
BuildProgress
One element built (or the final placement flush) of a building model build.Milliseconds since the previous report (or the start of the build): the cost of this step.