Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error converting IFC file to WeXBim: item with the same key has already been added #30

Open
MarcoGiorgi opened this issue Apr 27, 2018 · 0 comments
Labels

Comments

@MarcoGiorgi
Copy link

I'm trying to convert an IFC file produced by Revit.
I'm using the example code taken from the website.
I get the following parser error:

[ArgumentException: An item with the same key has already been added.]
   System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +12600149
   Xbim.IO.Memory.EntityCollection.InternalAdd(IPersistEntity entity) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Memory\EntityCollection.cs:216
   Xbim.IO.Memory.<>c__DisplayClass68_0.<LoadStep21>b__0(String name, Nullable`1 label, Boolean header, Int32[]& ints) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Memory\MemoryModel.cs:519
   Xbim.IO.Step21.XbimP21Parser.SetType(String entityTypeName) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Step21\XbimP21Parser.cs:196
   Xbim.IO.Parser.P21Parser.DoAction(Int32 action) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Step21\Parser\StepP21Parser.y:137
   QUT.Gppg.ShiftReduceParser`2.Reduce(Int32 ruleNumber) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Step21\Parser\ShiftReduceParserCode.cs:330
   QUT.Gppg.ShiftReduceParser`2.Parse() in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Step21\Parser\ShiftReduceParserCode.cs:263
   Xbim.IO.Memory.MemoryModel.LoadStep21(Stream stream, Int64 streamSize, ReportProgressDelegate progDelegate) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Memory\MemoryModel.cs:535
   Xbim.IO.Memory.MemoryModel.LoadStep21(String file, ReportProgressDelegate progDelegate) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.IO\Memory\MemoryModel.cs:550
   Xbim.Ifc.IfcStore.Open(String path, XbimEditorCredentials editorDetails, Nullable`1 ifcDatabaseSizeThreshHold, ReportProgressDelegate progDelegate, XbimDBAccess accessMode) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.Ifc\IfcStore.cs:362

Inspecting the exception in the source, I found it's raised at line 196 of Xbim.IO/Step21/XbimP21Parser.cs:
p21.Entity = EntityCreate(entityTypeName, p21.EntityLabel, InHeader, out reqProps);

The IFC file is correctly open by other IFC viewer. Is there a way to solve this issue? As I'm new to xBIM, please just give a direction on how to solve it, and I'll do my tries.

the IFC file can be found here: http://www.brainsengineering.com/bim/mep2.zip
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants