Using the latest BIMServer 1.4.0 I am unable to load my model. The model is returned, but it does not contain any classes. The lifecycle of the ifc:
I initialize like this
PluginManager pluginManager = LocalDevPluginLoader.createPluginManager(Paths.get("home"));
pluginManager.loadPluginsFromCurrentClassloader();
// Create a MetaDataManager, and initialize it, this code will be simplified/hidden in the future
MetaDataManager metaDataManager = new MetaDataManager(pluginManager);
pluginManager.setMetaDataManager(metaDataManager);
metaDataManager.init();
// Initialize all loaded plugins
pluginManager.initAllLoadedPlugins();
// Create a factory for BimServerClients, connnect via JSON in this case
BimServerClientFactory factory = new JsonBimServerClientFactory(metaDataManager, "http://localhost:8082");
// Create a new client, with given authorization, replace this with your credentials
BimServerClientInterface client = factory.create(new UsernamePasswordAuthenticationInfo("[email protected]", "none"));
setup(client);
checkin via bimviews gui (IFC2x3 Step deserializer) using this code I try to get the model
List<SProject> project = client.getBimsie1ServiceInterface().getProjectsByName("BIM");
SProject newProject = client.getBimsie1ServiceInterface().getProjectByPoid(project.get(0).getOid());
return client.getModel(newProject, newProject.getLastRevisionId(), true, false, true);
getting any class such as IFCSlab etc. proves to be unsuccesful because there is nothing inside it I tried visualizing it in bimviews and it works there.
A sample IFC: http://www.mediafire.com/file/8i8v7kfcou3ok2c/IFC_%25C3%2596ffnungen.ifc/file
Is there something wrong with this process?
can you try above code?
I intentionally gave the import statements as you need to be specific for the type of ifc format you are checking in that is ifc2x3 or ifc4. This is my code that i used it works fine for me, just use the rest end point. just replace the name of the project. Do let me know the output. you can extract the information as per your needs.
Note: This code is tested against BimServer 1.5.111 and ifc2x3
Also, IfcBuildingStorey is the floors or the levels and IfcRelContainedInSpatialStructure are like some detectors so you can modify as per your need.