- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We are developing the Addin for Revit 2016 (in C#) and we have got an issue with reading element parameters.
We have some instance of Element in the drawing (for example Door):
Element e
Also we have the name of the parameter:
string parameterToFind = "MyParameterName";
We read the parameter as follows:
Parameter p = e.LookupParameter(parameterToFind);
This code works properly for these parameter variants:
- Shared parameter – Type
- Project parameter – Type
We are not able to read these parameter variants:
- Shared parameter – Instance
- Project parameter – Instance
The collection e.Paramters does not contains any Instance parameter and we could not read its value. The method LookupParameter returns null.
Please, could you advise how to read instance parameter from particular element?
Particularly we need this method:
public string GetParameterValue(Element e, string parameterName)
{
}
Or
public Parameter GetParameter(Element e, string parameterName)
{
}
Solved! Go to Solution.