Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CustomExporter - Change Export Order

4 REPLIES 4
Reply
Message 1 of 5
preynoldsarch
311 Views, 4 Replies

CustomExporter - Change Export Order

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.

4 REPLIES 4
Message 2 of 5
arnostlobel
in reply to: preynoldsarch

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

Arnošt Löbel
Message 3 of 5
jeremytammik
in reply to: arnostlobel

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 5
preynoldsarch
in reply to: arnostlobel

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

 

Message 5 of 5

Hmm... this is not a bad idea... I guess I'd probably have to create a custom collection for it though, considering all the data that there is to store.... but yeah, this could certainly work. Thank you for the suggestion.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community