Files
Shrlalgo.RvKits/Sai.RvKits/RvView/SectionBoxControllerCmd.cs

27 lines
746 B
C#
Raw Normal View History

2024-09-22 11:05:41 +08:00
using Autodesk.Revit.DB;
using Nice3point.Revit.Toolkit.External;
namespace Sai.RvKits.RvView;
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
public class SectionBoxControllerCmd : ExternalCommand
{
public override void Execute()
{
//if (Document.ActiveView.ViewType != ViewType.ThreeD)
//{
// UiDocument.ActiveView = Document.OfCollector<View3D>().Cast<View3D>().FirstOrDefault(v => !v.IsTemplate);
//}
try
{
WinDialogHelper.ShowModeless<SectionBoxControllerView>(new SectionBoxControllerViewModel(UiDocument));
}
catch (Exception ex)
{
ErrorMessage = ex.Message;
}
}
}