XbimGeometry
XbimGeometry copied to clipboard
v6: Can't use Xbim3DModelContext without registering services with services.AddXbimGeometryEngine()
Under v6 GE, invoking
var context = new Xbim3DModelContext(model);
Throws InvalidOperationException: An implementation of IXbimGeometryServicesFactory could not be foundEnsure you have registered the GeometryEngine with services.AddXbimGeometryEngine()
The workaround is to add the following at application startup
Xbim.Common.Configuration.XbimServices.Current.ConfigureServices(s => s.AddXbimGeometryServices());
We should look to streamline this so ModelScene does this for developers. The common challenge is that the Services Container may have been constructed before any initialisation code can be invoked. Alternatively, make the error much more explicit about the corrective action.