Dropdown list for type parameters?

Hello all,

im beginner and i want to ask something please : can i show a drop down list beside the type parameters in a wall family for example ,and the content of this drop down list is driven from an external excel file.is that possible ? i think as addin . but is it possible to change the way revit itself shows it ?

iam wondering because from what i searched i found according to claude that : Revit’s Properties Panel and Type Properties dialog are closed, native WPF controls rendered by Revit’s own UI layer. The Revit API gives you zero access to those controls. but in the mean time i remembered that pyrevit has the option to colorize tabs according to project, so that means that there is an access to modify the UI in Revit ? or am i missing something?

in the attached image above is an example i have the type parameter called roughness . i want the field beside the name to be a dropdown list , and these paramters taken from an excel file. would appreciate any help

Not without rewriting the whole properties dialog yourself as a custom command. And not worth it. You can however quickly make a command that lets you do the same specific task with a drop down or check box.
I suggest..

  • With selected Object(s)…
    • Filter out objects you don’t want.
  • Get the param from the object.
  • Get the data from Excel.
  • Use the excel data for the form.
  • Get user selected data.
  • Input the data into each selected element.
1 Like

Thank you for your response. Is there a way not to rewrite the whole Properties dialog, but to do some injections into it? My problem is how this option will be displayed.

Option 1: The Edit Type window gets modified (preferred).

Option 2: A command add-in opens a window with all parameters listed with dropdowns.

I don’t know a lot about the Revit API, to be honest. I’m just making assumptions based on the fact that I saw the pyRevit team change the color of the tabs, so I thought it might be possible to do other modifications as well.

The steps for reading inputs from Excel and overriding parameters are totally fine,thanks for the tips.

These are calls to the Revit AdWindows.dll if I’m correct. The AdWidnows.dll isn’t documented or supported, so that’s getting very far down the rabbit hole. It is basically the foundation pyRevit is built on to interact with the Revit UI.

For solutions not involving Pyrevit, you can use Key schedules for instance parameters, or Family Type parameters for type parameter dropdowns. The Family Type dropdown is a ‘hacky’ workaround it’s built for you to select different 3D geometry / symbols to use, but if you have family types loaded into the family that are named the options you want to be able to select, you can select from them. Fair warning, doing formulas with these Family Type parameters is not straight forward, you have to create a ‘static copy’ parameter of each type to test against.

Here’s a more complete snip of what the Family Type parameter setup would look like.