xbimteam / xbimessentials Goto Github PK
View Code? Open in Web Editor NEWA .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
Home Page: https://xbimteam.github.io/
License: Other
A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
Home Page: https://xbimteam.github.io/
License: Other
Dear xBim Team,
I created a storey (IfcBuildingStorey) and a few columns (IfcColumn). I would like to add column into IfcBuildingStorey.
public static void WriteColumn(Column w, XbimModel model, IfcBuilding building, double min, double max, IfcBuildingStorey storey)
{
IfcColumn wall = CreateColumn(model, w, min, max);
if (wall != null)
{
AddPropertiesToColumn(model, wall);
}
using (XbimReadWriteTransaction txn = model.BeginTransaction("Add Storey"))
{
storey.AddElement(wall);
building.AddElement(wall);
txn.Commit();
}
}
I write the code as above. But storey.AddElement() throw out an exception saying "Unable to cast object of type 'Xbim.Ifc2x3.SharedBldgElements.IfcColumn' to type 'Xbim.Ifc2x3.ProductExtension.IfcSpatialStructureElement'." .
May I know how to correctly assign a relation between Building Storey and an elements?
Thanks!
Hi, I see there is a dev branch for IFC4 support.
Do you have an estimate on when it will be ready and promoted to master branch?
Thanks!
Steve, it looks like this commit 10aa6f1 made a breaking change to IXbimGeometryCreator
- a new Create()
overload which has not been implemented in XbimTeam/XbimGeometry's Interop dll yet.
Anyone who gets the latest Essentials and Geometry from myget Master will have issues creating geometry since 3.0.24 of XbimGeometry engine is not compatible.
Is that an oversight, or should we stub in an implementation for now?
Workaround is to get the prior version of XbimEssentials (3.0.23)
Andy
Dear xBIM team,
I am facing the following problem (bug??):
var ifcProxy = model.Instances.New();
ifcProxy.Name = "TestCuboid";
ifcProxy.Tag = new IfcLabel("TestTag");
ifcProxy.ProxyType= IfcObjectType.NotDefined;
...
is written as
#20=IFCPROXY('0UvNqIQW9AvAeKkg$mFvZJ',#11,'TestCuboid',$,$,#82,#69);
but should be written as
#20=IFCPROXY('0UvNqIQW9AvAeKkg$mFvZJ',#11,'TestCuboid',$,$,#82,#69,.NOTDEFINED.,'TestTag');
Thanks and regards,
Dominic
Hi,
It seems like all the native dlls TKBO.dll, TKBool.dll TKBRep.dll and etc didn't come along with the downloaded project. May I know where can I get all these dlls in order to compile Xbim.ModelGeometry.Converter successfully?
Thanks in Advance!
During the research the xBIM Toolkit I found the problem.
Unfortunately, InsertCopy method throws an exception:
Message = "Failed to add entity to the database"
InnerException = {"Illegal duplicate key"}
The test was taken from the file:
https://github.com/xBimTeam/XbimEssentials/blob/master/Xbim.Essentials.Tests/ModelFilterTest.cs
As well as, I write test:
[TestMethod]
public void CopyFileToFileTest()
{
using (var source = new XbimModel())
{
PropertyTranformDelegate propTransform = delegate (IfcMetaProperty prop, object toCopy)
{
var value = prop.PropertyInfo.GetValue(toCopy, null);
return value;
};
string ifcFilename_1 = @"c:\\Temp\\House_1.ifc",
ifcFilename_2 = @"c:\\Temp\\House_2.ifc";
source.CreateFrom(ifcFilename_1, Path.GetTempFileName(), null, true);
source.CacheStop();
using (var target = new XbimModel())
{
target.CreateFrom(ifcFilename_2, Path.GetTempFileName(), null, true);
target.CacheStop();
target.AutoAddOwnerHistory = false;
using (var txn = target.BeginTransaction())
{
var copied = new XbimInstanceHandleMap(source, target);
foreach (var item in source.Instances)
{
target.InsertCopy(item, copied, txn, propTransform);
}
txn.Commit();
}
target.SaveAs(ifcFilename_2);
}
source.Close();
//the two files should be the same
}
}
`
In file XbimEntityCursor.cs, method AddEntity throws an exception line 382.
internal void AddEntity(int currentLabel, short typeId, IEnumerable<int> indexKeys, byte[] data, bool? indexed, XbimLazyDBTransaction? trans = null)
In the xBimEssentials readme there is a link in the Getting Started section that points to a xBim.COBie.Client application showing how to use the cobie integration stuff. It points to https://github.com/xBimTeam/XbimEssentials/blob/master
But that page does not exist.
I'm creating an algorithm exactly like CopyAllEntitiesTest.
And model is destroyed.
Look here:
http://imgur.com/gallery/MV6h5/new
Hello!
Can Xbim Essentials save the IFC file as VRML (Virtual Reality Modeling Language) ?
Or maybe there is another way to save IFC file as VRML?
I am experimenting with your toolkit, and it so far seems very useful. However, due to a lack of clear documentation, I'm struggling to understand how to compose hierarchies of objects.
For an example, let's assume I would like to create a wall, that has a door in it. Creating both the wall and the door themselves is fairly straightforward, after creating a model itself. But, how would one go about attaching the door to the wall?
I just go through the HelloWallExample where a wall (IfcWallStandardCase) is been added to a model and save to a file. I just wonder is there a way to assign colour to the wall?
Hi,
This open source project is a great job! I spend a few days to study it but it is too huge for me. Actually what I need is to open an IFC file, import the structural element such as Beam, Wall, Slab, Column and its 3D geometry data. Can anyone give me some hints to do that? Thanks in advance.
I found a bug in file (developer version):
D:\GitHub\XbimEssentials\Xbim.IO\Esent\EsentModel.cs line 1032:
It was:
public T InsertCopy<T>(T toCopy, XbimInstanceHandleMap mappings, PropertyTranformDelegate propTransform, bool includeInverses, bool keepLabels) where T : IPersistEntity
{
var txn = CurrentTransaction as XbimReadWriteTransaction;
return Cache.InsertCopy(toCopy, mappings, txn, includeInverses, propTransform);
}
Necessary:
public T InsertCopy<T>(T toCopy, XbimInstanceHandleMap mappings, PropertyTranformDelegate propTransform, bool includeInverses, bool keepLabels) where T : IPersistEntity
{
var txn = CurrentTransaction as XbimReadWriteTransaction;
return Cache.InsertCopy(toCopy, mappings, txn, includeInverses, propTransform, keepLabels);
}
In the given example in https://xbim.codeplex.com/ the ifc file can be written and saved through xBimDocument class. But I can't find this class in xBimToolkit now. Is this writing function still available in xbim toolkit?
Thank you very much!
Hello!
Where are the methods:
buildingStorey.AddElement ?
project.AddSite(site) ?
project.AddBuilding(building) ?
etc.
Maybe there are common methods for IFC2x3 ΠΈ IFC4 ?
Do you have an example?
Thank you for attention.
Hi,
I know how to create an instant of XBimModel from .ifc file.
But I don't know how to create an instant of XBimModel from .xBim binary file?
Something like this:
var model = new Xbim.IO.XbimModel();
model.CreateFrom(xBimFile,....);
The reason is my IFC file is very big then it takes ages to create instant of XBimModel in the first time then I don't want to parse IFC file everytime. Therefore I think I should parse the .xBim instead in the second time as it should be faster than IFC text format.
Any ideas?
Hi Everyone,
I have a problem with Xbim.IO.IfcOutputStream
(sorry if this is not the proper place to ask)
Here is what happens to me
I call, on an IfcOutputStream object, the Store method,
passing an Xbim.XbimExtensions.XbimMemoryModel with all IfcConnectionPointGeometry with PointOnRelatingElement = a specific IfcVertexPoint
In my ifc file, generated by storage, then I found all those IfcVertexPoint and all those IfcConnectionPointGeometry, but these latter ones are with no arguments, like you see here:
172=IFCCONNECTIONPOINTGEOMETRY();
173=IFCCONNECTIONPOINTGEOMETRY();
174=IFCCONNECTIONPOINTGEOMETRY();
175=IFCCONNECTIONPOINTGEOMETRY();
176=IFCCONNECTIONPOINTGEOMETRY();
177=IFCCONNECTIONPOINTGEOMETRY();
178=IFCCONNECTIONPOINTGEOMETRY();
179=IFCCONNECTIONPOINTGEOMETRY();
I am attempting to create a method to delete elements in a model; however, I get the follwoing exception from the code below.
Exception:
"The method or operation is not implemented."
Code:
public static string Delete(XbimModel IfcModel, IfcElement IfcElement)
{
try
{
List<IPersistIfcEntity> m_IPersistObjects = IfcModel.Instances.OfType("IfcElement", true).ToList(); ;
foreach (IPersistIfcEntity m_PersistObj in m_IPersistObjects)
{
IfcElement m_Element = m_PersistObj as IfcElement;
if(m_Element.Name.ToString().ToLower() == IfcElement.Name.ToString().ToLower())
{
// Delete existing
using (XbimReadWriteTransaction txn = IfcModel.BeginTransaction("Delete IfcElement"))
{
IfcModel.Delete(m_PersistObj);
}
return c._Success;
}
}
}
catch { }
return null;
}
Hello
I'm new in XBim and i want to make a testing application that should be able to open, modify and store all properties of IFC elements.
I followed this Guide https://www.youtube.com/watch?v=uZ3pAV7jp1o in order to add XBim package in to my application and now i'm trying to use it to do some simple tasks. At the moment I need to open all PSETS and I would like to know what is the "correct" method to do it.
Next i will need to modify these values and store them in the IFC file.
This is the code i'm using
if (SelectedText == "IFCCOLUMN")
{
var TotalColumns = XBModel.Instances.OfType<Xbim.Ifc2x3.SharedBldgElements.IfcColumn>();
Xbim.Ifc2x3.SharedBldgElements.IfcColumn col = TotalColumns.ElementAt(listBox1.SelectedIndex);
textBox1.Text = "";
var ifcObj = col as Xbim.Ifc2x3.Kernel.IfcObject;
var ifcType = Xbim.IO.IfcMetaData.IfcType(ifcObj);
Dictionary<IfcLabel, Dictionary<IfcIdentifier, IfcValue>> result = col.GetAllPropertySingleValues();
for (int i = 0; i < result.Count; i++)
{
var Meta = result.ElementAt(i).Value;
for (int j = 0; j < Meta.Count; j++)
{
var SubMeta = Meta.ElementAt(j);
textBox1.Text += "\t" + SubMeta.Key + ": " + SubMeta.ToString() + Environment.NewLine;
}
}
//Previous tests
//for (int i = 0; i < ifcType.IfcProperties.Count; i++)
//{
// Xbim.IO.IfcMetaProperty Meta = ifcType.IfcProperties.ElementAt(i).Value;
// textBox1.Text += "\t" + Meta.PropertyInfo.Name + ": " + Meta.PropertyInfo.GetValue(ifcObj) + Environment.NewLine;
//}
//for (int i = 0; i < ifcType.ExpressEnumerableProperties.Count(); i++)
//{
// Xbim.IO.IfcMetaProperty Meta = ifcType.ExpressEnumerableProperties.ElementAt(i);
// textBox1.Text += "\t" + Meta.PropertyInfo.Name + ": " + Meta.PropertyInfo.GetValue(ifcObj) + Environment.NewLine;
//}
}
In master branch (dll version 3.2):
The code in property IfcStore.DefaultOwningApplication assumes that _editorDetails is not null:
a.ApplicationName = _editorDetails.ApplicationFullName;
However, _editorDetails remains null using constructor
public static IfcStore Create(IfcSchemaVersion ifcVersion, XbimStoreType storageType)
Workaround: Provide editorDetails on Create()
public static IfcStore Create(XbimEditorCredentials editorDetails, IfcSchemaVersion ifcVersion, XbimStoreType storageType)
Hi guys I'm a begginner user of the xBim project, and I'm trying to create a BIM explorer interface, the problem that I'm currently facing is that I can get all IFC products and quantities, butI don't know how to related them. For example, for a wall I want to get what are its quantities.
I was reading and testing the code provided in the documentation section, but it seems to be out of date, and some function do not exist anymore. So how can I get the quantities related with some IFC product?
Sorry for posting here.
Thanks!
Is there any plan to migrate the examples and documentation from version 2 to version 3?
My current issue is that I have to remove some elements out of an IFC model and I can't find a good way to do that.
Is there a forum or something that xBim users use. Google has not been my friend so far.
Hello!
Why do you use the Esent rather than SQLite?
Do you have plans to use SQLite?
Hi,
I have an Ifc file exported from Revit. If open with Xbim Xplorer you will see 4 holes within a IfcSlab. When I try to retrieve the IfcSlab info programmatically, the IfcSlab is actually represented by IfcExtrudedAreaSolid, I check the IfcExtrudedAreaSolid.SweptArea and it is actually a IfcArbitraryClosedProfileDef and the outerCurve is a IfcPolyline type. My question is where do they store the holes information ? Thanks in advance.
Hi @LloydPickering , @martin1cerny , @andyward , @benjymous, @CBenghi
I've been trying to get the Properties of each shape this way :
`
using (var geomStore = Model.GeometryStore)
{
using (var geomReader = geomStore.BeginRead())
{
var shapeInstances = geomReader.ShapeInstance.Where(s => s.RepresentationType == XbimGeometryRepresentationType.OpeningsAndAdditionsIncluded && !excludedTypes.Contains(s.IfcTypeId));
foreach (var shapeInstance in shapeInstances)
{
var ifcObjs = Model.Instances[shapeInstance.InstanceLabel] as IIfcObject;
// then access the properties from ifcObjs
}
}
}
`
but shapeInstance.InstanceLabel is always equal to -1
Can anybody please help me with that?
Is it possible to merge two or more models using XBim?
Hi,
I am looking for a way to remove the property set itself after removing all its properties. I see AddPropertySet(), GetPropertySet but no RemoveProperyStet. Is there any way I can do this?
Best regards
Hi @CBenghi , @martin1cerny, @andyward
I have similar problem #15 , I want to filter out all non-wall items and create a Spatial view.
I have used the following code, but it is not populating the tree (Only project number appears on the tree). Could you please help?
private void OpenIfcFile(object s, DoWorkEventArgs args)
{
var worker = s as BackgroundWorker;
var ifcFilename = args.Argument as string;
var model = new XbimModel();
var modelCopy = new XbimModel();
try
{
_temporaryXbimFileName = Path.GetTempFileName();
SetOpenedModelFileName(ifcFilename);
if (worker != null)
{
model.CreateFrom(ifcFilename, _temporaryXbimFileName, worker.ReportProgress, true);
string tempFileName = "";
modelCopy = XbimModel.CreateModel(tempFileName);
modelCopy.AutoAddOwnerHistory = false;
using (var txn = modelCopy.BeginTransaction())
{
var copied = new XbimInstanceHandleMap(model, modelCopy);
//modelCopy.InsertCopy(model.IfcProject, txn);
foreach (var item in model.Instances)
{
var ifctype = item.IfcType();
if (ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCPROJECT ||
ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCBUILDING ||
ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCBUILDINGSTOREY ||
ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCSITE ||
ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCWALLSTANDARDCASE )
{
modelCopy.InsertCopy(item, copied, txn, false);
}
}
txn.Commit();
}
var context = new Xbim3DModelContext(modelCopy);//upgrade to new geometry represenation, uses the default 3D model
context.CreateContext(geomStorageType: XbimGeometryType.PolyhedronBinary, progDelegate: worker.ReportProgress, adjustWCS: false);
if (worker.CancellationPending) //if a cancellation has been requested then don't open the resulting file
{
try
{
model.Close();
if (File.Exists(_temporaryXbimFileName))
File.Delete(_temporaryXbimFileName); //tidy up;
_temporaryXbimFileName = null;
SetOpenedModelFileName(null);
}
catch (Exception ex)
{
Log.Error(ex.Message, ex);
}
return;
}
}
args.Result = modelCopy;
}
catch (Exception ex)
{
var sb = new StringBuilder();
sb.AppendLine("Error reading " + ifcFilename);
var indent = "\t";
while (ex != null)
{
sb.AppendLine(indent + ex.Message);
ex = ex.InnerException;
indent += "\t";
}
args.Result = new Exception(sb.ToString());
}
}
Hello,
I would like to report a problem and suggest a fix in lfcMetaData.cs. The problem is related to the uppercase type names stored in TypeNameToIfcTypeLookup.
The AddParent
method adds culture dependent upper case type names in the dictionary TypeNameToIfcTypeLookup,
which causes crashes as the type can not be found later when the program runs under Turkish language. In Turkish upper case 'i' is an uppercase 'I' with a dot over it. This may be an issue in similar languages as well.
The suggested fix is:
In lfcMetaData.cs line 195
string typeLookup = baseParent.Name.ToUpper()
should be changed to
string typeLookup = baseParent.Name.ToUpperInvariant()
This is working fine for the time being but I am not sure if such a fix won't be needed elsewhere.
Hello, I'm not sure if this is the right place.
When I open an invlaid ifc File an get an exception (there was an error in the string encoding, but I have the same thing with an invalid line, e.g. "#103= IFCBUILDING('1CP$KLp6fE0OAJmy4q$x53',#41,);
"), I can't delete the created *.xBim file as long my application is running.
xBimModel.CreateFrom(filePath, xBimFileName, LoadXbimProgress)
I use xBimModel in a using directive.
When I had a closer look, there where still a thread of or with the StepP21Parser running, so
I could not delete the file
https://xbim.codeplex.com/workitem/1871
I hit this the other day. You end up with all units appearing to be Ampers in the debugger. It looks like:
IfcSIUnit.ToString()
is not implemented correctly
I am using the following code to get XbimSolid and build a solid with the faces coordinates, but when finished, the solids get far away from each other, like if some are on the right place and others on the origin. Can someone help me? Also, how can I find the IfcProduct of the XbimSolid? So I can try to get the transformation and also the attributes.
Thanks!
List<Xbim.Ifc2x3.GeometryResource.IfcGeometricRepresentationItem> items = model.Instances.OfType<Xbim.Ifc2x3.GeometricModelResource.IfcExtrudedAreaSolid>().ToList<Xbim.Ifc2x3.GeometryResource.IfcGeometricRepresentationItem>();
MessageBox.Show("Geometric - " + items.Count().ToString());
for (int i = 0; i < items.Count(); i++)
{
if (items[i] is Xbim.Ifc2x3.GeometricModelResource.IfcExtrudedAreaSolid)
{
XbimGeometry.Interfaces.IXbimSolid solidotemp = _xbimGeometryCreator.Create(items[i]) as XbimGeometry.Interfaces.IXbimSolid;
XbimGeometry.Interfaces.IXbimFaceSet faces = solidotemp.Faces;
}
}
Hello,
I have to get the EntityLabel of an product in particular to be used in the following code:
var product = model.Instances[entityLabel] as IfcProduct;
var propertyRelations = product.IsDefinedBy.OfType();
........
........
This I need to get the geometry of the product.
I know this class is abstract. Nevertheless there are Ifc File Reader (Solibri, DDS-CAD Viewer), that accept this Type.
I am working with your Framework, and it threw exceptions.
The IFC File was generated from 'Nemetschek Vectorworks, Inc.' with 'Vectorworks Architect 2015 SP3 R1 (Build 257190) (64-Bit) by Nemetschek Vectorworks, Inc.'
Wouldn't it be nice to accept such files even thoug they are 'invalid'
I just want to know if it is possible to use mono with XbimEssentials or not.
With IFC it works allright, but very limited functionality, and not supported. If I use XbimEssentials with this example http://www.overarching.it/wordpress/2014/03/05/xbim-data-investigation-and-export-overarching-2/
Then I first get an error related to Log4Net not being able to find configuration file. When I fix that by adding it in app.config then I get a TypeInitialzationException in Xbim.IO.IfcPersistedInheritanceCache. This happens in XbimModel model = new XbimModel()
Do I have to use Windows server or is there any alternatives?
Hello,
i'm searching the greatest way to fill a list of all the entities from mep domain(electrical, plombing..)
But it seem to be have no link between an entity and its "MepDomain" in IFC4 ?
have you please got an idea ?
thanks for help
Hey,
I can't find a way other than hardcode or reflection to access PredefinedType (contained in for exemple IIfcSlab, IIfcBeam IIfcColumn and a lot more)
I'm trying to set a treeView by defined types and there is so many of them i was thinking that it would be accessible pretty generically.
Does a better way exists?
Hello,
Im trying out the toolkit. I have a presumably an older example SimpleOpenAndSaveIfcFile where an existing IFC file is read that uses the IfcInputStream:
IfcInputStream input = new IfcInputStream(new FileStream(ifcFileName, FileMode.Open, FileAccess.Read));
I also have a the HelloWallExample but apparently the Xbim.IO referenced to this project does not contain anymore the IfcInputStream.
Could you please point me out where to look for the IfcInputStream? Has it been renamed or deprecated? Or is there a an example for reading + editing an existing IFC file in another way? I have tried using the XbimModel.CreateFrom() function but it gives me an error.
Thanks in advance for the feedback.
PS: Sorry for using the tracker but the discussion forum link is dead.
I notice that there is an XBim.Essentials.4 nuget package which is much newer than the standard XBim.Essentials package. However I don't see any formal release in the releases area of this project.
It seems that most of the XBim repos have a .4 nuget package as well.
Can anyone expand on the status of these packages? Are they superseding the standard (not .4) packages?
Also, is there anywhere that details some of the API changes? For example I see that there are still transactions but there is no IfcStore.Validate() whereas there was a XBimModel.Validate(). Is validation just not there anymore?
Thanks
Jero
Project: Xbim.Ifc2x3
File: IfcCsgPrimitive3D.cs
Problem:
Dim property - The get method references itself causing an immediate stack overflow.
Suggested fix: Specification defines that Dim should always be 3.
I use xBim develop (Xbim.Essentials.4.0.0-V198) and found problem if update ManagedEsent from 1.9.2.0 to 1.9.3.3 (in my project).
Please test it.
The problem occurs if to call the xBim library from another library( which uses a standard mechanism for application extensions in .NET - Managed Extensibility Framework (MEF)).
In my case ...
var property = ifcModel.Instances.New<Xbim.Ifc2x3.PropertyResource.IfcPropertySingleValue>(psv =>
{
psv.Name = ifcProperty.Name;
psv.Description = ifcProperty.Description;
psv.NominalValue = new Xbim.Ifc2x3.MeasureResource.IfcText(ifcProperty.NominalValue);
});
var propertySet = ifcModel.Instances.New<Xbim.Ifc2x3.Kernel.IfcPropertySet>(ps =>
{
ps.HasProperties.Add(property);
ps.Name = ifcProperty.Name;
ps.Description = ifcProperty.Description;
});
foreach (var instance in ifcModel.Instances.Where<Xbim.Ifc2x3.Kernel.IfcProduct>(
ins => ins.EntityLabel.Equals(productEntityLabel)))
{
instance.AddPropertySet(propertySet);
}
I am trying to insert property in the following way. Later it is saved to the IFC file like that:
#175043=IFCPROPERTYSINGLEVALUE('Construction',$,IFCTEXT('Yes'),$);
#175044=IFCPROPERTYSET($,#175045,'Construction',$,(#175043));
#175045=IFCOWNERHISTORY(#175048,#175049,$,.ADDED.,$,$,$,0);
#175046=IFCPERSON($,$,$,$,$,$,$,$);
#175047=IFCORGANIZATION($,$,$,$,$);
#175048=IFCPERSONANDORGANIZATION(#175046,#175047,$);
#175050=IFCORGANIZATION($,'Org',$,$,$);
#175049=IFCAPPLICATION(#175050,$,$,'Soft');
#175051=IFCRELDEFINESBYPROPERTIES($,#175045,$,$,(#37994),#175044);
The PSet and the property are now recognized by Solibry. Constructivity even says the file is invalid with the following errors:
#175044, IfcPropertySet, GlobalId, $,
#175047, IfcOrganization, Name, $,
#175049, IfcApplication, Version, $,
#175049, IfcApplication, ApplicationFullName, $,
#175051, IfcRelDefinesByProperties, GlobalId, $,
#175053, IfcPropertySet, GlobalId, $,
#175058, IfcApplication, Version, $,
#175060, IfcRelDefinesByProperties, GlobalId, $,
Hi, guys I have some great issues with the latest version of the myget packages. The rendering of the wexBIM file after the conversion is getting worse. I am attaching a screenshot. In my last issue I posted the file that I am playing with. In one of the previous versions it was working great.
I want to ask a question
Form codeplex, there is a class name XbimMemoryModel,but i can not find it in the source code package of Xbim.XbimExtensions
// ---- code from codeplex --------------
Xbim.XbimExtensions.IModel model = null;
//get a stream to access the ifc data
Xbim.IO.IfcInputStream input = new Xbim.IO.IfcInputStream(new FileStream(ifcFileName, FileMode.Open, FileAccess.Read));
//create an empty model
model = new Xbim.XbimExtensions.XbimMemoryModel();
//load entities into the model
errors = input.Load(model);
// ---- end --------------
and this is the link
http://xbim.codeplex.com/wikipage?title=Walkthrough%20Sample%201%3A%20Export%20data%20from%20an%20IFC%20File%20to%20an%20Excel%20Spreadsheet
is this XbimMemoryModel built model fast than XbimModel?
where i can get this XbimMemoryModel
Top of tree does not build. Things like utilities also do not build, because the Nuget package for essentials is not in any repository. Trying to test webui, but I cant find a wexbim file that is representative.
I have found a bug.
When I try to validate some IFC files, a have an exception saying that :
_firstOperande of Xbim.Ifc2x3.GeometricModelResource.IfcBooleanResult is null, at lines 118 and 126.
I believe it's not supposed to be, and better write down the problem in the validation output.
Hello,
I am copying from multiple ifc files the IfcShapeRepresentations into new created model, using
destinationModel.InsertCopy(toCopy, mapping, Filter, false, false);. This is used for a tool which shall convert ifc files containing generic BuildingElementProxy to correct ifc product type, with attributes defined inside a SQL database.
This works perfect as long as destinationModel is created by XbimStoreType.InMemoryModel. If EsentDatabase is used, no referenced step instance names are getting added inside file to ifc objects added by code:
destination file output:
#228=IFCCURTAINWALLTYPE('2jOin3JCn7r8OHsq71vF9B',#4,'Curtain Wall test',$,'IfcCurtainWall',$,$,$,$,.USERDEFINED.);
#229=IFCLOCALPLACEMENT($,#193);
#230=IFCPRODUCTDEFINITIONSHAPE($,$,());
#231=IFCSHAPEREPRESENTATION($,'Body','SurfaceModel',());
Issue:
#228: should contain #229 and #230
#230: () should contain (#231)
#231 () should contain..
#231 is the object returned by InsertCopy. The references in lower nested objects are correct
Using InMemoryModel works! In debugger the objects are looking correct, with referenced objects.
Related to Nuget package 4.0.2 from 16 October 2016
Any idea?
(Note; I've edited the comment because some parts where mistakenly interpreted as references to issues from github. Claudio)
In previous Xbim version, I was able to validate my model with:
model.Validate(t.Modified(), writer);
Now with IfcStore, Validate method does not exists anymore.
What is the new way to validate my data?
Thank you for your help
The line:
_naturalOrder.Clear();
in EntityCollection class' Dispose method throws NullReference exception.
Version: Xbim.Essentials 4.0.0 from NuGet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.