Extract Shared Parameter Description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
This is the last hurdle for me in completing a rough V1.0 and so far I have not been able to determine whether or not the data I need is accessible.
I am working on a project where I need extract the description data from a shared parameter within a family instance. I have been able to access all of the other parameter information I need, but this one piece of data keeps eluding me.
The issue is that when I try to cast my parameter from an internal parameter to the external definition it comes back as 'null' thus not allowing me to access the desired Description property.
Questions:
Can the Description of a shared parameter be accessed using only the family?
If so, what would be the best way to access and extract the data?
Version: Revit 2018
Language: C#
When the program gets to the "ExternalDefinition def" line it shows the property as 'null'.
foreach (Parameter p in sharedParams)
{
ExternalDefinition def = p.Definition as ExternalDefinition
file.WriteLine($"Parameter Name: {p.Definition.Name} Parameter Description: {def.Description}");
}