30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
|
|
using Autodesk.Revit.Attributes;
|
|||
|
|
using Autodesk.Revit.DB;
|
|||
|
|
using Autodesk.Revit.UI;
|
|||
|
|
using Autodesk.Revit.UI.Selection;
|
|||
|
|
|
|||
|
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
|||
|
|
|
|||
|
|
using Nice3point.Revit.Toolkit.External;
|
|||
|
|
|
|||
|
|
namespace Szmedi.RevitToolkit.Approval.Commands
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Revit执行命令
|
|||
|
|
/// </summary>
|
|||
|
|
[Transaction(TransactionMode.Manual)]
|
|||
|
|
[Regeneration(RegenerationOption.Manual)]
|
|||
|
|
public class TestCmd : ExternalCommand
|
|||
|
|
{
|
|||
|
|
public override void Execute()
|
|||
|
|
{
|
|||
|
|
//var parameters = GlobalAssists.GetArchiSharedParameters();
|
|||
|
|
//Application.SharedParametersFilename = null;
|
|||
|
|
// var elements = UiDocument.Selection
|
|||
|
|
//.PickElementsByRectangle(
|
|||
|
|
// new FuncFilter(e => e.Category is { CategoryType: CategoryType.Model, AllowsBoundParameters: true, Parent: null }),
|
|||
|
|
// "请选择要填写参数值的构件");
|
|||
|
|
// UiDocument.Selection.SetElementIds(elements.Select(e => e.Id).ToList());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|