Retrieve dimension types in revit


Does anyone here know how to filter out all dimension types in a Revit template via Revit’s API.

I can filter out all dimensions in the project but not all types in my template file.


Hi @mikael.z ,

Did you try this to get the types?

Hi @ MartinSpence,

Thank you for your reply!
Yes I have!
What I want to find out are which DimensionTypes are in my template file via Python and the Revit API:

Can you elaborate on what you are trying to achieve?

I don’t believe the API will help you isolate pre-defined types in a template from project specific types.

This could be done by comparing names from an external file though.

I recall that there are some points in the RVT which maintain the template which was used to create the file, with this you can leverage the API to open said template and pull the dimension types from there, and then compare that to the list of dimension types in the file itself. I’ll see if I can find where that is stored (Basic file info? Transmission data? Journal? Something else?). Note that it would only be a ‘moment in time’ snapshot, so if there was a change between when it started and now things wouldn’t align.

1 Like


Thank you guys for your answers!

Using nodes, this does the job easily:

Maybe I phrased the question in a bad way. Should have included the picture when I asked the question.
What do you think? Is there a solution?