Welcome
Expand Getting StartedGetting Started
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Collapse SOLIDWORKS Electrical API HelpSOLIDWORKS Electrical API Help
Expand Getting StartedGetting Started
Expand Add a Custom CommandAdd a Custom Command
Expand Add an Add-inAdd an Add-in
Expand Release NotesRelease Notes
Expand C# SamplesC# Samples
Expand List of SWE commandsList of SWE commands
Collapse ClassesClasses
Collapse Class ListClass List
Expand IEwAddInIEwAddIn
IEwAddinInternalX
Expand IEwAPIXIEwAPIX
Expand IEwApplicationSettingsXIEwApplicationSettingsX
Expand IEwApplicationXIEwApplicationX
Expand IEwArchiveEnvironmentXIEwArchiveEnvironmentX
Expand IEwCableCoreXIEwCableCoreX
Expand IEwCableReferenceManagerXIEwCableReferenceManagerX
Expand IEwCableReferenceXIEwCableReferenceX
Expand IEwCaptionBarControlXIEwCaptionBarControlX
Expand IEwCaptionBarXIEwCaptionBarX
Expand IEwClassificationManagerXIEwClassificationManagerX
Expand IEwClassificationXIEwClassificationX
Expand IEwClassXIEwClassX
IEwCommandContextX
Expand IEwCommandManagerXIEwCommandManagerX
Expand IEwCommandXIEwCommandX
Expand IEwDialogAlignPartsParametersSelectorXIEwDialogAlignPartsParametersSelectorX
Expand IEwDialogLocationSelectorXIEwDialogLocationSelectorX
Expand IEwDialogMacroSelectorXIEwDialogMacroSelectorX
Expand IEwDialogManufacturerPartOrderingXIEwDialogManufacturerPartOrderingX
Expand IEwDialogManufacturerPartSelectorXIEwDialogManufacturerPartSelectorX
Expand IEwDialogProgressXIEwDialogProgressX
Expand IEwDialogProjectManagerXIEwDialogProjectManagerX
Expand IEwDialogResumeXIEwDialogResumeX
Expand IEwDialogSummaryXIEwDialogSummaryX
Expand IEwDialogTaskXIEwDialogTaskX
Expand IEwDockingPaneManagerXIEwDockingPaneManagerX
Expand IEwDockingPaneXIEwDockingPaneX
Expand IEwDocumentManagerXIEwDocumentManagerX
Expand IEwDocumentXIEwDocumentX
Expand IEwEnvironmentObjectXIEwEnvironmentObjectX
Expand IEwEnvironmentXIEwEnvironmentX
IEwInteropFactoryX
Expand IEwLibraryManagerXIEwLibraryManagerX
Expand IEwLibraryXIEwLibraryX
Expand IEwLockStringXIEwLockStringX
Expand IEwManagerDialogXIEwManagerDialogX
Expand IEwManufacturerPartCircuitXIEwManufacturerPartCircuitX
Expand IEwManufacturerPartManagerXIEwManufacturerPartManagerX
Expand IEwManufacturerPartTerminalXIEwManufacturerPartTerminalX
Expand IEwManufacturerPartXIEwManufacturerPartX
Expand IEwMenuItemXIEwMenuItemX
Expand IEwMenuManagerXIEwMenuManagerX
Expand IEwMenuXIEwMenuX
Expand IEwNotificationDialogXIEwNotificationDialogX
Expand IEwObjectBaseXIEwObjectBaseX
IEwObjectDispatchX
Expand IEwObjectXIEwObjectX
Expand IEwPointXIEwPointX
Expand IEwProjectAutomaticArrowsXIEwProjectAutomaticArrowsX
Expand IEwProjectBookManagerXIEwProjectBookManagerX
IEwProjectBookX
Expand IEwProjectCableManagerXIEwProjectCableManagerX
Expand IEwProjectCableXIEwProjectCableX
Expand IEwProjectComponentCircuitXIEwProjectComponentCircuitX
Expand IEwProjectComponentManagerXIEwProjectComponentManagerX
Expand IEwProjectComponentTerminalXIEwProjectComponentTerminalX
Expand IEwProjectComponentXIEwProjectComponentX
Expand IEwProjectConfigurationXIEwProjectConfigurationX
Expand IEwProjectEntity3DManagerXIEwProjectEntity3DManagerX
Expand IEwProjectEntity3DXIEwProjectEntity3DX
Expand IEwProjectExcelAutomationXIEwProjectExcelAutomationX
Expand IEwProjectExportDWGFilesXIEwProjectExportDWGFilesX
Expand IEwProjectExportPDFXIEwProjectExportPDFX
Expand IEwProjectExportPDMXIEwProjectExportPDMX
Expand IEwProjectExportReportXIEwProjectExportReportX
Expand IEwProjectFileConfigurationManagerXIEwProjectFileConfigurationManagerX
Expand IEwProjectFileConfigurationXIEwProjectFileConfigurationX
Expand IEwProjectFileManagerXIEwProjectFileManagerX
Expand IEwProjectFileXIEwProjectFileX
Expand IEwProjectFolderManagerXIEwProjectFolderManagerX
Expand IEwProjectFolderXIEwProjectFolderX
Expand IEwProjectFunctionManagerXIEwProjectFunctionManagerX
Expand IEwProjectFunctionXIEwProjectFunctionX
Expand IEwProjectGenerateTSDrawingXIEwProjectGenerateTSDrawingX
Expand IEwProjectHarnessManagerXIEwProjectHarnessManagerX
Expand IEwProjectHarnessXIEwProjectHarnessX
Expand IEwProjectInputOutputManagerXIEwProjectInputOutputManagerX
Expand IEwProjectInputOutputXIEwProjectInputOutputX
Expand IEwProjectLocationManagerXIEwProjectLocationManagerX
Expand IEwProjectLocationXIEwProjectLocationX
Expand IEwProjectManagerXIEwProjectManagerX
IEwProjectManufacturerPartCircuitX
Expand IEwProjectManufacturerPartManagerXIEwProjectManufacturerPartManagerX
IEwProjectManufacturerPartTerminalX
Expand IEwProjectManufacturerPartXIEwProjectManufacturerPartX
Expand IEwProjectMultilingualTextFontXIEwProjectMultilingualTextFontX
Expand IEwProjectMultilingualTextManagerXIEwProjectMultilingualTextManagerX
Expand IEwProjectMultilingualTextXIEwProjectMultilingualTextX
Expand IEwProjectNumberDocumentsXIEwProjectNumberDocumentsX
Expand IEwProjectNumberMarksXIEwProjectNumberMarksX
Expand IEwProjectNumberWiresXIEwProjectNumberWiresX
Expand IEwProjectOptimizeWireOrderXIEwProjectOptimizeWireOrderX
Expand IEwProjectPrintConfigManagerXIEwProjectPrintConfigManagerX
Expand IEwProjectPrintConfigXIEwProjectPrintConfigX
Expand IEwProjectReportManagerXIEwProjectReportManagerX
Expand IEwProjectReportXIEwProjectReportX
Expand IEwProjectSnapshotManagerXIEwProjectSnapshotManagerX
Expand IEwProjectSnapshotXIEwProjectSnapshotX
Expand IEwProjectSymbolManagerXIEwProjectSymbolManagerX
Expand IEwProjectSymbolXIEwProjectSymbolX
Expand IEwProjectTagObjectXIEwProjectTagObjectX
Expand IEwProjectUpdateReplaceDataXIEwProjectUpdateReplaceDataX
Expand IEwProjectWireManagerXIEwProjectWireManagerX
Expand IEwProjectWireXIEwProjectWireX
Expand IEwProjectXIEwProjectX
Expand IEwResumeRowXIEwResumeRowX
Expand IEwRibbonComboBoxControlXIEwRibbonComboBoxControlX
Collapse IEwRibbonControlXIEwRibbonControlX
Expand IEwRibbonGroupXIEwRibbonGroupX
Expand IEwRibbonQuickAccessControlXIEwRibbonQuickAccessControlX
Expand IEwRibbonTabXIEwRibbonTabX
Expand IEwRibbonXIEwRibbonX
Expand IEwRightsManagerXIEwRightsManagerX
Expand IEwSaveDWGImageXIEwSaveDWGImageX
Expand IEwSelectorDialogXIEwSelectorDialogX
Expand IEwSymbolCircuitXIEwSymbolCircuitX
Expand IEwSymbolFiltersXIEwSymbolFiltersX
Expand IEwSymbolManagerXIEwSymbolManagerX
Expand IEwSymbolPointXIEwSymbolPointX
Expand IEwSymbolXIEwSymbolX
Expand IEwTerminalTypeManagerXIEwTerminalTypeManagerX
Expand IEwTerminalTypeXIEwTerminalTypeX
Expand IEwTitleBlockManagerXIEwTitleBlockManagerX
Expand IEwTitleBlockXIEwTitleBlockX
Expand IEwWireTerminationTypeManagerXIEwWireTerminationTypeManagerX
Expand IEwWireTerminationTypeXIEwWireTerminationTypeX
Expand IEwXLSBookXIEwXLSBookX
Expand IEwXLSSheetXIEwXLSSheetX
Expand IInteropFactoryXIInteropFactoryX
Class Index
Expand Class HierarchyClass Hierarchy
Expand Class MembersClass Members
Expand SOLIDWORKS PDM Professional API HelpSOLIDWORKS PDM Professional API Help
Expand PDM Pro API Web ServicePDM Pro API Web Service
Expand FeatureWorks API HelpFeatureWorks API Help
Expand SOLIDWORKS Costing API HelpSOLIDWORKS Costing API Help
Expand SOLIDWORKS Document Manager API HelpSOLIDWORKS Document Manager API Help
Expand SOLIDWORKS Inspection API HelpSOLIDWORKS Inspection API Help
Expand SOLIDWORKS Routing API HelpSOLIDWORKS Routing API Help
Expand SOLIDWORKS Simulation API HelpSOLIDWORKS Simulation API Help
Expand SOLIDWORKS Sustainability API HelpSOLIDWORKS Sustainability API Help
Expand SOLIDWORKS Toolbox API HelpSOLIDWORKS Toolbox API Help
Expand SOLIDWORKS Utilities API HelpSOLIDWORKS Utilities API Help
Expand eDrawings API HelpeDrawings API Help
Expand DraftSight API HelpDraftSight API Help
Expand Lisp Programming BasicsLisp Programming Basics
Expand Lisp Functions OverviewLisp Functions Overview
Expand Lisp Functions ReferenceLisp Functions Reference
Expand Visual Lisp Compatible FunctionsVisual Lisp Compatible Functions
Hide Table of Contents
SOLIDWORKS Electrical API 2023.0.0
Electrical API
IEwRibbonControlX Interface Reference

Use this interface to manage the control on Ribbon tab. More...

Inheritance diagram for IEwRibbonControlX:

Public Member Functions

BSTR getCaption (EwErrorCode *errorCode)
 Return the caption of this control. More...
 
EwErrorCode setCaption (BSTR strCaption)
 Set a new caption for this control. More...
 
BSTR getToolTip (EwErrorCode *errorCode)
 Return the ToolTip of this control. More...
 
EwErrorCode setToolTip (BSTR strToolTip)
 Set a new ToolTip for this control. More...
 
BSTR getDescription (EwErrorCode *errorCode)
 Return the description of this control. More...
 
EwErrorCode setDescription (BSTR strDescription)
 Set a description for this control. More...
 
VARIANT_BOOL isVisible (EwErrorCode *errorCode)
 Determine if the control is visible. More...
 
EwErrorCode setVisible (VARIANT_BOOL bVisible)
 Hide or show the control. More...
 
VARIANT_BOOL isEnabled (EwErrorCode *errorCode)
 Determine if the control is enabled. More...
 
EwErrorCode setEnabled (VARIANT_BOOL bEnabled)
 Set whether the control is enabled. More...
 
VARIANT_BOOL isBeginGroup (EwErrorCode *errorCode)
 Determine if the control is a separator. More...
 
EwErrorCode setBeginGroup (VARIANT_BOOL bBeginGroup)
 Begin a new group using a separator. More...
 
BSTR getShortcutText (EwErrorCode *errorCode)
 Get the control's shortcut. More...
 
EwErrorCode setShortcutText (BSTR strShortcutText)
 Set the shortcut string of the control. More...
 
EwErrorCode setIconFromImage (BSTR strImageFilePath, EwRibbonButtonSize eRibbonButtonSize, COLORREF crMask)
 Add an icon from file. More...
 
EwRibbonButtonStyle getStyle (EwErrorCode *errorCode)
 Get the control's style. More...
 
EwErrorCode setStyle (EwRibbonButtonStyle eRibbonButtonStyle)
 Set the style of the control. More...
 
long getID (EwErrorCode *errorCode)
 Get the Id's of control. More...
 
BSTR getCommand (EwErrorCode *errorCode)
 Return the text of parameter strCommand used when calling EwRibbonGroupX::addControl. More...
 
EwErrorCode setCommand (BSTR strCommand)
 Set the name of the command associated with this ribbon control. More...
 
IEwRibbonControlX addControl (EwRibbonControlType eRibbonControlType, BSTR strCommand, EwErrorCode *errorCode)
 Add a new control to a pop-up button. More...
 
VARIANT_BOOL getCheck (EwErrorCode *errorCode)
 Determine if the control is checked. More...
 
EwErrorCode setCheck (VARIANT_BOOL bCheck)
 Check or uncheck the control. More...
 
IEwRibbonComboBoxControlX addComboBoxControl (EwErrorCode *errorCode)
 Add the ComboBox Control in the pop-up button ribbon control. More...
 
int getIndex (EwErrorCode *errorCode)
 Return the index of the control. More...
 
BSTR getCategory (EwErrorCode *errorCode)
 Return the category of the control. More...
 
EwErrorCode setCategory (BSTR strCategory)
 Set a category for the control. More...
 
VARIANT_BOOL isOnQuickAccess (EwErrorCode *errorCode)
 Get whether the control is a part of Quick access panel. More...
 
EwErrorCode setOnQuickAccess (VARIANT_BOOL bOnQuickAccess)
 Set whether the control is a part of Quick access panel. More...
 
EwRibbonControlType getControlType (EwErrorCode *errorCode)
 Get the control's Type. More...
 

Detailed Description

Use this interface to manage the control on Ribbon tab.

Since
2019

Member Function Documentation

◆ addComboBoxControl()

IEwRibbonComboBoxControlX IEwRibbonControlX::addComboBoxControl ( EwErrorCode errorCode)

Add the ComboBox Control in the pop-up button ribbon control.

Since
2022 SP0.
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUT if wrong input is provided
  • EW_UNDEFINED_ERROR if another error occurred
Returns
an IEwRibbonComboBoxControlX object.

◆ addControl()

IEwRibbonControlX IEwRibbonControlX::addControl ( EwRibbonControlType  eRibbonControlType,
BSTR  strCommand,
EwErrorCode errorCode 
)

Add a new control to a pop-up button.

Since
2021 SP0.
Note
To add ComboBox Control use addComboBoxControl.
Parameters
[in]eRibbonControlTypetype of ribbon control
[in]strCommandthe name of a command to launch. Can be blank.
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized or EwRibbonControlType is invalid
  • EW_BAD_INPUT if eType is not a good type or if the current button is not a pop-up button.
  • EW_UNDEFINED_ERROR if another error occurred
Returns
an IEwRibbonControlX added to the control.

◆ getCaption()

BSTR IEwRibbonControlX::getCaption ( EwErrorCode errorCode)

Return the caption of this control.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the caption of this control.

◆ getCategory()

BSTR IEwRibbonControlX::getCategory ( EwErrorCode errorCode)

Return the category of the control.

Category of a control is to be set as caption of the ribbon tab under which the control is added. "&" prefix in the caption of the ribbon tab is removed inside the setCategory function for setting the category correctly. It is used to display the tabs and controls in the customize quick access toolbar dialog. If empty the control won't be shown in customize quick access toolbar dialog.

Since
2023 SP0.
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the category of this control.

◆ getCheck()

VARIANT_BOOL IEwRibbonControlX::getCheck ( EwErrorCode errorCode)

Determine if the control is checked.

Since
2022 SP0.
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
TRUE if the control is checked, FALSE otherwise.

◆ getCommand()

BSTR IEwRibbonControlX::getCommand ( EwErrorCode errorCode)

Return the text of parameter strCommand used when calling EwRibbonGroupX::addControl.

Since
2019 SP2
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the text of parameter strCommand used when calling EwRibbonGroupX::addControl.

◆ getControlType()

EwRibbonControlType IEwRibbonControlX::getControlType ( EwErrorCode errorCode)

Get the control's Type.

Since
2023 SP0.
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUTS if the control type is not defined correctly
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the EwRibbonControlType enum control's type.

◆ getDescription()

BSTR IEwRibbonControlX::getDescription ( EwErrorCode errorCode)

Return the description of this control.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the description of this control.

◆ getID()

long IEwRibbonControlX::getID ( EwErrorCode errorCode)

Get the Id's of control.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the id of the control.

◆ getIndex()

int IEwRibbonControlX::getIndex ( EwErrorCode errorCode)

Return the index of the control.

Since
2022 SP0.
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
an integer that is the index of the current control.

◆ getShortcutText()

BSTR IEwRibbonControlX::getShortcutText ( EwErrorCode errorCode)

Get the control's shortcut.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the shortcut of the control.

◆ getStyle()

EwRibbonButtonStyle IEwRibbonControlX::getStyle ( EwErrorCode errorCode)

Get the control's style.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the EwRibbonButtonStyle enum control's style.

◆ getToolTip()

BSTR IEwRibbonControlX::getToolTip ( EwErrorCode errorCode)

Return the ToolTip of this control.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the ToolTip of this control.

◆ isBeginGroup()

VARIANT_BOOL IEwRibbonControlX::isBeginGroup ( EwErrorCode errorCode)

Determine if the control is a separator.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
TRUE if the control starts a new group; otherwise FALSE.

◆ isEnabled()

VARIANT_BOOL IEwRibbonControlX::isEnabled ( EwErrorCode errorCode)

Determine if the control is enabled.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
TRUE if the control is enabled, FALSE otherwise.

◆ isOnQuickAccess()

VARIANT_BOOL IEwRibbonControlX::isOnQuickAccess ( EwErrorCode errorCode)

Get whether the control is a part of Quick access panel.

Since
2023 SP0.
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
TRUE if the control is a part of Quick access panel, FALSE otherwise.

◆ isVisible()

VARIANT_BOOL IEwRibbonControlX::isVisible ( EwErrorCode errorCode)

Determine if the control is visible.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
Returns
TRUE if the control is visible, FALSE otherwise.

◆ setBeginGroup()

EwErrorCode IEwRibbonControlX::setBeginGroup ( VARIANT_BOOL  bBeginGroup)

Begin a new group using a separator.

Parameters
[in]bBeginGroupTRUE if the control starts a new group; otherwise FALSE.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setCaption()

EwErrorCode IEwRibbonControlX::setCaption ( BSTR  strCaption)

Set a new caption for this control.

Parameters
[out]strCaptionthe new caption to display.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setCategory()

EwErrorCode IEwRibbonControlX::setCategory ( BSTR  strCategory)

Set a category for the control.

Category of a control is to be set as caption of the ribbon tab under which the control is added. "&" prefix in the caption of the ribbon tab is removed inside the setCategory function for setting the category correctly. It is used to display the tabs and controls in the customize quick access toolbar dialog. If empty the control won't be shown in customize quick access toolbar dialog.

Since
2023 SP0.
Parameters
[out]strCategorythe category for customizig quick access toolbar.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setCheck()

EwErrorCode IEwRibbonControlX::setCheck ( VARIANT_BOOL  bCheck)

Check or uncheck the control.

Since
2022 SP0.
Parameters
[in]bCheckTRUE to check the control, FALSE to uncheck the control.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setCommand()

EwErrorCode IEwRibbonControlX::setCommand ( BSTR  strCommand)

Set the name of the command associated with this ribbon control.

Since
2019 SP2
Parameters
[out]strCommandthe new parameter command to execute.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setDescription()

EwErrorCode IEwRibbonControlX::setDescription ( BSTR  strDescription)

Set a description for this control.

Parameters
[out]strDescriptionthe new description to display.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setEnabled()

EwErrorCode IEwRibbonControlX::setEnabled ( VARIANT_BOOL  bEnabled)

Set whether the control is enabled.

Parameters
[in]bEnabledTRUE to enable the control, FALSE to disable the control. If FALSE, the control will appear "grayed out" and the user can not access the control.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setIconFromImage()

EwErrorCode IEwRibbonControlX::setIconFromImage ( BSTR  strImageFilePath,
EwRibbonButtonSize  eRibbonButtonSize,
COLORREF  crMask 
)

Add an icon from file.

Image to buttons should be .ico, .bmp, .png file.

Parameters
[in]strImageFilePaththe full Image file path.
[in]eRibbonButtonSizeenum that define the button size. Default value is kButtonSize32.
[in]crMaskColor mask for BMP and PNG images. Blanck (0x00FFFFFF) by default
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUTS if the file path doesn't exist or if not a .ico, .bmp, .png file.
  • EW_UNDEFINED_ERROR if another error occurred

◆ setOnQuickAccess()

EwErrorCode IEwRibbonControlX::setOnQuickAccess ( VARIANT_BOOL  bOnQuickAccess)

Set whether the control is a part of Quick access panel.

Since
2023 SP0.
Parameters
[in]bOnQuickAccessTRUE if the control is a part of Quick access panel, FALSE otherwise.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setShortcutText()

EwErrorCode IEwRibbonControlX::setShortcutText ( BSTR  strShortcutText)

Set the shortcut string of the control.

Parameters
[in]strShortcutTextShortcut to be set.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setStyle()

EwErrorCode IEwRibbonControlX::setStyle ( EwRibbonButtonStyle  eRibbonButtonStyle)

Set the style of the control.

Parameters
[in]eRibbonButtonStyleThe style to be set. Can be any of the values listed in the EwRibbonButtonStyle enum.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUTS if buttonStyle is not a good button style.
  • EW_UNDEFINED_ERROR if another error occurred

◆ setToolTip()

EwErrorCode IEwRibbonControlX::setToolTip ( BSTR  strToolTip)

Set a new ToolTip for this control.

Parameters
[out]strToolTipthe new ToolTip to display.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred

◆ setVisible()

EwErrorCode IEwRibbonControlX::setVisible ( VARIANT_BOOL  bVisible)

Hide or show the control.

Parameters
[in]bVisibleTRUE to show the control, FALSE to hide the control.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred


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:   SOLIDWORKS Electrical API: IEwRibbonControlX Interface Reference
*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) 2023 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.