Transfer revit to rhino

Hello.
I have a Revit model with many phases.

I want to transfer the Revit model into rhino and organize it in layers and sublayers.
Each main layer should have the name of a rhino phase, e.g. existing, excavation etc.
Each face contains multiple Revit categories. E.g. phase 5 in Revit contains some beams a stair and some floors.
I want these to be the sublayers of the main layer.
E.g. in rhino for Revit phase 5 i will have:

groundFloor beams stair slab (main layer)
beams (sublayer with all beams created in phase 5)
stair (sublayer with all stairs created in phase 5)
floors (sublayer with all floors created in phase 5)

I am able to query and filter the Revit model by category, but I want to start by filtering by phase. Is that possible? I understand that phase is a parameter for all Revit categories.

Thanks for any help.

Hi Ar00302,

Here is one way.

Rh8-Category-Phase-ToLayers.gh (16.4 KB)
R24-Phases-Category.rvt (11.3 MB)

I changed the post category to Rhino.Inside - Revit. This is where anything Revit related belongs. Thanks

Thank you very much. It’s a bit complicated for me and I tried hard to understand. I made two small modifications:

First to be able to get the geometry and not blocks to Rhino:

And second to create layers and sublayers:

Thanks again

Is there a way to short layers in rhino same as phases in revit?

Sort?

Offhand I don’t have a way to sort either.

Are looking to reference in a particular order? Easier to Sort in GH than change the documents.

in Revit, left to phase name is the phase order. This is the order i want in rhino too. Can we read this Information?
A workaround id not is to place a number before phase name in revit. e.g. 0-phase 1, 1-phase whatever …e.t.c.

Yes, but are the Phase fixed? Are new ones going to be added, re-arranged?

If i place manual the number in the start of name face, then i should always renumber if i add a phase between which is not efficient. But if we can read the number left to the phase in Revit, then the procedure will be automatic. Can we read this is the question. Or can we make a custom component using Revit API to do that? e.g in my screenshot New Construction is number 28. If i add a phase before then the number will be 29.
Thanks

Can you clarify this a bit more, not sure i’m following correctly. Thanks