qin
2024-09-28 e358beb08f5be49703009b64f058ecfbcfeefbd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System;
using System.Diagnostics;
 
namespace ClassLibrary1
{
    [Transaction(TransactionMode.Manual)]
    public class Export : IExternalCommand
    {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            //var form = new Form_SystemSelect(commandData);
            //var revitHandle = Autodesk.Windows.ComponentManager.ApplicationWindow;
            var a = 100*20;
            TaskDialog.Show("错误", $"{a}");
 
            //实例WPF窗体
            var revitHandle = Process.GetCurrentProcess().MainWindowHandle;
            //form.Show(new WindowHandle(revitHandle));
 
 
            return Result.Succeeded;
        }
    }
}