In the previous article Parameters in RevitAPI I used the get_Parameter overload, which has been obsolete since RevitAPI 2015. While Revit 2018 still keeps it for compatibility, it may be removed in a future release.

The Problem
The recommended replacement is LookupParameter — but this only searches parameters by name. When you need to retrieve a specific BuiltInParameter by its enum value, you need a different approach.
Solution
Iterate over element.Parameters using the enumerator and check each parameter's definition. If the definition is an InternalDefinition, compare its BuiltInParameter property against the target enum value:
csharp
// The old get_Parameter overload is obsolete since Revit 2015.
// LookupParameter only searches by name.
// To find a BuiltInParameter, iterate Parameters and check InternalDefinition:
public static Parameter GetParameterByBuiltIn(Element element, BuiltInParameter builtInParam)
{
foreach (Parameter param in element.Parameters)
{
if (param.Definition is InternalDefinition internalDef
&& internalDef.BuiltInParameter == builtInParam)
{
return param;
}
}
return null;
}
// Usage
Parameter markParam = GetParameterByBuiltIn(element, BuiltInParameter.ALL_MODEL_MARK);
string markValue = markParam?.AsString();