You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`using (var model1 = IfcStore.Open(@"E:\2218-ATA-TRK-ZZZ-2DM-AR-2218-ATA-B01-ZZZ-MOD-AR.ifc"))
{
// Load the second IFC file
using (var model2 = IfcStore.Open(@"E:\2218-ATA-TRK-ZZZ-2DM-AR-2218-ATA-B02-ZZZ-MOD-AR.ifc"))
{
// Create a new IFC store for the merged model
using (var mergedModel = IfcStore.Create(XbimSchemaVersion.Ifc2X3, Xbim.IO.XbimStoreType.InMemoryModel))
{
using (var transaction = mergedModel.BeginTransaction("Merging IFC Files"))
{
var mappings1 = new XbimInstanceHandleMap(model1, mergedModel);
var mappings2 = new XbimInstanceHandleMap(model2, mergedModel);
var instances = model1.Instances.ToList();
// Copy all entities from the first model
int counter = 0;
foreach (var entity in model1.Instances.ToList())
{
if (entity.EntityLabel >= 22 && entity.EntityLabel <= 28) { continue; }
mergedModel.InsertCopy(entity, mappings1, null, true, false);
counter++;
}
foreach (var entity in model2.Instances.ToList())
{
mergedModel.InsertCopy(entity, mappings2, null, true, false);
}
// Commit the transaction
transaction.Commit();
}
// Save the merged model to a new file
mergedModel.SaveAs(@"E:\merged.ifc");
}
}
}`
Expected behavior:
What would you expect to happen
I expect all entities from both models to be placed in the new model.
What actually is happening
The entities take in the foreach loop some entities take a very long time to be placed entities like IFCGEOMETRICREPRESNTATIONSUBCONTEXT('Axis') .. etc
in the screen shot entities with label 22 to 26
why do they take all this time? and what should i do to increase the speed of the plugin to merge multiple ifc files?
The text was updated successfully, but these errors were encountered:
I have multiple IFC files with
Xbim.Essentials 4.0.29
`using (var model1 = IfcStore.Open(@"E:\2218-ATA-TRK-ZZZ-2DM-AR-2218-ATA-B01-ZZZ-MOD-AR.ifc"))
{
// Load the second IFC file
using (var model2 = IfcStore.Open(@"E:\2218-ATA-TRK-ZZZ-2DM-AR-2218-ATA-B02-ZZZ-MOD-AR.ifc"))
{
// Create a new IFC store for the merged model
using (var mergedModel = IfcStore.Create(XbimSchemaVersion.Ifc2X3, Xbim.IO.XbimStoreType.InMemoryModel))
{
using (var transaction = mergedModel.BeginTransaction("Merging IFC Files"))
{
var mappings1 = new XbimInstanceHandleMap(model1, mergedModel);
var mappings2 = new XbimInstanceHandleMap(model2, mergedModel);
var instances = model1.Instances.ToList();
// Copy all entities from the first model
int counter = 0;
foreach (var entity in model1.Instances.ToList())
{
if (entity.EntityLabel >= 22 && entity.EntityLabel <= 28) { continue; }
mergedModel.InsertCopy(entity, mappings1, null, true, false);
counter++;
}
}`
Expected behavior:
What would you expect to happen
I expect all entities from both models to be placed in the new model.
What actually is happening
The entities take in the foreach loop some entities take a very long time to be placed entities like IFCGEOMETRICREPRESNTATIONSUBCONTEXT('Axis') .. etc
in the screen shot entities with label 22 to 26
why do they take all this time? and what should i do to increase the speed of the plugin to merge multiple ifc files?
The text was updated successfully, but these errors were encountered: