UIControlledApplicationRegisterDockablePane Method |
Adds a new dockable pane to the Revit user interface.
Namespace: Autodesk.Revit.UIAssembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void RegisterDockablePane(
DockablePaneId id,
string title,
IDockablePaneProvider provider
)
Public Sub RegisterDockablePane (
id As DockablePaneId,
title As String,
provider As IDockablePaneProvider
)
public:
void RegisterDockablePane(
DockablePaneId^ id,
String^ title,
IDockablePaneProvider^ provider
)
member RegisterDockablePane :
id : DockablePaneId *
title : string *
provider : IDockablePaneProvider -> unit
Parameters
- id DockablePaneId
- Unique identifier for the new pane.
- title String
- String to use for the pane caption.
- provider IDockablePaneProvider
- Your add-in's implementation of the IDockablePaneProvider interface.
ExceptionsException | Condition |
---|
ArgumentException | Thrown if a dockable pane with identifier %id% has already been registered. |
Examplepublic Result OnStartup(UIControlledApplication application)
{
PaneProvider prov = new PaneProvider();
DockablePaneId id = new DockablePaneId(Guid.NewGuid());
application.RegisterDockablePane(id, "test", prov);
return Result.Succeeded;
}
Public Function OnStartup(application As UIControlledApplication) As Result Implements IExternalApplication.OnStartup
Dim prov As New PaneProvider()
Dim id As New DockablePaneId(Guid.NewGuid())
application.RegisterDockablePane(id, "test", prov)
Return Result.Succeeded
End Function
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also