Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66666

Re: Exporting windows dimensions to a existing excel file.

$
0
0

Family Symbols will give you all the types of windows in the project. If you want to get the instances you need to adjust your collector a little bit to collect the instances and not the types.

 

Something like this:

FilteredElementCollector windows = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Windows);
            windows.OfClass(typeof(FamilyInstance));

As far as exporting that data to Excel, the building coder has a great article that I was able to use to do pretty much the same thing you're doing:

http://thebuildingcoder.typepad.com/blog/2012/09/exporting-parameter-data-to-excel.html

 

My code ended up something like this:

Microsoft.Office.Interop.Excel.Application myExcel = new Microsoft.Office.Interop.Excel.Application();
                myExcel = (Microsoft.Office.Interop.Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
                Microsoft.Office.Interop.Excel.Workbook myWorkBook = myExcel.ActiveWorkbook;
                VAVsheet = myWorkBook.Worksheets["Revit Data"];

 

Hope that helps.


Viewing all articles
Browse latest Browse all 66666

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>