Skip to content

PCF with BIS modeling

Pre-release
Pre-release
Compare
Choose a tag to compare
@jackson-at-bentley jackson-at-bentley released this 09 Sep 18:41
· 17 commits to main since this release
6fe5f0f

What's new

BIS modeling

PCF now supports two additional ways to model elements in an iModel.

  1. Parent-child modeling
  2. Modeled elements

In fact, these are the only two ways to model elements in an iModel, but prior versions of PCF only supported the least specific models available in BIS: those that establish a modeling perspective for a subject. If you're interested in the details, the partition of these models is the modeled element, so ModelNode in PCF is actually a special case of (2).

These changes allow PCF to get closer to expressing the full set of models available in BIS, which is good for teams that require this complexity from their iModels and want a complete, declarative solution to writing a connector.

We did our best to add this complexity without straying from PCF's core value of making infrastructure modeling with BIS and digital twins accessible to newcomers. The new API is compatible with prior versions of PCF.

Here's what you need to know: element nodes can now have a parent, and ModeledElementNode creates modeled elements. You can put elements in the modeled element's model using that same parent property so you can forget that the sub-model is even there.

Unique aspects

PCF now has a gentler API for making unique aspects with ElementAspectNode. Just like the parent property of ElementNode, ElementAspectNode now has an element property, which is the element to which the aspect attaches.

Documentation

We've written a new page in the PCF wiki that explains how to use all the nodes in PCF and their design if you're interested.

We're slowly transitioning to JSDoc comments in the PCF source code. You can browse the API documentation locally by cloning us and issuing npm run docs in the core directory. This will generate a folder called docs. Open the index.html file in your browser with a file explorer or something like sensible-browser docs/index.html.

We're discussing how to best host PCF's documentation on iTwin.

Support

Written by @jackson-at-bentley. For support, please reach out to @jchick-bentley or @akshay-madhukar.