40 lines
998 B
C#
40 lines
998 B
C#
|
|
using Autodesk.Revit.Attributes;
|
|
using Nice3point.Revit.Toolkit.External;
|
|
using ShrlAlgoToolkit.RevitAddins.Common.Assists;
|
|
using ShrlAlgoToolkit.RevitAddins.RvView;
|
|
using ShrlAlgoToolkit;
|
|
using ShrlAlgoToolkit.RevitAddins;
|
|
|
|
namespace ShrlAlgoToolkit.RevitAddins.DrawSheet;
|
|
|
|
[Transaction(TransactionMode.Manual)]
|
|
//打开ElementsControlDock窗口
|
|
public class ElementsControlCmd : ExternalCommand
|
|
{
|
|
public override void Execute()
|
|
{
|
|
try
|
|
{
|
|
if (DockablePane.PaneExists(Variables.PaneId))
|
|
{
|
|
var pane = UiApplication.GetDockablePane(Variables.PaneId);
|
|
if (pane.IsShown())
|
|
{
|
|
pane.Hide();
|
|
}
|
|
else
|
|
{
|
|
pane.Show();
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
ErrorMessage = e.Message;
|
|
e.StackTrace.ToLog();
|
|
Result = Result.Failed;
|
|
}
|
|
}
|
|
}
|