-
I believe a Bentley Open Roads .dgn has a unit of measure associated with it. We are using the PresentationManager and I do understand how I can specific the activeUnitSystem to get my display values in a specific units. I see the following paragraph in the Quantity Formatter docs, but I'm not sure where the ui-test-app can be found: It is possible to retrieve Units from schemas stored in IModels. The new SchemaUnitProvider can now be created and used by the QuantityFormatter or any method in the core-quantity package that requires a UnitsProvider. Below is an example, extracted from ui-test-app, that demonstrates how to register the IModel-specific UnitsProvider as the IModelConnection is created. This new provider will provide access to a wide variety of Units that were not available in the standalone BasicUnitsProvider.
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Just to confirm, you're retrieving values in persistence units (metric) and want to:
Is that right? Any reason not do do calculations in persistence units and do the units conversion and formatting at the end? |
Beta Was this translation helpful? Give feedback.
Each property definition (unique PropertyInfo) defines a KindOfQuantity and that KindOfQuantity defines the persistence unit and the active format. The format defines the presentation unit and attributes to control how the converted value should be converted to string.
If you are pulling 14 million individual property values there are likely only a few unique property definitions that describe those 14 million values. The ratio will depend on the data you are selecting.
You can identify unique property infos by combining the PropertyInfo.name and PropertyInfo.classInfo.name. Within one iModel the combination of PropertyInfo.classInfo.name and PropertyInfo.name will be unique.
That said yo…