Import
Example
Notes
- Both functions take a
BuildingEditCommand.applyBuildingEditResolvedtakes eachkind.applyBuildingEditrejects some wall and opening commands, such ascreate-wallandadd-hosted-opening, with the coderesolved-edit-required. add-element,replace-elementandremove-elementchange one entry of a list of a storey:slabs,roofs,spaces,stairs,columns,beams,railingsorinstances.add-elementrejects an id that the list has.replace-elementandremove-elementreject an id that the list does not have. The new element ofreplace-elementmust have the same id.add-asset,replace-assetandremove-assetchange one asset of the model.add-assetrejects an id that exists.replace-assetandremove-assetreject an id that does not exist.remove-assetrejects an asset that an instance uses.add-storey,remove-storeyandreplace-storey-settingschange the storeys of one building.add-storeyrejects a storey id that the building has.remove-storeyrejects the last storey of a building.replace-storey-settingsreplaces thename, theelevation, theheight, theusageand theareaKindtogether. TheareaKindis what the plate of the storey counts as (gross,balcony,core,basement,parkingormechanical); a value that is not one of these is refused asinvalid-command.replace-masssets the mass of one building and the settings of all its storeys. A storey id that stays keeps its elements, a new id adds an empty storey, and a storey that is left out is removed. It rejects the removal of a storey that holds an element.massSegmentHeightCommand(model, buildingId, segmentId, height)gives this command for a new height of one segment.add-buildingadds a whole building, last in the list: its storeys, their elements and its optionalmass. Each id in it must be new in the whole model. The smallest valid building has one storey, and for a massing study amasswith one segment whosestoreyIdsnames that storey and whoseheightis the height of the storey.remove-buildingremoves a building and all it holds; it rejects the last building of the model.replace-sitereplaces the site whole:boundary,lotLines,elevation,geoAnchor,trueNorthDegand thezoningrules. Withoutsite, the model has no site any more. The model check refuses a self-intersecting boundary and alotLineslist that does not have one class per boundary edge. RunevaluateZoningagain after the step; the command does not run it.- A
batchapplies itscommandsin order and returns one model. If one command fails, the error has the code of that command, and its message starts with the place of the command, such ascommand 2 of 3:. A batch cannot be empty and cannot hold a batch. - A rejected command throws
BmEditError. The model that you gave is not changed. - The functions check the full result. For an edit in an app, use a
BuildingSession. It also builds the geometry and keeps undo and redo.
applyBuildingEdit
Apply one saved edit of a building model, or one batch of edits, and return a validated new model.applyBuildingEditResolved
Apply an immutable edit with exact junction-aware hosted-opening decisions.massSegmentHeightCommand
Thereplace-mass command that gives one segment of a saved mass the height height, snapped to whole storeys at the pitch of its top storey; undefined when the snapped height is the saved one.
BmEditError
A rejected edit;issues carries model-validation details when available.
Types
BmEditErrorCode
Stable category for a rejected building edit.ReplaceMassCommand
Replace the mass of a building and the settings of its whole storey list in one step.MassStoreySettings
The settings of one storey in areplace-mass command; its elements are not part of it.
string
required
string
number
required
World Y of the floor of the storey, in metres.
number
required
Floor-to-floor height in metres.
string
AreaKind
What the plate of the storey counts as; see
BmStorey.areaKind.