39 lines
980 B
C#
39 lines
980 B
C#
using Autodesk.Revit.Attributes;
|
|
using Autodesk.Revit.DB;
|
|
|
|
using Nice3point.Revit.Toolkit.External;
|
|
|
|
using System;
|
|
|
|
using System.Windows.Interop;
|
|
|
|
using Szmedi.RvKits.FamilyLibrary;
|
|
|
|
namespace Szmedi.RvKits.FamilyTools
|
|
{
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
|
public class LocalFamsLibCmd : ExternalCommand
|
|
{
|
|
public override void Execute()
|
|
{
|
|
//AssemblyLoaderHelpers loader = new(GlobalVariables.DirAssembly);
|
|
//loader.HookAssemblyResolve();
|
|
try
|
|
{
|
|
LocalFamsLibWin win = new(UiApplication);
|
|
new WindowInteropHelper(win) { Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle };
|
|
win.Show();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogAssists.WriteLog(ex.Message);
|
|
}
|
|
//finally
|
|
//{
|
|
// loader.UnhookAssemblyResolve();
|
|
//}
|
|
}
|
|
}
|
|
}
|