xBimTeam / XbimGeometry

XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
https://xbimteam.github.io/
Other
260 stars 131 forks source link

An implementation of IXbimGeometryServicesFactory could not be found #424

Closed neovinhtru closed 1 year ago

neovinhtru commented 1 year ago

Hi I am working on Converting IFC to a webxBim file on .Net Core 6 with feature/netcore branch. but I create Xbim3DModelContext(model) I am facing the exception "An implementation of IXbimGeometryServicesFactory could not be found\n\nEnsure you have registered the GeometryEngine with services.AddXbimGeometryEngine()". image Thank you in advance!

martin1cerny commented 1 year ago

Have you tried to do what the message suggests?

neovinhtru commented 1 year ago

@martin1cerny . Yes, I have. I added with code

image

But isBuilt variable always is true.

image Do you have any suggestions?

Thanks!

andyward commented 1 year ago

You need to call the DI code at application boot up. Try putting that line in your App.cs or an equivalent Startup

namnguyen0705 commented 1 year ago

Thank you! @andyward. I tested and it is working as well.