| 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
The following code snippets show how to add a toolbar to the list of available toolbars:
- COM native C++(from the DraftSight API COM native C++ template file DsAddinConnection.cpp)
- C++ (from the DraftSight API C++ template file dsAddinConnection.cpp)
COM native C++
IToolbarPtr pToolbar = m_DsApp->AddToolbar( m_sApiUuid, dsUIState_Document, L"DsAddin Toolbar");
C++
"QAddIn1_Toolbar";dsString ToolbarName = L
dsToolbar_ptr pToolbar;
dsApp->AddToolbar( myApplication::appID, dsUIState_Document, ToolbarName, &pToolbar );
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.
DraftSight V1R1
Syntax