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