AddToolbar Method (IApplication) Send Feedback
See Also 
Toolbar[out]
Toolbar
ApiUuid

UUID of the add-in or non add-in application

UiState
Where to add the toolbar as defined in dsUIState_e
ToolBarName
Name of the toolbar
Adds a toolbar to the DraftSight user interface.

Syntax

Visual Basic 
Function AddToolbar( _
   ByVal ApiUuid As System.String, _
   ByVal UiState As dsUIState_e, _
   ByVal ToolBarName As System.String _
) As Toolbar
C# 
Toolbar AddToolbar( 
   System.string ApiUuid,
   dsUIState_e UiState,
   System.string ToolBarName
)
JavaScript 
AddToolbar( 
   ApiUuid : String,
   UiState : String,
   ToolBarName : String
) : dsToolbar
COM native C++ 
HRESULT AddToolbar( 
   BSTR ApiUuid,
   dsUIState_e UiState,
   BSTR ToolBarName,
   IToolbar** Toolbar
) 
C++ 
DSRESULT AddToolbar( 
   const dsString& ApiUuid,
   dsUIState_e UiState,
   const dsString& ToolBarName,
   dsToolbar** Toolbar
) 

Parameters

ApiUuid

UUID of the add-in or non add-in application

UiState
Where to add the toolbar as defined in dsUIState_e
ToolBarName
Name of the toolbar
Toolbar[out] or Return Value
Toolbar

Example

The following code snippets show how to add a toolbar to the list of available toolbars:

 

COM native C++ 

IToolbarPtr pToolbar = m_DsApp->AddToolbar( m_sApiUuid, dsUIState_Document, L"DsAddin Toolbar");

 

C++

dsString ToolbarName = L"QAddIn1_Toolbar";

dsToolbar_ptr pToolbar;

dsApp->AddToolbar( myApplication::appID, dsUIState_Document, ToolbarName, &pToolbar );

Remarks

To display the list of available toolbars, right-click a toolbar in the DraftSight user interface and select Toolbars to open the Specify Toolbars dialog.

 

See Also

Availability

DraftSight V1R1