When trying to begin a second transaction on a IFCStore, a NullReferenceException is thrown. My goal is to separate the classic IFC initialization (credentials, project, building) from the real "design" (adding beams, ...). To achieve this, I need to create separate transactions on the IFCStore I'm using.
I create a transaction to add the project and building informations and commit
I create a second transaction to add various elements. When creating this transaction, it fails. No details are given and I can't debug it further than my code. See sample code.
Assemblies and versions affected:
Xbim.Essentials 6.0.445
Steps (or code) to reproduce the issue:
public IFCHelper()
{
var credentials = CreateCredentials();
LocalIFCModel = IfcStore.Create(credentials, XbimSchemaVersion.Ifc4, XbimStoreType.InMemoryModel);
using (LocalIFCModel)
{
using (var txn = LocalIFCModel.BeginTransaction("Creating IFC"))
{
LocalIFCProject = InitializeProject(LocalIFCModel, "PROJECT : TEST");
LocalIFCBuilding = CreateBuilding(LocalIFCModel, LocalIFCProject, "BUILDING : TEST");
txn.Commit();
}
}
using (LocalIFCModel)
{
using (var txn = LocalIFCModel.BeginTransaction("Do something else")) // HERE !
{
// Do something else
txn.Commit();
}
}
}
Expected behavior:
I guess I should be able to create a second transaction without any problems, as the first one has been commited.
Actual behavior or exception details:
NullReferenceException is thrown on second BeginTransaction method call (see "HERE !" comment in sample code). I do not have any more details nor can I debug the code further than mine.
When trying to begin a second transaction on a IFCStore, a NullReferenceException is thrown. My goal is to separate the classic IFC initialization (credentials, project, building) from the real "design" (adding beams, ...). To achieve this, I need to create separate transactions on the IFCStore I'm using.
I create a transaction to add the project and building informations and commit
I create a second transaction to add various elements. When creating this transaction, it fails. No details are given and I can't debug it further than my code. See sample code.
Assemblies and versions affected:
Xbim.Essentials 6.0.445
Steps (or code) to reproduce the issue:
Expected behavior:
I guess I should be able to create a second transaction without any problems, as the first one has been commited.
Actual behavior or exception details:
NullReferenceException is thrown on second BeginTransaction method call (see "HERE !" comment in sample code). I do not have any more details nor can I debug the code further than mine.