I am very new to BIMserver and I am trying to get instances of a specific class of the IFC I have checked in, using the Java client library and IfcModelInterface.
Here is the piece of code :
IfcModelInterface model = client.getModel(project, project.getLastRevisionId(),false, true,true);
Collection<IfcProduct> products = model.getAllWithSubTypes(IfcProduct.class);
The call to getAllWithSubtypes
results in a null pointer exception.
When I debug it goes to the class where :
public <T extends IdEObject> List<T> getAllWithSubTypes(EClass eClass) {
if (!loadedClasses.contains(eClass.getName()) && modelState != ModelState.FULLY_LOADED) {
eClass is null and hence I get an exception, I don't understand why?