From 2 to 3
This page lists what changes for an application, an integration or a stored action built against BIM.works 2.x when it moves to 3.0, and what to do about it. It assumes that the SDKs and packages are upgraded together with the instance (explanation/versioning-and-compatibility#sdks-in-lockstep). A 2.x SDK, 3D viewer or client talking to a 3.0 instance is not a supported combination.
The data a model returns does not change: attributes, property sets and quantity sets come back the same. What changes is around that data: how a client authenticates, the SDK APIs, how BQL reads queries and shapes and counts its answers, the values BIM.works derives from the geometry, and the web application. Many BQL changes are corrections, where 2.x gave a wrong answer and 3.0 gives the right one.
Before you start#
- A 3.0 test instance holding copies of your own models, to run your stored actions on and compare numbers with.
- An inventory of what your integration uses:
- the API tokens in use, what each one calls, and its owner;
- the stored actions: queries, visualisations, checks, compare and clash definitions, viewpoints, IDS files;
- the BQL in your code, and the SDK calls you make;
- the numbers your reports and checks produce, for comparison later.
Steps#
- Run every stored action on the 3.0 test instance, and rewrite what fails (query languages, checks).
- Upgrade every SDK and package to the instance's version. Fix the compile errors first, then the behaviour changes (SDKs).
- Adapt token handling and the calls that were removed or changed (tokens, calls).
- Once the operator has reindexed your models, compare the numbers your reports give on 2.x and on 3.0 (model data).
- Switch over, and recreate your API tokens with scopes and an expiry.
Tokens and logins#
API tokens have scopes and expire.
- A new API token expires after one month by default and after three years at most. It has the format
BAT-…. - A 2.x READ or READ/WRITE token keeps working. It is mapped to a fixed set of scopes that is narrower than what it could do in 2.x:
- a READ token can no longer comment, edit actions, or set a georeference, alignment or discipline;
- both kinds lose
checks:writeand every superadmin task.
- Some scopes need something of the token's owner, or the call answers
NON_AUTHORIZED_SCOPE:admin:readandadmin:write, which cover creating API tokens: an organisation the owner owns;collab:readandcollab:write: theCOMMENTINGfeature;- the workspace, bSDD, AI and
checks:writescopes: their own features.
- A 2.x token has no expiry unless one is set. Editing it in the web application gives it one month.
Recreate your tokens with explicit scopes and an expiry that fits a rotation you plan for (Create an API token, Manage API tokens). A token that has expired answers API_TOKEN_EXPIRED at login.
Calls without a login are refused. Without a credential, only the 27 public calls run: the logins, GetApplicationVersion and a few more, other calls now answer NO_AUTHORIZATION.
Tokens for browsers take scopes. Create versions, nodes and recursive node tokens with scopes: a viewer page needs fs:read, geometry:read and query:run, plus gis:read when it shows a map (Create a versions token). The task-name list is deprecated. When the issuer is logged in with an API token:
- every name in the list is validated, so a name 3.0 does not have gives
INVALID_TASK_NAME, with the likely intended name in the message (2.x lists often nameTableExport2, which never existed: useTableExport); - the issued token also carries the issuer's scopes, and reaches every call those scopes and its resource rights allow, not only the listed ones.
A token minted with a 2.x task list and a 2.x share link cannot do everything the 3.0 3D viewer needs: geometry now comes from DownloadGeometry3DStream, and GIS layers need gis:read. Mint new ones, and share again.
// allowedTasks (third argument) is deprecated: pass null and give the scopes
const result = await client.tokens.createVersionsToken(["<version uuid of the first demo model>"], 30 * 60,
null, false, false, ["fs:read", "geometry:read", "query:run"]);// a null task list no longer compiles: the scope overload makes it ambiguous
ObjectNode auth = client.tokens.createVersionsToken(Set.of(UUID.fromString("<version uuid of the first demo model>")), Duration.ofMinutes(30),
EnumSet.of(Scope.FS_READ, Scope.GEOMETRY_READ, Scope.QUERY_RUN), null, false);// the constructors with a task-name list are [Obsolete]
CreateVersionsTokenResponse response = client.Tokens.CreateVersionsToken(new CreateVersionsTokenRequest(
Collections.CreateHashSet(Guid.Parse("<version uuid of the first demo model>")),
new HashSet<Scope> { Scope.FS_READ, Scope.GEOMETRY_READ, Scope.QUERY_RUN }, TimeSpan.FromMinutes(30)));Issued tokens are stricter.
- Tokens from
GenerateQueryToken, theGenerate…DownloadGeometry…Tokencalls andGenerateUploadModelToTreeTokenhold only for the exact request they sign. Any other request answersNON_AUTHORIZED_TASK. - A token issued from an issued token cannot create credentials (
CREDENTIAL_CREATION_NOT_ALLOWED). - An issuer without write rights gets a read-only token.
- A 3D Tiles URL is no longer accepted as an API credential.
- The signed "delegated" input (
delegatedandhmacnext to a call's input) is gone.
Logins.
- After 10 failed logins for a username, or 30 from one IP address, within 15 minutes, even the right password answers
INVALID_LOGINuntil the window passes. API-token logins are throttled per IP address. - A custom two-factor client must pass the
tokenthat the password step returns toLogin2Fa. - Changing a password signs out the account's other sessions (
SESSION_SIGNED_OUT). - A token restricted to IP addresses is checked against the client address the instance resolves through its trusted proxies, not against a raw
X-Forwarded-For. A refusal isNON_AUTHORIZED_IP_ADDRESS.
Removed and changed calls#
| Removed in 3.0 | Use instead |
|---|---|
Compare, the JavaScript client.ifc.compare() and POST /ifc/Compare |
CompareModels and GetCompareResult, which return a new result document (Compare two versions) |
Diff, StartDiffSession, UpdateDiffSession, ExportDiffToBcf, ExportDiffToCsv, ExportDiffToExcel |
The compare calls and ExportCompareResult |
ListIfcType, ListIfcTypes, ListAllUsedTypes |
BQL GET type, COUNT(qid) GROUP BY type (reference/bql/types#type) |
GetIfcEntity |
A BQL query on the object's qid (reference/bql/where#qid) |
GetFootprint, POST /gis/GetFootprint, ListAvailable2DRepresentations, and getFootprint in the JavaScript SDK (with client.geometry2d) and the Java SDK (with Geometry2dApi.FootprintType) |
A BQL PROJECTION(), PROJECTION(MINIMUM_RECTANGLE) or SLICE() query, which every model with 3D geometry answers (Get the footprint) |
ApplyChangeSet, DownloadIfcWithAppliedChangeSet |
A BUL transaction (Change a model with BUL) |
FindNodes (already disabled in 2.x) |
SearchModelsAdvanced |
SvgExport2d |
ExportSvg, or ExportVectorSvg for a vector drawing (Export a vector drawing) |
- Footprints.
GetFootprintis gone (the table above): BQL answers the same outline exactly (Get the footprint). The CityGML 3 export'sSLICE_0_2DandSLICE_300_2DbecameSLICE_2Dwithslice_height_mm. - Cancelling.
InterruptTask(task.terminate()in the JavaScript client) cancels only a task started with the same credential, the same session or token. In 2.x it cancelled any task for anyone who had its id. A superadmin still cancels any task. - Nodes and versions.
DeleteNodeVersiondeletes only the newest version (CAN_ONLY_DELETE_LAST_VERSION).GetNode,DeleteNode,DeleteNodeErrorandListNodeErrorsanswerNODE_NOT_FOUNDfor a missing node, where 2.x returned nothing ortrue.RenameNodeandMoveNoderefuse a duplicate names.ListNodesrefuses nodes and versions tokens: use the uuids the token names.- Version lists hold versions that were not uploaded. A version's
originisUPLOAD,TRANSACTION(a BUL commit or a geometry edit) orCONVERSION("Convert to IFC4"). "Set georeference" creates one too.
- Uploads.
- The declared
filesizemust match the bytes. options.forcetakes effect:NEW_MODELcreates a sibling model.- Upload by URL fetches only from public http(s) addresses (
UPLOAD_URL_REFUSED). - A failed upload leaves the node
ERRORwith an error row. In 2.x the node stayed pending without one. - The same bytes under another name reuse the processed model.
.ifcxmlchecks in like.ifc.- DWG, LAS and LAZ need the instance to enable them (
INPUT_FILE_TYPE_NOT_ENABLED), and PLY is refused. - A STEP file truncated inside an entity is
CORRUPT_FILE; IFC4X3_ADD1 isUNSUPPORTED_SCHEMA. - A raw
POST /uploadneedsAuthorization: Bearer <base64 of the auth JSON>, or it answers 401. The 3.0 SDKs send it (Upload a model).
- The declared
- Errors. No error code was removed or renumbered, but 3.0 adds codes:
API_TOKEN_EXPIRED,NON_AUTHORIZED_SCOPE,SESSION_SIGNED_OUT,NODE_GONE,TASK_LOST_NODE_CHANGED,PAYLOAD_TOO_LARGE,TOO_MANY_REQUESTS,RESULT_TOO_LARGE,QUERY_TOO_EXPENSIVE,CAN_ONLY_DELETE_LAST_VERSION,UPLOAD_URL_REFUSEDand more (Error codes). Code that handles a fixed list of codes needs the new ones. An error envelope carries areferenceand every response anX-Request-Id: quote them when you report a problem. A response over 256 MiB fails withPAYLOAD_TOO_LARGE.
The OpenAPI (Introduction):
- LoginWithApiToken returns the auth object instead of a base64 string, and LoginWithUsernamePassword the auth object instead of
{"auth": …}. Pass"response_format": "base64"to get the 2.x string. - Errors carry their HTTP status (400, 401, 403, 404, …) instead of always 500. A missing bearer token gives 401 with a JSON body instead of an HTML page.
- The document grew from 20 to 96 operations, and its models changed: regenerate a generated client.
Query languages#
Stored actions#
Stored actions are brought to the 3.0 syntax for you. After the first start on your 2.x data, the instance checks every stored query, visualisation, check and sequence, once. One that no longer parses only because of the known syntax changes below (IN <unit>, CS LENGTH, a name that became a keyword) gets a new version with the 3.0 text, saved by system with the comment Rewritten for BIM.works 3.0 and the changes it made, such as IN → UNIT; length → "length". The 2.x text stays as the version before it: the version history in the Actions tree shows it, runs it and copies it back as a new version (how-to/using-bimworks/use-the-actions-tree#organise). Two things stay yours:
- An action with any other error, also next to known changes, is not touched. Run your actions on a 3.0 test instance and fix what still fails.
IN mmbecomesUNIT mm, and 3.0 converts where 2.x ignored the clause, so the numbers of such a column change (below). To keep the 2.x numbers, remove the clause.
Queries, visualisations and checks that your application keeps itself are not rewritten: send them to UpgradeSyntax, up to 1000 in one request, and it answers each in the 3.0 syntax with the changes it made, or with the error that is left (Convert 2.x queries to 3.0). The BQL sections below have the main points; BQL changes in 3.0 has every change that makes a query fail or return something else.
Queries that no longer parse#
-
IN→UNITfor unit conversion. The unit clause of aGETfeature isUNIT;INstays the list comparator ofWHERE. A query withIN <unit>no longer parses.BQL#GET quantity.Qto_WallBaseQuantities.Height UNIT mm // 3.0 GET quantity.Qto_WallBaseQuantities.Height IN mm // 2.x, no longer parses WHERE quantity.Qto_WallBaseQuantities.Height IN (2000, 3000) // unchanged: IN as a comparatorUpgradeSyntax makes this change for you (above); by hand, search and replace
INdirectly before a unit token:\bIN\s+(mm|cm|dm|m|km|in|ft|yd|mi|mm2|cm2|dm2|m2|km2|in2|ft2|yd2|mi2|ac|mm3|cm3|dm3|m3|in3|ft3|yd3|l|mg|cg|g|kg|dc)\b→UNIT $1. 2.x accepted the clause and ignored it, so after the rewrite the values really are converted and the numbers change. The converted value has a smaller leaf,{type, value, unit}(result structure, UNIT). -
About 140 new reserved words. Lowercase words such as
length,area,status,path,item,thickness,local,figureanddetailsare keywords now, so a property, set or alias spelled like one no longer parses. Quote it:property.*."length".name,widthandheightwere reserved already. On top of these, BVL, BCL and BSL reservetop,left,right,on,off,none,center,front,back,scale,template,hideanddim, and BCL alsopick. BCOL and BRL inherit those words. -
CS LENGTHisLENGTH. -
A query sent as a JSON syntax tree (
"__type": "Bql", as the 2.x JavaScriptQueryHelperbuilt it): send the query text, or build the 3.0 tree (AST).
Syntax errors read line 1:9: missing EOF at 'WHER', up to three per query, and 2.x's silent partial parses of some malformed queries are errors now. A type in mixed case (type = IfcWall) was a syntax error and is UNKNOWN_TYPE now.
Different objects selected#
| Condition | 2.x | 3.0 |
|---|---|---|
f = null |
objects with an explicit null, which is almost none | every object without a value for f |
f != null, a bare f, ranges, numeric IN |
the object's own values | also values the object takes from its type object |
f BETWEEN (a, b) (now also BETWEEN a AND b) |
upper bound excluded | both bounds included |
f = 300, f = 0.3 m, f IN (0.3 m, …) on a quantity |
decimals were truncated to whole numbers, unit literals looked up as raw numbers | exact |
a > b between two features |
reversed and unit-blind | correct |
a = b between two features |
NOT_IMPLEMENTED |
works |
a literal in ft, in, km, l or ac |
the unit was dropped | converted |
model.discipline != X |
failed | works; a discipline also matches its sub-disciplines |
Filters on quantities therefore return different objects. A number without a unit compares in the canonical unit (mm, m², m³), as before (reference/bql/where#comparisons).
Grouping and aggregates#
GROUP BY a, bgroups by every key. 2.x grouped by the first one only, and took the other keys from an arbitrary member.- Grouping on a property, a quantity or a related object adds a group without the key, for the objects that have no value. Text keys are grouped case-sensitively.
COUNT(f)counts the objects that have a value off; 2.x counted all of them.COUNT(qid)is unchanged.- Two aggregates of one kind no longer overwrite each other: the second is keyed by its full text (
COUNT(qid)). A singleCOUNT(qid)keeps the keyCOUNT - An empty
MIN,MAXor range aggregate gives{"type": "double", "value": "NaN"}, a string where 2.x gave ±1.7976931348623157E308. Parse such values defensively. - A grouped
attribute.Xcomes back nested,{"attribute": {"X": {…}}}, like an ungrouped one (reference/bql/group-by#result).
Result structure#
ASnames a column and moves no value. An aliased aggregate or computed column is no longer under its alias:COUNT(qid) AS nis underCOUNT,SUM(quantity.*.NetVolume) AS vunderSUM(quantity.*.NetVolume). Read values by alias through the answer'scolumns(QueryColumns.byLabel(records)in JavaScript,queryWithColumnsin Java,"columns": trueon the OpenAPIQuery), or sendalias_keys/aliasKeys: true(setAliasKeys(true)in the SDKs) to keep the 2.x placement while you change your code (changelog/v3-0/bql#results).- A
UNITcolumn holds the converted value in a leaf of{type, value, unit}, withtypein lower case and withoutname,oid,symbolandclassType. A wildcard is keyedquantity.*.NetVolumeinstead of by the real set name. A requested feature without a value comes back as an explicitnull. calculated.*changed most (model data). Every calculated value gains ameasurementobject, and the full wildcard addscalculated.details, about 7 KB per object, soGET calculated.*answers grow several times.- Results over several models come in a stable order; 2.x could return a different page for the same
LIMIT … OFFSET.ORDER BY model.*works now. - A query needs the
query:runscope, and running a stored query by its uuid needs read rights on that query. The JSONBimQueryof theQuerytask and the JavaBimQueryclass are deprecated: send BQL text. - The CSV, XLS and XLSX table export was rewritten. It has a header row, aligned columns and the aggregates.
Checks, visualisations, compare and clash#
BCL, BVL and BSL parse strictly. 2.x ran whatever its parser could recover from a definition with a syntax error, so a check with a missing ; ran partly and silently. 3.0 refuses it with SYNTAX_ERROR and a line and column.
BCL verdicts.
| Situation | 2.x | 3.0 |
|---|---|---|
Several requires on one select |
the last one's verdict won, so an earlier failure was overwritten | the most serious verdict wins |
| A condition that cannot be evaluated | treated as no restriction: every object passed | the run fails with the condition and the reason |
check (f = null) |
matched almost nothing | matches every object without the value (different objects selected) |
CLASHES_WITH |
errors gave no result | runs on the new clash engine; errors and limits fail the run |
- Results. A result title shows the prefix, value, unit and postfix of its feature. Object results gain
evaluationResults,overlaysandpick, and the top levelinteraction, so a strict parser of the result has to accept them. BCF from checks is valid BCF 3.0 (reference/bcl#results). - Failures are errors.
RunCheckSummary,DownloadCheckResultsAsBcfDirect,ValidateActionand the OpenAPI check call answerUNKNOWN_MODEL_CHECK,INVALID_CHECK_DEFINITION(an IDS that does not parse),SYNTAX_ERROR(BCL) orCHECK_ERRORfor a failed run. 2.x answered with an empty success or a 0-byte BCF. IdsToBclrefuses what it cannot convert (IDS_TO_BCL_CONVERSION_ERROR). 2.x dropped such facets silently.
IDS checking was rewritten and passes all buildingSMART test cases (Checking and IDS). For the same model and IDS file the outcome changes where:
- an entity facet names a class: it matches that class exactly, so
IFCWALLno longer includesIfcWallStandardCase; - names (property sets, properties, attributes, materials, classifications) differ in case;
- a pattern relies on
^or$: patterns are XSD regular expressions, which are anchored and treat those characters literally; - a
dataTypediffers:IFCTEXTis notIfcLabel. Values are compared in SI units; - an optional facet is present with a wrong value (it fails now), or a property-set pattern matches several sets (each of them must hold the property);
partOf, set patterns orpredefinedTypeare used in the applicability, which 2.x ignored.
An invalid IDS or a failed run is an error now. More than 200 000 object results is RESULT_TOO_LARGE, and XML entity declarations are refused. Re-run your IDS files and review the outcomes that changed (Run an IDS check via the API).
BVL and BSL.
group (feature) { … }blocks are applied; 2.x ignored them (reference/bvl#groups).- A label's text value is no longer quoted inside its string:
"IFCWALL"instead of"\"IFCWALL\"". A missing value is"value": null(reference/bvl#labels). ResolveBslreturns every frame of a sequence asframes, each with its label and the actionsResolveBvlreturns for its script; 2.x answered{}for every sequence.ResolveBvlandResolveBslresolve a stored action byquery_uuidwhen you may read it; in 2.x neither loaded the stored text (reference/bsl#where).
Compare and clash.
- BCOL was rewritten. A definition says how objects are matched (
match attribute.GlobalId then attribute.Tag;) and what is compared (compare (…);), and the 2.x formidentification: … compare (…)no longer parses (BCOL). - A clash definition in the 2.x form
{query1, query2}is refused when it runs or is saved: the format isclash/1now.ImportActionsstill takes the old form without a check, so imported clash definitions fail on first use.
Stored actions. Nothing is converted at the upgrade.
| Stored as | On 3.0 |
|---|---|
| BQL query | runs, with the changes above; IN <unit> and unquoted reserved words fail |
| BCL check, BVL visualisation | runs if it parses strictly and uses no newly reserved words |
| IDS | runs; outcomes change |
| BSL sequence | resolves if it parses strictly; every frame resolves |
BCOL in the 2.x form, clash in the {query1, query2} form |
listed, refused when run |
Viewpoint in the 2.x form ({position, target, up}) |
kept by the server; the 3.0 web application asks you to store it again |
| Legacy JSON queries and checks | run |
UpdateAction keeps every version of an action and refuses to change its type: create a new action instead. ImportActions checks the whole file first, then imports all or nothing. ListActions leaves a viewpoint's content out (query_omitted): read it with GetAction.
Model data and the reindex#
The reindex is the operator's. A superadmin starts it after the upgrade, and it pauses after every restart until it is resumed. Until a model's turn comes, the model stays DONE and is served from its 2.x data:
calculated.quantity.volume,floorAreaandperimeterreadnull, andWHEREon them matches nothing;- the automatic quantities, the validation report and the space index are missing.
Agree with your operator when your models are reindexed, and treat null in that window as "not reindexed yet". Qids stay valid across the reindex: object ids are assigned as in 2.x and version ids are untouched (Identifiers).
Geometry comes from another engine. 3.0 tessellates with its own Java engine, also during the reindex. Triangle counts, bounding boxes, colours, 2D plans, footprints and clash results all move a little. A few products gain geometry, and a few lose it. The geometry of an IFCZONE is an oriented box instead of the union of its spaces.
Calculated values (Calculated values, How calculated quantities are measured):
| Value | 2.x | 3.0 |
|---|---|---|
calculated.quantity.floorArea |
the unprojected area of the down-facing faces | projected on the plan: smaller under sloped soffits, ramps and roofs |
calculated.quantity.perimeter |
a 2D outline | the boundaries of the faces, on far more products (a stair counts every step) |
| project, site, building, storey | placeholders (floor area 1, volume 0) | the totals of their contents |
| zones | the union of their spaces | the total of their contents |
calculated.consistency.* |
11 contains… flags and bwOpenEdges |
bwOpenEdges (with a new meaning), degenerateTriangles, manifold, orientationConsistent, watertight |
maximumInscribedCircle |
in the model's unit, labelled mm | in mm |
| quantities in feet, gallons, pounds, … | as stored, labelled as metric | recognised and converted to a base unit |
Do not sum calculated quantities over all objects. Spatial objects now carry the totals of their contents, so such a sum counts everything two or more times. Re-baseline the quantities you report on your own models after the reindex.
- Type objects. A value an object takes from its type object counts in
WHERE. InGET, the object's own value wins. - Systems.
IfcDistributionSystem,IfcBuildingSystemand the other system and group types are indexed, sosystem.*is no longer empty for IFC4 MEP models. - Disciplines. There are ten new values:
SPATIAL,GEOTECHNICAL,BRIDGE,ROAD,RAILWAY,PORTS_AND_WATERWAYS,TUNNELandSURVEY(existing-situation and geodata models),TIMBER_STRUCTUREunderSTRUCTURALandVERTICAL_TRANSPORT(lifts, escalators) underBUILDING_SERVICES. A filter on a discipline also matches its sub-disciplines (= HVACmatches ventilation models), and every IFC check-in suggests a discipline. - Georeference. About one model in seventy has a world coordinate system that is not the identity, and a new upload of such a file gets a different location; the reindex keeps the stored georeference. Grid convergence now rotates 3D Tiles, CityGML, glTF and footprints, by up to 1.6° in the Netherlands.
GetGeoReferenceaddsgrid_convergenceandrotation_north, andSetGeoReferenceneeds write rights andgis:write(Get the geo reference). - Check-ins do more work by default (validation, automatic quantities, space index, the free-text index, walkable surfaces), so they take longer.
SDKs#
JavaScript and the 3D viewer#
Packages
- Pin every
@bimworks/*and@sascom/*package to the instance's version (JavaScript and TypeScript). The 3.0 3D viewer needs the 3.0@bimworks/viewercommon. @sascom/commonjshas anexportsmap, so deep imports such as@sascom/commonjs/www/…no longer resolve.- The deep imports into the 3D viewer's own files (the selection visualizations,
cesium/,draco_decoder.*,viewobjects.js) are gone; import the classes from the package. - The
Versionexport isBuildVersionin jssdk, viewercommon, viewer2d and viewer3d.
@bimworks/jssdk
client.ifc.compare()is gone: usecompareModels.client.bim.clashes()sends BQL text.bim.validateQuery()resolves{messages}.uploadFromUrlno longer fetches withno-cors, so the URL has to allow CORS.- An answer with an HTTP error status reaches your error handler as the server's error object, not as
Error("HTTP error! Status: …"). A failed upload rejects instead of hanging. - The browser's connection retries for ever; after a server restart a waiting call re-attaches or fails with
TASK_LOST_NODE_CHANGED. - Every request carries an
X-BIMworks-Clientheader; the instance allows it cross-origin.
@bimworks/viewercommon. ModelManager.addModels and setModels reject with IncompleteVersionError for a version without uuid or im_metadata. Load the full version before you add it: the summaries in a node listing are not enough.
The 3D viewer. Its package name and entry point are unchanged, and it still needs WebGL2. The table has the changes that need code; 3D viewer changes in 3.0 has every change, with the 2.x and 3.0 behaviour side by side.
| Change | What to do |
|---|---|
MultiSelectMode is the strings "SHIFT" and "AUTO"; WireframeSelectionVisualization takes a colour only |
Use the strings; drop the thickness |
createBox, createCylinder, createCone, createSphere, resetCollections, startVerticalMove (never declared) are gone, and so is bimSurfer |
Use overlays, resetResults() and startObjectTransform() |
startTopPlane() and the other side starters return null when no model is loaded, or when six planes with other normals already cut. The six planes have no fixed slots, there is one plane per normal, and a section box turns into six planes |
Find planes with getPlanes() and getStandard() (how-to/viewer3d/section-planes#list) |
rightMouseClick(event, qid) gets a real qid and a pick, also on a touch long-press |
Drop workarounds for the internal number 2.x passed (reference/viewer3d#rightmouseclick) |
addModels rejects when loading fails; 2.x never settled |
Add error handling |
Geometry comes over an HTTP stream (fetch), with WebSocket as fallback |
A viewer page on another origin needs the instance to allow it (CORS) |
| GEO mode places models in the browser, on true north and at their elevation | Store GEO-mode viewpoints and measurements again (Geo mode) |
Camera.setViewpoint scales the direction so the orbit target lies at the real distance |
Check restored views (Set the camera from code) |
Annotations hide behind geometry (occlusion: "hide") |
Set occlusion to keep them on top (Annotate a model) |
Finished measurements stay editable, so committed fires again; toString() is in metres |
Handle repeated committed events (Measure areas, angles and with the laser) |
| Order-independent transparency is on, the background is a gradient, and new default keys: PageUp/PageDown, O, M, Space, Escape | Set orderIndependentTransparency: false or a background colour to keep the 2.x look; review your own key handling (Default key bindings) |
| A lost WebGL context stops the viewer and calls the engine-failure listeners | Listen for it |
The 2D viewer. Left drag rotates the plan and middle drag pans it; in 2.x left drag panned. viewFit is asynchronous, and client is a getter. 2D viewer changes in 3.0 has every change.
New features that you do not use change nothing; BIM.works 3.0 lists them.
Java#
The artifact is nl.bimbase.bimworks:client as before. It is Java 17 bytecode and runs on Java 17 and later (Java). The table has the changes that need code; Java SDK changes in 3.0 has every change.
| Change | What to do |
|---|---|
createVersionsToken, createNodesToken and createRecursiveNodeToken have EnumSet<Scope> overloads; passing null for the task list no longer compiles, and the task-list form is deprecated |
Pass scopes (scoped token) |
Task<T> was rewritten: get() completes the CompletableFuture; runChecks, runCheck and runIdsCheck throw ExecutionException where they returned null |
Recompile (a swapped jar fails with NoSuchMethodError); handle the exception |
| Calls that waited 30 seconds wait for the request timeout (10 minutes) | Set a timeout where 30 seconds mattered |
Exception messages carry the server's message and [ref …] |
Do not match on the message text |
BimApi.validate(String) returns false for an invalid query; uploading to an existing name throws NodeAlreadyExistsException |
Adapt the callers |
Geometry2dType.SLICE_AT_Z_0 and SLICE_AT_Z_300 are SLICE with a height |
Use SLICE |
Operator.evaluate(Number, Number) is gone; a recompiled call with boxed numbers binds to evaluate(double, double), which compares the other way round |
Review every call |
TimeUnit is an enum; TokenAuth, HomeDirTokenAuth and NodeClient.login(String, String) are gone |
— |
Discipline has six values more, InputFileType has DWG |
Do not store ordinals |
BimQuery (JSON queries) is deprecated |
Send BQL text through client.bim.query(…) |
The jar no longer brings jaxb-runtime 2.3, javax.activation and bctls with it |
Add what you used through them |
The generated OpenAPI client changed its models (AuthResult, Double, Integer) |
Regenerate it (reference/java#client2) |
.NET#
Upgrade BIM.works_SDK to the 3.0 package of your instance (.NET). .NET SDK changes in 3.0 has every change, and what the instance answers differently through the SDK.
- Uploads send the auth token as a Bearer header, which 3.0 requires. With an older package an upload of a new file fails with HTTP 401, and a large file with a reset connection.
- Tokens take an
ISet<Scope>(reference/dotnet#scopes); the constructors with a task-name list are obsolete (scoped token).Admin.CreateApiToken(nodeUuid, name, scopes, expiresOn)sets the scopes and the expiry day (Create an API token). TreeNodeStatus.INDEXEDINGisINDEXING. The old name is an obsolete alias of the same value.- Errors (reference/dotnet#errors):
- an error value the package does not know is a
BimWorksExceptionwhoseGetEnum()isnull, so testGetErrorType(). 2.x threwArgumentException, and could leave an asynchronous call waiting for ever; - query errors have their own enumeration,
BimWorksQueryError; GetReference()names the failed request for support;Executethrows for an HTTP error status, where 2.x returnednull;- after an asynchronous call, await
GetTask()and checkIsError().
- an error value the package does not know is a
- Parsing falls back instead of throwing on a value the package does not know:
Discipline.UNKNOWN,TreeNodeStatus.UNKNOWN. A viewpoint in an action listing hasQueryset tonull. - Upload by URL: set
filename, or the node gets the namenull. - Upload tokens: tokens from the
GenerateUploadTokenclass are refused by 3.0, which binds an upload token to the exact request it signs.
OpenAPI scripts and raw HTTP#
Handle the new login answers and HTTP statuses (calls), send the Bearer header on POST /upload, log in before every other call, and regenerate generated clients against the instance's OpenAPI document.
The web application#
For the people who use BIM.works in the browser:
- End-user mode is the default below the developer level. It hides API tokens, uuids and node history; an account that cannot switch it off cannot manage API tokens in the web application.
- The 3D viewer is the WebGPU viewer in browsers that support it. The developer viewer settings choose the other one (Choose the 3D viewer).
- New layout and menus.
- The pane switchers sit in the menu bar, and a node opens a popup instead of a dropdown and a modal.
- The 3D context menu and the storey and type menus became one object-set menu: Hide is unticking Visible, Isolate is Only, and Hide type is Same types.
- The section sides moved under "Standard plane", and measuring has a mode bar.
- "Default" navigation is called "Orbit" (Navigate the 3D viewer).
- The phone layout applies up to 800 px wide.
- Removed. The "with AI" buttons and voice input in the editors are gone ("Edit with AI" opens the chat), and so is the SDK docs panel. Links to 2.x documentation pages do not redirect. Operator
ui.jsscripts that used the removed jQuery, Prism, showdown, Ace, Wicket or YASGUI break. - Viewpoints stored by 2.x have to be stored again; 2.x clash definitions cannot be opened.
- Signing in.
- Sign-in is a card on the front page.
- Reset links expire after an hour, and the password policy and login throttling are stricter.
- Editing a 2.x API token gives it a one-month expiry.
Check#
- Every stored action opens and runs on the 3.0 test instance without a parse error. A search of your stored queries for
INfollowed by a unit token finds nothing. - Your integration's calls, uploads and token creation work with the 3.0 SDKs, and nothing calls the API before logging in.
- After the reindex, the counts, sums and calculated quantities your reports produce match what you expect, and you know which differences from 2.x are corrections.
- Every API token you use has the scopes it needs and an expiry that you track.