Revit api. Retrieve all parameters and categories #183
Nice3point
started this conversation in
Show and tell
Replies: 1 comment
-
@Nice3point it is awesome ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I recently came across a problem from my business partner who wanted to get all the built-in Revit parameters to extract metadata such as data type, units, storage type, etc. As we know, this is not possible using Autodesk's public API.
Similar situation with categories, we can't get all the built-in categories, the only available way is to get them from the document settings, but it contains a very truncated list
Solution
We can use private code using reflection and pointers, we only need a document.
The point of the method is not to get them but create it.
Example code to get all parameters:
Example code to get all categories:
Result
As a result, we have created all the parameters and all the categories of the entire Enum
Parameters:
Categories:
Limitations
Created parameters have no binding to the element, and consequently have no value, only metadata
Beta Was this translation helpful? Give feedback.
All reactions