Message 1 of 1
Convert Autodesk.Revit.DB.Element to IFC file

Not applicable
10-18-2013
09:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone
I am trying to get the coordinates from a specific area of a building information model in an IFC file.
I have managed so far to write the code for getting the area as an Autodesk.Revit.DB.Element .
How can I export this to an IFC file now ?
I suppose that I must somehow use Autodesk.Revit.DB.IFC.ExporterIFC and Autodesk.Revit.DB.IFC.IFCFile but since I am not familiar with C# and the Revit API I don't know exactly how to do this ...
Any ideas ?
This is the code I have so far :
//Get application and document objects UIApplication uiApp = commandData.Application; Document doc = uiApp.ActiveUIDocument.Document; //Define a Reference object to accept the pick result. Reference pickedRef = null; //Pick a group. Selection sel = uiApp.ActiveUIDocument.Selection; pickedRef = sel.PickObject(ObjectType.Element, "Please select the pit"); Element elem = doc.GetElement(pickedRef); Group group = elem as Group; // Export Group in IFC file to get the coordinates of the pit. -- pending
Thank you 🙂