# Interface BimApiLoadOptionsWithIfcChangePredicate

Load options to use when IFC files in a container needs to match a specified predicate in order to be loaded. Useful when you for example only want to load files with of type disicpline A.

interface BimApiLoadOptionsWithIfcChangePredicate {
ifcChangePredicate: (o: BimChangeIfc) => boolean;
ifcObjectHasGeometryPredicate?: (o: BimIfcObject) => boolean;
isIfcObjectVisiblePredicate?: (o: BimIfcObject) => boolean;
loadGeometry: boolean;
loadPropertySets: boolean;
removeLeafIfcObjectsWithNoGeometry?: boolean;
throwOnNoIfcChanges: boolean;
toExplicitLoadOptions(
ifcChanges: BimChangeIfc[],
): BimApiLoadOptionsWithExplicitIfcChanges;
}

#### Hierarchy (View Summary)

- BimApiIfcObjectsLoadOptions
- BimApiSetContainerLoadOptions
  - BimApiLoadOptionsWithIfcChangePredicate

##### Index

### Properties

ifcChangePredicate
ifcObjectHasGeometryPredicate?
isIfcObjectVisiblePredicate?
loadGeometry
loadPropertySets
removeLeafIfcObjectsWithNoGeometry?
throwOnNoIfcChanges

### Methods

toExplicitLoadOptions

## Properties

### `Readonly` ifcChangePredicate

ifcChangePredicate: (o: BimChangeIfc) => boolean

If specified only BimChangeIfc instances matching this criteria will be loaded.

### `Optional` `Readonly` ifcObjectHasGeometryPredicate

ifcObjectHasGeometryPredicate?: (o: BimIfcObject) => boolean

All BimIfcObject matching this criteria will be marked with BimIfcObject.hasGeometry = `false` so that they can not be visualized (no geometry data will be loaded)

Inherited from BimApiIfcObjectsLoadOptions.ifcObjectHasGeometryPredicate

### `Optional` `Readonly` isIfcObjectVisiblePredicate

isIfcObjectVisiblePredicate?: (o: BimIfcObject) => boolean

Determines if object is initially visible or not. Only valid if ifcObjectHasGeometryPredicate is not defined or returns `true` for the object.

Inherited from BimApiIfcObjectsLoadOptions.isIfcObjectVisiblePredicate

### loadGeometry

loadGeometry: boolean

If `true` then geometry is loaded automatically.

Inherited from BimApiSetContainerLoadOptions.loadGeometry

### loadPropertySets

loadPropertySets: boolean

If `true` then property sets are loaded automatically. No call to () is needed.

Inherited from BimApiSetContainerLoadOptions.loadPropertySets

### `Optional` removeLeafIfcObjectsWithNoGeometry

removeLeafIfcObjectsWithNoGeometry?: boolean

Determines whether leaf nodes in the IFC hierarchy, with no geometry, should be removed during loading. Defaults to `false`.

Inherited from BimApiIfcObjectsLoadOptions.removeLeafIfcObjectsWithNoGeometry

### throwOnNoIfcChanges

throwOnNoIfcChanges: boolean

Throw exception when ifcChangePredicate is applied to a list of BimChangeIfc and the result is a empty collection.

## Methods

### toExplicitLoadOptions

- toExplicitLoadOptions(
  ifcChanges: BimChangeIfc[],
  ): BimApiLoadOptionsWithExplicitIfcChanges

  Converts a BimApiLoadOptionsWithIfcChangePredicate instance to a BimApiLoadOptionsWithExplicitIfcChanges. This allows a user to specify exactly which ifc files that shall be loaded (for example external files can be added to BimApiLoadOptionsWithExplicitIfcChanges.ifcChanges). Do note that if ifc files previusly marked as not loadable and any new ifc's that are added will still be subject to the filters (ifcObjectHasGeometryPredicate and isIfcObjectVisiblePredicate). Hence if those filters are specified and don't match anything in the files that are marked for load then objects from those files will still not be visible (and may not even get geometry).

  #### Parameters

  - ifcChanges: BimChangeIfc[]

    Collection of ifc files that will be initially included in BimApiLoadOptionsWithExplicitIfcChanges.ifcChanges. Only items matching ifcChangePredicate will initially be marked for loading.

  #### Returns BimApiLoadOptionsWithExplicitIfcChanges