SoFunction
Updated on 2025-03-08

Revit API gets the internal parameter name instance code of variable


//Get the internal reference name
[Transaction()]
[Regeneration()]
public class cmdGetBuiltInParam : IExternalCommand
{
    public Result Execute(ExternalCommandData cmdData, ref string msg, ElementSet elements)
    {
        UIDocument uiDoc = ;
        Document doc = ;
        Selection sel = ;

Duct duct = ((, "select")) as Duct;
        foreach (Parameter p in )
        {
if ( == "height")
            {
                BuiltInParameter biParam = (BuiltInParameter);
                ("builtIn", ());
            }
        }

        return ;
    }
}