Revit API building: How to put drop down list in a dialog box?

1.6k views Asked by At

I am using C# to build an API for this software called Revit Autodesk.

I want to show a dialogue box which shows a drop down list, then user can choose from that list.

I initiated a new object known as

 TaskDialog

It shows me a dialogue box, but I can't add a dropdown list to it.

Any help?

1

There are 1 answers

0
Colin Stark On BEST ANSWER

You can't add a dropdown list to a TaskDialog. TaskDialog is a class provided by the Revit API, so there are only certain aspects of it that can be customized by the user. Check the Revit API documentation to see what these are.

If you need to construct a dialog box that has a dropdown list, you will need to create a custom form yourself. To accomplish what you are trying to do, you should look into either WinForms or WPF which are both user interface libraries that are part of the .NET Framework. Both are compatible with Revit.