Hello all. I'm new to teh Revit API, and am trying my hand at generating a custom Collada exporter based on the one outlined here.
My problem is that there is a very specific order I'm trying to export elements in, but I cannot seem to find a way to change the export order to anyhting other than by element ID.
To be more specific, I'm trying to export something that looks like this:
<Doors>
<3'-0" Doors>
<Individual door instance>
</instance>
</3'-0" Doors>
</Doors>
<Walls>
<Type A Walls>
<instance>
</instance>
</Type A Walls>
<Type B Walls>
<instance>
</instance>
</Type B Walls>
</Walls>
Any help would be greatly apprecciated. Thanks.
hello preynoldsarh:
Unfortunately there is no way to prescribe Revit in which order it should process elements during export. There is an internal logic that dictates the order in which elements must be processed (some must be processed several times, in fact). If your application desires a different order, for whatever reason, you will have to do your export in several runs – first pre-fly the export to find what elements are coming, and then do the actual run and position incoming elements to their respective slots according to the internal logic of your exporter.
Arnošt Löbel
Sr. Principal Engineer
Autodesk, Revit R&D
alternatively, you could just execute one single run of the exporter and save all the data you receive in a collection that you can sort as desired. next, sort the collection, then process as needed.
cheers,
jeremy
This is the route I've been experimenting with, but I've run into a bit of a wall (literally >_>). I cannot figure out how to determine if there are any instances of a given wall type in the scene: Selecting all instances of a wall