- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We have a need to report the project parameters that are defined in a project, as part of a Quality Assurance tool on which we are working.
While Revit apparently won't let you create two (non-shared) project parameters with the same, case-sensitive name, for some reason it WILL let you add two Shared Parameters with identical, case-sensitive names provided they have each have different GUIDs.
Each of those parameters may be of the same or different types, in the same or different groups, and associated with the same or different categories. So yes, you could have two parameters with identical names appear in the same group of the properties pane for an element, right next to each other.
So for us to accurately report the project parameters that are defined, we have to differentiate between the two definitions. However, those definitions may be identical with the only difference (we can tell) being the shared parameter GUIDs.
But there doesn't seem to be a way to ask for the GUID of a project parameter with the API, not even when we try to resort to using Reflection. Every time we try casting the DefinitionBiningMapIterator.Key to ExternalDefinition we get null, even for parameters we know by testing are shared. It always casts to InternalDefinition, but never to ExternalDefinition. So not only can we not seem to get the GUID, there doesn't seem to be a way to even tell if it's a shared parameter or not in the first place.
What are we missing? Is there some other API methods we simply haven't found yet to get this information? How can we accurately report how the project parameters were defined by the user in the GUI?
Thanks very much for any assistance you can provide.
Solved! Go to Solution.