Skip to main content

T8ClientModel <TProject, TProduct, TEntityType, TUnit>

Main container class for a T8 Client Model. Contains all building elements (products), entity types, units, and their relationships.

@example
const buffer = await fetch('model.t8cm').then(r => r.arrayBuffer());
const model = readT8ClientModel(buffer);
console.log(`Loaded ${model.products.length} products`);
console.log(`Model has ${model.entityTypes.length} entity types`);

Index

Constructors

constructor

Properties

publiccomputedPropertySetRepository

computedPropertySetRepository: T8PropertySetRepository<TUnit>

Repository for accessing computed property sets

publicentityTypes

entityTypes: TEntityType[]

Array of all entity types (e.g. types of walls) defined in the model

publicproducts

products: TProduct[]

Array of all products (building elements) in the model

publicproject

project: TProject

The project information

publicpropertySetRepository

propertySetRepository: T8PropertySetRepository<TUnit>

Repository for accessing property sets

publicquantitySetRepository

quantitySetRepository: T8QuantitySetRepository<TUnit>

Repository for accessing quantity sets

publicunits

units: TUnit[]

Array of all units of measurement used in the model