Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
class Command : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIApplication uiapp = commandData.Application;
if (DockablePane.PaneIsRegistered(App.PaneId))
{
DockablePane docpanel = uiapp.GetDockablePane(App.PaneId);
if (docpanel.IsShown())
docpanel.Hide();
else
docpanel.Show();
}
else
{
return Result.Failed;
}
return Result.Succeeded;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.