3.7.0 Change Notes

Table of contents:

AppUi

Static manager classes

In an effort to reduce usage complexity and discoverability of this package, many *Manager classes are now exposed through the UiFramework entry point. The direct classes access is being deprecated.

Each initialize method have been made internal and were always called automatically internally, call to these method can be safely removed from external code.

Below is a list of the changes from this move, some of these new access point may be reworked to further reduce the complexity, so they are marked @beta. Already @deprecated method were not moved to the new interfaces.

Original access New access
ConfigurableUiManager.addFrontstageProvider UiFramework.frontstages.addFrontstageProvider
ConfigurableUiManager.loadKeyboardShortcuts UiFramework.keyboardShortcuts.loadKeyboardShortcuts
ConfigurableUiManager.registerControl UiFramework.controls.register
ConfigurableUiManager.isControlRegistered UiFramework.controls.isRegistered
ConfigurableUiManager.createControl UiFramework.controls.create
ConfigurableUiManager.unregisterControl UiFramework.controls.unregister
ConfigurableUiManager.initialize
ConfigurableUiManager.loadTasks
ConfigurableUiManager.loadWorkflow
ConfigurableUiManager.loadWorkflows
ConfigurableUiManager.initialize
ConfigurableUiManager UiFramework.controls
KeyboardShortcutManager.initialize
KeyboardShortcutManager UiFramework.keyboardShortcuts
FrontstageManager.initialize
FrontstageManager.setActiveLayout UiFramework.content.layouts.setActive
FrontstageManager.setActiveContentGroup UiFramework.content.layouts.setActiveContentGroup
FrontstageManager UiFramework.frontstages
ToolSettingsManager.initialize
ToolSettingsManager UiFramework.toolSettings
ContentLayoutManager.getLayoutKey UiFramework.content.layouts.getKey
ContentLayoutManager.getLayoutForGroup UiFramework.content.layouts.getForGroup
ContentLayoutManager.findLayout UiFramework.content.layouts.find
ContentLayoutManager.addLayout UiFramework.content.layouts.add
ContentLayoutManager.setActiveLayout UiFramework.content.layouts.setActive
ContentLayoutManager.refreshActiveLayout UiFramework.content.layouts.refreshActive
ContentLayoutManager UiFramework.content.layouts
ContentDialogManager.initialize
ContentDialogManager.openDialog UiFramework.content.dialogs.open
ContentDialogManager.closeDialog UiFramework.content.dialogs.close
ContentDialogManager.activeDialog UiFramework.content.dialogs.active
ContentDialogManager.dialogCount UiFramework.content.dialogs.count
ContentDialogManager.getDialogZIndex UiFramework.content.dialogs.getZIndex
ContentDialogManager.getDialogInfo UiFramework.content.dialogs.getInfo
ContentDialogManager UiFramework.content.dialogs
ContentViewManager UiFramework.content
ModalDialogManager.openDialog UiFramework.dialogs.modal.open
ModalDialogManager.closeDialog UiFramework.dialogs.modal.close
ModalDialogManager.activeDialog UiFramework.dialogs.modal.active
ModalDialogManager.dialogCount UiFramework.dialogs.modal.count
ModalDialogManager UiFramework.dialogs.modal
ModelessDialogManager.initialize
ModelessDialogManager.openDialog UiFramework.dialogs.modeless.open
ModelessDialogManager.closeDialog UiFramework.dialogs.modeless.close
ModelessDialogManager.activeDialog UiFramework.dialogs.modeless.active
ModelessDialogManager.dialogCount UiFramework.dialogs.modeless.count
ModelessDialogManager.getDialogZIndex UiFramework.dialogs.modeless.getZIndex
ModelessDialogManager.getDialogInfo UiFramework.dialogs.modeless.getInfo
ModelessDialogManager UiFramework.dialogs.modeless
UiShowHideManager UiFramework.visibility
UiFramework.childWindowManager.openChildWindow UiFramework.childWindows.open
UiFramework.childWindowManager.findChildWindowId UiFramework.childWindows.findId
UiFramework.childWindowManager.closeAllChildWindows UiFramework.childWindows.closeAll
UiFramework.childWindowManager.closeChildWindow UiFramework.childWindows.close
UiFramework.backstageManager UiFramework.backstage

ViewSelector Enhancements

Search functionality has been added to the ViewSelector component, allowing for additional ease when navigating between iModel views. Search functionality is optional and enabled by default. To disable search functionality, set ViewSelectorProps.searchBox to false.

Mesh intersection with ray

New functionality computes the intersection(s) of a Ray3d with a Polyface. By default, PolyfaceQuery.intersectRay3d returns a FacetLocationDetail for the first found facet that intersects the infinite line parameterized by the ray. A callback can be specified in the optional FacetIntersectOptions parameter to customize intersection processing, e.g., to filter and collect multiple intersections. Other options control whether to populate the returned detail with interpolated auxiliary vertex data: normals, uv parameters, colors, and/or the barycentric scale factors used to interpolate such data.

There is also new support for intersecting a Ray3d with a triangle or a polygon. BarycentricTriangle.intersectRay3d and BarycentricTriangle.intersectSegment return a TriangleLocationDetail for the intersection point of the plane of the triangle with the infinite line parameterized by a ray or segment. Similarly, PolygonOps.intersectRay3d returns a PolygonLocationDetail for the intersection point in the plane of the polygon. Both returned detail objects contain properties classifying where the intersection point lies with respect to the triangle/polygon, including isInsideOrOn and closest edge data.

Deprecations

@itwin/core-backend

  • IModelDb.query and ECDb.query is deprecated in favor of using IModelDb.createQueryReader and ECDb.createQueryReader, respectively, and iterating over the query using the returned ECSqlReader. The createQueryReader methods accept the same parameters as the now deprecated query methods.
    E.g.,

    const reader = myIModelDb.createQueryReader("SELECT ECInstanceId FROM bis.Element", undefined, undefined);
    while (await reader.step()) {
        currentId = reader.current.ecinstanceid;
        // do something with the id
    }
    
  • IModelDb.queryRowCount and ECDb.queryRowCount are deprecated. Use a subquery to count rows instead.
    E.g.,

    const reader = myDb.createQueryReader(`SELECT count(*) FROM (<query-whose-rows-to-count>)`)
    await reader.step();
    const numRows: number = reader.current[0];
    
  • IModelDb.restartQuery and ECDb.restartQuery are deprecated. Instead, create a new ECSqlReader using createQueryReader and pass in the restart token as part of the config argument: E.g., { restartToken: myToken } or new QueryOptionsBuilder().setRestartToken(myToken).getOptions().

@itwin/core-frontend

  • IModelConnection.query is deprecated in favor of using IModelConnection.createQueryReader and iterating over the query using the returned ECSqlReader. createQueryReader accepts the same parameters as the now deprecated query method.
    E.g.,

    const reader = myIModelConnection.createQueryReader("SELECT ECInstanceId FROM bis.Element", undefined, undefined);
    while (await reader.step()) {
        currentId = reader.current.ecinstanceid;
        // do something with the id
    }
    
  • IModelConnection.queryRowCount is deprecated. Use a subquery to count rows instead.
    E.g.,

    const reader = myIModelConnection.createQueryReader(`SELECT count(*) FROM (<query-whose-rows-to-count>)`)
    await reader.step();
    const numRows: number = reader.current[0];
    
  • IModelConnection.restartQuery is deprecated. Instead, create a new ECSqlReader using createQueryReader and pass in the restart token as part of the config argument: E.g., { restartToken: myToken } or new QueryOptionsBuilder().setRestartToken(myToken).getOptions().

Last Updated: 20 June, 2023