调整代码
This commit is contained in:
39
ShrlAlgoToolkit.RevitAddins/DrawSheet/ElementsControlCmd.cs
Normal file
39
ShrlAlgoToolkit.RevitAddins/DrawSheet/ElementsControlCmd.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user