42 lines
994 B
C#
42 lines
994 B
C#
using Autodesk.Revit.Attributes;
|
|
using Autodesk.Revit.DB;
|
|
|
|
using Nice3point.Revit.Toolkit.External;
|
|
|
|
using System;
|
|
|
|
using System.Windows;
|
|
|
|
|
|
namespace Szmedi.RvKits.ModelManager
|
|
{
|
|
/// <summary>
|
|
/// Revit执行命令
|
|
/// </summary>
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
|
public class RenameTypeNameCmd : ExternalCommand
|
|
{
|
|
public override void Execute()
|
|
{
|
|
//AssemblyLoaderHelpers loader = new(GlobalVariables.DirAssembly);
|
|
//loader.HookAssemblyResolve();
|
|
try
|
|
{
|
|
RenameTypeViewModel viewmodel = new(UiApplication);
|
|
RenameTypeWin win = new(viewmodel);
|
|
win.ShowDialog();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
MessageBox.Show(e.Message);
|
|
LogAssists.WriteLog(e.StackTrace);
|
|
}
|
|
//finally
|
|
//{
|
|
// loader.UnhookAssemblyResolve();
|
|
//}
|
|
}
|
|
}
|
|
}
|