Skip to main content
Version: v5.0

Database persistence

Model composition#

With model composition persistence, project admins can define and manage different default settings for user groups so that when a users logs in, only the configured element types render. This is useful for convenience and to improve performance by only loading relevant parts of the model.

Example use case#

As an example, the project admin creates the following user groups:

  • Electrical user group: Users see only structural and electrical elements
  • Plumbing user group: Users see only structural and plumbing elements
  • Architectural user group: Users see only only architectural elements

Configuration persistense ensures that the user groups are provided with tailored views based on their goals, improving focus and reducing the need for repetitive manual adjustments. These settings are applied automatically every time the project is loaded, ensuring consistency and efficiency.

GIS#

There are three geolocation states for a project model:

  • Original values: Predefined geolocation set by the Application. This geolocation is used when the model loads for the first time.
  • Database values: Persisted geolocation set by Project Admin. This geolocation is used once set and returned to when the model is dragged to a new location but not saved.
  • Realigned values: An unpersisted geolocation set by the Project Admin that is stored in local state. This geolation is used when you enable Realignment and drag the model to a new location. If you disable Realignment, this value is persisted as the database value; if you click Reset, the model returns to the original database value.

Setting a new GIS database value#

  1. Enable Horizontal Realignment.
  2. Drag the model to a new location.
  3. Complete one of the following options:
  • To save the new location, disable Horizontal Realignment.
  • To revert to the original database value, click Cancel.

Graphics data#

Persistence#

Graphics data such as annotations now persist in the Graphics Service database.

Permissions#

graphicsdata resource type#

You can configure graphics data permissions with the graphicsdata resource type identifier.

Annotation usage and visibility by user group#

You can configure who can perform what actions on graphicsdata resources in a project with user group permissions and the graphicsdata resource type identifier. In the following example, the Graphics Creator user group users have CREATE permissions and the Graphics Viewer user group users have READ permissions:

  const userGroups = await PlatformApi.IafProj.addUserGroups(    project,    [      {        _name: "Graphics Creator",        _shortName: "graphics_contrib",        _description: "Graphics Contributor User Group",        permissions: {          ...          graphicsdata: [{ actions: ["READ", "CREATE"] }],          ...        },      },      {        _name: "Graphics Viewer",        _shortName: "graphics_reviewer",        _description: "Graphics Reviewer User Group",        permissions: {          ...          graphicsdata: [{ actions: ["READ"] }],          ...        },      }    ],    ctx  );