mirror of
https://github.com/ShrlAlgo/AddinManager.git
synced 2026-03-07 16:38:56 +00:00
34 lines
852 B
C#
34 lines
852 B
C#
using Autodesk.Revit.Attributes;
|
|
using Autodesk.Revit.UI;
|
|
|
|
using System;
|
|
using System.Windows;
|
|
|
|
namespace AddInManager
|
|
{
|
|
[Transaction(TransactionMode.ReadOnly)]
|
|
public class CAddInManagerReadOnly : IExternalCommand
|
|
{
|
|
public Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
|
|
{
|
|
try
|
|
{
|
|
var aim = AIM.Instance;
|
|
|
|
var window = new Wpf.MainWindow(aim)
|
|
{
|
|
WindowStartupLocation = WindowStartupLocation.CenterScreen
|
|
};
|
|
window.ShowDialog();
|
|
|
|
return Result.Succeeded;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
message = ex.Message;
|
|
return Result.Failed;
|
|
}
|
|
}
|
|
}
|
|
}
|