Search code examples
c#ifcautodesk-navisworksxbim

No IFC projects found in file in IFC file created by xbim toolkit


I've refered a "HelloWall" sample program from XBim samples. The output IFC file seems to be ok. but when I try to open that IFC file in Autodesk Navisworks it gave me following error -

General ERROR: There were no IfcProjects found in the file. Aborting import.

General ERROR: There was an error reading the IFC file: Error whlie processing reference. Aborting import.

General ERROR: Error whlie processing reference

I've created project by means of following code -

var model = IfcStore.Create(editor, XbimSchemaVersion.Ifc4, XbimStoreType.InMemoryModel);

        using (var txn = model.BeginTransaction("project"))
        {
            //create a project
            var project = model.Instances.New<IfcProject>();
            //set the units to SI (mm and metres)
            project.Initialize(ProjectUnits.SIUnitsUK);
            project.Name = "ICF Model.nwc";
            
            txn.Commit();
        }

Can please someone help me to open this file in Naviswork?

Created IFC file is -

ISO-10303-21;
HEADER;
FILE_DESCRIPTION ((''), '2;1');
FILE_NAME ('', '2022-08-12T13:45:00', (''), (''), 'Processor version 5.1.0.0', 'Xbim.IO.MemoryModel', '');
FILE_SCHEMA (('IFC4'));
ENDSEC;
DATA;
#1=IFCPROJECT('0t5Z7nthP2Pv$ovjzne6D$',#2,'ICF Model.nwc',$,$,$,$,(#19,#22),#7);
#2=IFCOWNERHISTORY(#5,#6,$,.ADDED.,1660311931,$,$,0);
#3=IFCPERSON($,'Sush','Sush',$,$,$,$,$);
#4=IFCORGANIZATION($,'xyz Pvt Ltd',$,$,$);
#5=IFCPERSONANDORGANIZATION(#3,#4,$);
#6=IFCAPPLICATION(#4,'1.0','IFC creator','B14F5359 - B769 - 4B8C - A0E0 - FDBD68D1FA9D');
#7=IFCUNITASSIGNMENT((#8,#9,#10,#11,#12,#13,#14,#15,#16));
#8=IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.);
#9=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.);
#10=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.);
#11=IFCSIUNIT(*,.SOLIDANGLEUNIT.,$,.STERADIAN.);
#12=IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.);
#13=IFCSIUNIT(*,.MASSUNIT.,$,.GRAM.);
#14=IFCSIUNIT(*,.TIMEUNIT.,$,.SECOND.);
#15=IFCSIUNIT(*,.THERMODYNAMICTEMPERATUREUNIT.,$,.DEGREE_CELSIUS.);
#16=IFCSIUNIT(*,.LUMINOUSINTENSITYUNIT.,$,.LUMEN.);
#17=IFCCARTESIANPOINT((0.,0.,0.));
#18=IFCAXIS2PLACEMENT3D(#17,$,$);
#19=IFCGEOMETRICREPRESENTATIONCONTEXT('Building Model','Model',3,1.E-05,#18,$);
#20=IFCCARTESIANPOINT((0.,0.));
#21=IFCAXIS2PLACEMENT2D(#20,$);
#22=IFCGEOMETRICREPRESENTATIONCONTEXT('Building Plan View','Plan',2,1.E-05,#21,$);
#23=IFCBUILDING('3tmrRpSyvE4v1N9Jg$bYtw',#2,'New Building',$,$,#24,$,$,.ELEMENT.,$,$,$);
#24=IFCLOCALPLACEMENT($,#25);
#25=IFCAXIS2PLACEMENT3D(#26,$,$);
#26=IFCCARTESIANPOINT((0.,0.,0.));
#27=IFCRELAGGREGATES('1PmWqkE2D7P8wxZFkDc3Ic',#2,$,$,#1,(#23));
#28=IFCBUILDINGSTOREY('0dqsvK_2z8w90C6SoJ5S1Q',#2,'Default storey',$,$,$,$,$,$,0.);
#29=IFCWALLSTANDARDCASE('0aBuqP2rr8$896T$XLKaKb',#2,'A Standard rectangular wall',$,$,#43,#42,$,$);
#30=IFCRECTANGLEPROFILEDEF(.AREA.,$,#32,100.,400.);
#31=IFCCARTESIANPOINT((0.,100.));
#32=IFCAXIS2PLACEMENT2D(#31,$);
#33=IFCEXTRUDEDAREASOLID(#30,#36,#34,1000.);
#34=IFCDIRECTION((0.,0.,1.));
#35=IFCCARTESIANPOINT((0.,0.,0.));
#36=IFCAXIS2PLACEMENT3D(#35,$,$);
#37=IFCSHAPEREPRESENTATION(#19,'Body','SweptSolid',(#33));
#38=IFCSTYLEDITEM(#33,(#39),$);
#39=IFCSURFACESTYLE($,.BOTH.,(#40));
#40=IFCSURFACESTYLERENDERING(#41,$,$,$,$,$,$,$,.BLINN.);
#41=IFCCOLOURRGB('red',1.,0.,0.);
#42=IFCPRODUCTDEFINITIONSHAPE($,$,(#37,#56));
#43=IFCLOCALPLACEMENT($,#44);
#44=IFCAXIS2PLACEMENT3D(#35,#46,#45);
#45=IFCDIRECTION((0.,1.,0.));
#46=IFCDIRECTION((0.,0.,1.));
#47=IFCMATERIAL('Clay',$,$);
#48=IFCMATERIALLAYERSETUSAGE(#49,.AXIS2.,.NEGATIVE.,150.,$);
#49=IFCMATERIALLAYERSET((#50),$,$);
#50=IFCMATERIALLAYER(#47,10.,$,$,$,$,$);
#51=IFCRELASSOCIATESMATERIAL('2VALhDZtj41QxuMJosbmLu',#2,$,$,(#29),#48);
#52=IFCPRESENTATIONLAYERASSIGNMENT('some ifcPresentationLayerAssignment',$,(#37),$);
#53=IFCPOLYLINE((#54,#55));
#54=IFCCARTESIANPOINT((0.,0.));
#55=IFCCARTESIANPOINT((4000.,0.));
#56=IFCSHAPEREPRESENTATION(#19,'Axis','Curve2D',(#53));
#57=IFCQUANTITYLENGTH('IfcQuantityArea:Area','',#58,100.,$);
#58=IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.);
#59=IFCCONTEXTDEPENDENTUNIT(#60,.LENGTHUNIT.,'Elephants');
#60=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);
#61=IFCQUANTITYCOUNT('IfcQuantityCount:Elephant',$,#59,12.,$);
#62=IFCCONVERSIONBASEDUNIT(#65,.LENGTHUNIT.,'Inch',#63);
#63=IFCMEASUREWITHUNIT(IFCRATIOMEASURE(25.4),#64);
#64=IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.);
#65=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);
#66=IFCQUANTITYLENGTH('IfcQuantityLength:Length','',#62,24.,$);
#67=IFCELEMENTQUANTITY('1nvxj0Nnj5n8qfhyzrJY9J',#2,'Test:IfcElementQuantity','Measurement quantity',$,(#57,#61,#66));
#68=IFCRELDEFINESBYPROPERTIES('1DB4sZX0z05QH_e2Xcn6hS',#2,'Area Association','IfcElementQuantity associated to wall',(#29),#67);
#69=IFCPROPERTYSINGLEVALUE('IfcPropertySingleValue:Time','',IFCTIMEMEASURE(150.),#70);
#70=IFCSIUNIT(*,.TIMEUNIT.,$,.SECOND.);
#71=IFCPROPERTYENUMERATEDVALUE('IfcPropertyEnumeratedValue:Music',$,(IFCLABEL('Do'),IFCLABEL('Re'),IFCLABEL('Mi')),#72);
#72=IFCPROPERTYENUMERATION('Notes',(IFCLABEL('Do'),IFCLABEL('Re'),IFCLABEL('Mi'),IFCLABEL('Fa'),IFCLABEL('So'),IFCLABEL('La'),IFCLABEL('Ti')),$);
#73=IFCPROPERTYBOUNDEDVALUE('IfcPropertyBoundedValue:Mass','',IFCMASSMEASURE(5000.),IFCMASSMEASURE(1000.),#74,$);
#74=IFCSIUNIT(*,.MASSUNIT.,.KILO.,.GRAM.);
#75=IFCPROPERTYTABLEVALUE('IfcPropertyTableValue:Sound',$,(IFCREAL(100.),IFCREAL(200.),IFCREAL(400.),IFCREAL(800.),IFCREAL(1600.),IFCREAL(3200.)),(IFCREAL(20.),IFCREAL(42.),IFCREAL(46.),IFCREAL(56.),IFCREAL(60.),IFCREAL(65.)),$,$,#76,$);
#76=IFCCONTEXTDEPENDENTUNIT(#77,.FREQUENCYUNIT.,'dB');
#77=IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0);
#78=IFCPROPERTYLISTVALUE('IfcPropertyListValue:Colours',$,(IFCLABEL('Red'),IFCLABEL('Green'),IFCLABEL('Blue'),IFCLABEL('Pink'),IFCLABEL('White'),IFCLABEL('Black')),$);
#79=IFCMATERIAL('Brick',$,$);
#80=IFCPROPERTYREFERENCEVALUE('IfcPropertyReferenceValue:Material',$,$,#79);
#81=IFCMATERIALLIST((#79,#82,#83));
#82=IFCMATERIAL('Cavity',$,$);
#83=IFCMATERIAL('Block',$,$);
#84=IFCMATERIALLAYER(#79,100.,$,$,$,$,$);
#85=IFCPROPERTYREFERENCEVALUE('IfcPropertyReferenceValue:MaterialLayer',$,$,#84);
#86=IFCDOCUMENTREFERENCE('c://Documents//TheDoc.Txt',$,'Document',$,$);
#87=IFCPROPERTYREFERENCEVALUE('IfcPropertyReferenceValue:Document',$,$,#86);
#88=IFCREGULARTIMESERIES('Regular Time Series','Time series of events','2015-02-14T12:01:01','2015-05-15T12:01:01',.CONTINUOUS.,.MEASURED.,$,$,604800.,());
#89=IFCPROPERTYREFERENCEVALUE('IfcPropertyReferenceValue:TimeSeries',$,$,#88);
#90=IFCPOSTALADDRESS($,$,$,'Room 101',('12 New road','DoxField'),$,'Sunderland',$,'DL01 6SX',$);
#91=IFCPROPERTYREFERENCEVALUE('IfcPropertyReferenceValue:Address',$,$,#90);
#92=IFCTELECOMADDRESS($,$,$,('01325 6589965'),$,$,('[email protected]'),$,$);
#93=IFCPROPERTYREFERENCEVALUE('IfcPropertyReferenceValue:Telecom',$,$,#92);
#94=IFCPROPERTYSET('2b3Fwudw51yBaOjJU5HBNI',#2,'Test:IfcPropertySet','Property Set',(#69,#71,#73,#75,#78,#80,#85,#87,#89,#91,#93));
#95=IFCRELDEFINESBYPROPERTIES('0EFQgSLfb5oRgtvm3FuM8n',#2,'Property Association','IfcPropertySet associated to wall',(#29),#94);
#96=IFCRELAGGREGATES('2h1VSG8M96JviAUFYcsscp',#2,$,$,#23,(#28));
#97=IFCRELCONTAINEDINSPATIALSTRUCTURE('0SSu2IeKzE3OgwuORLeUji',#2,$,$,(#29),#28);
ENDSEC;
END-ISO-10303-21;


Solution

  • I'm one of the xbim Toolkit developers and as far as I know, this file is perfectly valid IFC. You can try to open it in free IFC viewers and it should be OK. But it seems like Navisworks is quite picky when it comes to IFC and has settings where it expects certain structures and conventions used in Revit IFC exporter: https://knowledge.autodesk.com/support/navisworks-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Disappearing-IFC-at-appending-IFC-to-Navisworks-2019.html

    You may want to tinker with these IFC importer options:

    Or these ones in the more recent versions:

    The page also suggests that

    It may be necessary to install the IFC for Autodesk® Revit® in corresponding version. See the Autodesk App Store: IFC for Autodesk® Revit® 2021 or other version. For Revit 2022 : IFC 2022