xBimTeam / XbimExchange

XbimExchange contains several COBie schemas and serialisation functions as well as the Model Validation library adopted by theNBS digital toolkit.
https://xbimteam.github.io/
Other
46 stars 41 forks source link

Error in COBieBuilder.cs #12

Closed ivanstef closed 7 years ago

ivanstef commented 8 years ago

I receive the following error while running the CobieExport functionality:

       var path = OpenFile(fileId, FileFormat.Ifc);
        var credentials = ApplicationCredentials.XbimEditorCredentials;

        using (var ifcModel = IfcStore.Open(path, credentials, -1))
        {
            using (var cobie = new CobieModel())
            {
                using (var transaction = cobie.BeginTransaction("Create COBie"))
                {
                    var exchanger = new IfcToCoBieExpressExchanger(ifcModel, cobie);
                    exchanger.Convert();
                    transaction.Commit();
                }

                var cobieExportPath = HostingEnvironment.MapPath(
                    $"~/App_Data/Temp/{fileName}.xlsx");

                string report;
                cobie.ExportToTable(cobieExportPath, out report);

                if (string.IsNullOrEmpty(report))
                    return cobieExportPath;

                return report;
            }
        }

The exception:

An exception of type 'System.MissingMethodException' occurred in Xbim.COBie.dll but was not handled in user code

Additional information: Method not found: 'System.Collections.IEnumerator NPOI.SS.UserModel.IRow.GetEnumerator()'.

on line 74 in COBieBuilder.cs

COBieWorkbook wbook = deSerialiser.Deserialise();

ivanstef commented 8 years ago

After the latest updates the error is in XbimMappings.cs, Line 105

An exception of type 'System.MissingMethodException' occurred in Xbim.Exchanger.dll but was not handled in user code

Additional information: Method not found: 'Boolean Xbim.CobieExpress.CobieRole.op_Equality(Xbim.CobieExpress.CobieRole, Xbim.CobieExpress.CobieRole)'.

SteveLockley commented 7 years ago

This was caused by duplicate versions of NPOI being installed by the Nuget packager, it is now fixed in the develop branch