42 lines
1000 B
C#
42 lines
1000 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 RenameFamilyNameCmd : ExternalCommand
|
|||
|
|
{
|
|||
|
|
public override void Execute()
|
|||
|
|
{
|
|||
|
|
//AssemblyLoaderHelpers loader = new(GlobalVariables.DirAssembly);
|
|||
|
|
//loader.HookAssemblyResolve();
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
RenameFamilyViewModel viewmodel = new(UiApplication);
|
|||
|
|
RenameFamilyWin win = new(viewmodel);
|
|||
|
|
win.ShowDialog();
|
|||
|
|
}
|
|||
|
|
catch (Exception e)
|
|||
|
|
{
|
|||
|
|
MessageBox.Show(e.Message);
|
|||
|
|
LogAssists.WriteLog(e.StackTrace);
|
|||
|
|
}
|
|||
|
|
//finally
|
|||
|
|
//{
|
|||
|
|
// loader.UnhookAssemblyResolve();
|
|||
|
|
//}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|