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

Got a IFC.STEPParameterMismatchException while deserializing a IFC2x3 file #1082

Open
simpleSketche opened this issue Mar 13, 2024 · 2 comments

Comments

@simpleSketche
Copy link

simpleSketche commented Mar 13, 2024

Any idea what might cause this?

This is the error message:
IFC.STEPParameterMismatchException: IFC.IfcClassification's constructor expects 4 parameters but 7 parameters are provided. at STEP.STEPListener.ParseConstructor(Int32 id, ConstructorContext context, Type ifcType) at STEP.STEPListener.EnterConstructor(ConstructorContext context) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at IFC.Document..ctor(String STEPfilePath, List1& errors)
at Elements.Serialization.IFC.IFCModelExtensions.FromIFC(String path, List1& constructionErrors, IList1 idsToConvert)
at IFCExtractor.Ifc.LoadIFC(String ifcName) `

Additional info:

  • Hypar.Elements, 2.1.0
  • Hypar.Elements.Serialization.IFC, 2.1.0
  • The same IFC file can be opened in other IFC viewers, so the file should be ok. -- - The file is directly exported from Revit.
@simpleSketche
Copy link
Author

Update:
So I also tried IFC4, and looks like got different error:

System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at STEP.STEPListener.GetConstructorForType(Type required, List1& ctorChain, Type fromSTEP)
at STEP.STEPListener.ParseCollection(Type t, CollectionContext value)
at STEP.STEPListener.ParseConstructor(Int32 id, ConstructorContext context, Type ifcType)
at STEP.STEPListener.EnterConstructor(ConstructorContext context)
at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
at IFC.Document..ctor(String STEPfilePath, List1& errors) at Elements.Serialization.IFC.IFCModelExtensions.FromIFC(String path, List1& constructionErrors, IList1 idsToConvert) at IFCExtractor.Ifc.LoadIFC(String ifcName)

@simpleSketche
Copy link
Author

I found @ikeough posted this PR for IFC4 last year, and I have had the similar parsing errors appearing in the console window. I'm guessing it's relevant to the error I'm having here?

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

No branches or pull requests

1 participant