2025-04-24 20:56:44 +08:00
|
|
|
|
using Autodesk.Revit.Attributes;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
using Nice3point.Revit.Toolkit.External;
|
2026-02-21 16:31:24 +08:00
|
|
|
|
using ShrlAlgoToolkit.RevitAddins.Common.Assists;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
2025-04-24 20:56:44 +08:00
|
|
|
|
namespace ShrlAlgoToolkit.RevitAddins.RvMEP;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
|
|
|
public class AnyConnectCmd : ExternalCommand
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute()
|
|
|
|
|
|
{
|
|
|
|
|
|
#if REVIT2018
|
2026-02-21 16:31:24 +08:00
|
|
|
|
Common.Assists.WinDialogAssist.ShowOrActivate<AnyConnectView, AnyConnectViewModel>();
|
2024-09-22 11:05:41 +08:00
|
|
|
|
#elif REVIT2020
|
2026-02-21 16:31:24 +08:00
|
|
|
|
OptionsBarAssist.RegisterOptionsBar((AutoConnectOptionsView view, AnyConnectViewModel viewModel) =>
|
|
|
|
|
|
{
|
|
|
|
|
|
viewModel.ConnectCommand.Execute(null);
|
|
|
|
|
|
});
|
2024-09-22 11:05:41 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|