43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using Autodesk.Revit.Attributes;
|
|
using Autodesk.Revit.DB;
|
|
|
|
using Nice3point.Revit.Toolkit.External;
|
|
|
|
using System;
|
|
|
|
using System.Windows;
|
|
|
|
|
|
namespace Szmedi.RvKits.ModelManager
|
|
{
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
|
public class ResolveCivilConnections : ExternalCommand
|
|
{
|
|
public override void Execute()
|
|
{
|
|
//AssemblyLoaderHelpers loader = new(GlobalVariables.DirAssembly);
|
|
//loader.HookAssemblyResolve();
|
|
try
|
|
{
|
|
ResolveCivilConnectViewModel viewModel = new(UiDocument);
|
|
ResolveCivilConnectWin win = new(viewModel);
|
|
_ = new System.Windows.Interop.WindowInteropHelper(win)
|
|
{
|
|
Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle
|
|
};
|
|
win.Show();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
LogAssists.WriteLog(ex.StackTrace);
|
|
}
|
|
//finally
|
|
//{
|
|
// loader.UnhookAssemblyResolve();
|
|
//}
|
|
}
|
|
}
|
|
}
|