Hide Table of Contents
AddToolbar Method (IApplication)
UiState[out]
Toolbar

Obsolete. Superseded by IWorkspace::AddToolbar.

.NET Syntax

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

Parameters

ApiUuid

UUID of the add-in or application

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

Example

The following code snippets show how to add a toolbar to the Classic Default workspace:

 

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

This method is valid only for the Classic Default workspace as of DraftSight 2017 SP0.

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


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   AddToolbar Method (IApplication)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2019 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.