Comments (7)
Hi Michael,
thanks for the question.
This sounds like a serious issue. But I've not understood the problem 100% which we need to reproduce.
Would you be able to produce a test case in Xbim.Essentials.Test?
If you do I'd add it to the solution for debugging (possibly via a pull request?)
You can add small files too, if needed, but ideally we'd like the code to be minimal to identify the offending API.
Thanks,
Claudio
from xbimessentials.
Unit test class Ifc2x3InsertCopyTest.cs to develop stream project Tests added. Note that I had include a 800KB ifc file generated from Autodesk Inventor - if the file is smaller (20KB) it works!
from xbimessentials.
I will upload once I figured out how.. 403 (Forbidden)..
from xbimessentials.
You can try pull request.
from xbimessentials.
Files uploaded to (https://github.com/xBimTeam/XbimEssentials/files/551164/Ifc2x3InsertCopyTest.zip)
from xbimessentials.
Thanks, I'll put the files in the solution soon.
from xbimessentials.
No need @CBenghi. I found a bug and it is solved now. Thank you @MichaelBuehler very much. This was a very good one to spot out. The problem was actually not related to the InsertCopy()
itself but to the way transactions work in EsentModel
. It keeps track of modified entities and writes them to database at the end of transaction. But once this is done we were failing to add it there again. This in your code was combined with the fact that size of transaction is limited in Esent engine so with large InsertCopy
it needs to flush the changes in the meantime with the same effect. The simple testing code is this:
[TestMethod]
public void EsentMultiTransactionTest()
{
const string file = "test.ifc";
using (var model = EsentModel.CreateTemporaryModel(new EntityFactory()))
{
IfcCurtainWall wall;
using (var txn = model.BeginTransaction("New wall"))
{
wall = model.Instances.New<IfcCurtainWall>(w => w.Name = "Name");
txn.Commit();
}
using (var txn = model.BeginTransaction("Edit wall"))
{
wall.Description = "Description";
txn.Commit();
}
model.SaveAs(file);
}
using (var model = EsentModel.CreateTemporaryModel(new EntityFactory()))
{
model.CreateFrom(file, null, null, true, true);
var wall = model.Instances.FirstOrDefault<IfcCurtainWall>();
Assert.IsTrue(wall.Name == "Name");
Assert.IsTrue(wall.Description == "Description");
}
}
from xbimessentials.
Related Issues (20)
- SaveAs Truncating file HOT 3
- InverseProperty performance HOT 2
- PredefinedType in IIfcBuildingElementProxy not updatable HOT 3
- Non-canonical matrix-vector product HOT 3
- Model instances filter from interfaces HOT 10
- ManageOwnerHistory
- setting object colour for item exported from autocad HOT 1
- Support for IFC 4x3 HOT 4
- Reading STEP files HOT 2
- Provide means of accessing PredefinedType values from super-classes/interfaces
- Getting correct world coordinates of the element
- Geometry Store is empty on latest XbimEssentials 6.0.443-develop HOT 10
- Possibility of splitting IFC file into a few pieces HOT 2
- Exception ("Out of table cursors") from Xbim.IO.Esent-6.0.445 , While processing IFC files with size > 150 MB HOT 2
- Changing color of IfcBuildingElementProxy HOT 4
- how to create Space from objects such as wall, windows, doors, etc HOT 1
- IFCXml File with empty header throws exception HOT 2
- Windows, Doors, .. HOT 3
- Layers & Elements? HOT 1
- Move PDBs from NuGet packages to symbol packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xbimessentials.