Hi Jeremy,
Thank you for the link: http://thebuildingcoder.typepad.com/blog/2012/01/export-walls-and-floors-to-sat.html with the sample code. The sample code in the link was very helpful for me to export all walls and floors to individual SAT files.
Instead of extracting a specific element (like wall or floor), I would like to hide all unnecessary geometry 1D/2D elements (like the level element (lines + text), etc) from the View3D.
In the sample code (I translated it to C++/CLI) from the link:
FilteredElementCollector^ col = gcnew
@ted.liang wrote:
I would like to save each geometry element in a view3D object into separate SAT files with the following method:
Document.Export Method:
bool Export(
String^ folder,
String^ name,
ICollection<ElementId^>^ views,
SATExportOptions^ options
)
The above function requires the collection of view elements. My question is:
How can I implicitly create view elements for each geometry element and save them into separate SAT files? I will appreciate if you have a simple sample code (C++ or C#) to show me how to do it.
Thanks,
Ted Liang
FilteredElementCollector(doc);
col->WhereElementIsNotElementType()->OfCategory(BuiltInCategory::OST_Walls);
The above code can collect all wall elements by passing BuiltInCategory::OST_Walls. However, I checked BuiltInCategory and found Revit have 1004 different build-in categories that are virtually impossible to use BuiltInCategory to extract all modelable 3D elements. Do you have a shortcut that can hide all non-geometry elements as well as 1D/2D elements from the View3D object before I can export 3D elements to SAT files?