IFC export user defined property sets

IFC export user defined property sets

chas.barrott
Contributor Contributor
455 Views
1 Reply
Message 1 of 2

IFC export user defined property sets

chas.barrott
Contributor
Contributor

Hi all....Is there some c# code to export the user deined property sets? The property sets work fine when I export IFC the normal way in Revit but ideally I want them to be exported when using our custom IFC exporting tool. I made an exporter tool which automatically loads familes and makes an IFC of each individual model, hence why I want to use this instead of doing it the manual way. 

screenshot.png

0 Likes
Accepted solutions (1)
456 Views
1 Reply
Reply (1)
Message 2 of 2

chas.barrott
Contributor
Contributor
Accepted solution

Quick update...I managed to find out how this is done, after adding Autodesk.IFC.Export.UI assembly I could get access to all of the IFC export settings and define them as needed. Always more satisfying when you figure it out yourself (google help of course).

 

BIM.IFC.Export.UI.IFCExportConfiguration myIfcConfiguration = BIM.IFC.Export.UI.IFCExportConfiguration.CreateDefaultConfiguration();

IFCExportOptions ifcOptions = new IFCExportOptions();

myIfcConfiguration.VisibleElementsOfCurrentView = true;
myIfcConfiguration.IFCVersion = IFCVersion.IFC4RV;
myIfcConfiguration.ExportUserDefinedParameterMapping = true;
myIfcConfiguration.ExportUserDefinedParameterMappingFileName = ifcMappingFile;
myIfcConfiguration.ExportUserDefinedPsets = true;
myIfcConfiguration.ExportUserDefinedPsetsFileName = myPsets;
myIfcConfiguration.ExportIFCCommonPropertySets = false;

myIfcConfiguration.UpdateOptions(ifcOptions, view.Id);
doc.Export(folderName, fileName, ifcOptions);

0 Likes