Revit 中的对话框

DialogBox in Revit

我想问一下是否有人可以提供指导或一些 link 在 revit 中使用 C# 创建对话框的相关信息。

基本上,我想创建一个对话框,当用户按下 revit 功能区上的按钮时,它会出现在屏幕上。在对话框中,他必须能够输入信息,并且该信息才能用于分析。

谢谢!!!

前段时间我写了一系列关于如何在 Revit 中编写外部命令的帖子:

  1. http://archi-lab.net/revit-beyond-macros-building-your-tools-as-external-commands/
  2. http://archi-lab.net/building-revit-plug-ins-with-visual-studio-part-one/
  3. http://archi-lab.net/building-revit-plug-ins-with-visual-studio-part-two/
  4. http://archi-lab.net/building-revit-plug-ins-with-visual-studio-part-three/
  5. http://archi-lab.net/create-your-own-tab-and-buttons-in-revit/

一般来说,我会建议查看他们的官方文档和 SDK 中的示例:https://www.autodesk.com/developer-network/platform-technologies/revit

他们那里有一些不错的视频。

您可以使用 window 及其代码和逻辑作为自定义对话框。请参阅此处的 "custom dialog" 部分:Custom Dialog Boxes (wpf) or here for windows forms: Dialog Boxes in Windows Forms。当用户按下功能区按钮时,可以显示该对话框。