Solid Edge Framework Type Library
SetAddInInfoEx2 Method
This is the Identifier of the environment to which commands are being added.
This is a name that the add-in associates with the set of commands it is adding to the environment. The name should be internationalized as it can be presented to the user by Solid Edge.
This is the ID of the bitmap resource containing medium-sized images of all the toolbar buttons that the add-in is adding.
This is the ID of the bitmap resource containing large-sized images of all the toolbar buttons that the add-in is adding.
This is the ID of the bitmap resource containing medium-sized monochrome images of all the toolbar buttons that the add-in is adding.
This the ID of the bitmap resource containing large-sized monochrome images of all the toolbar buttons that the add-in is adding.
This is the number of commands being added to the environment.

This is an array of BSTRs. Each string can contain sub-strings separated by "\n".

The substrings are defined as follows:
• Name of the command you are adding. This should not be internationalized and should be tagged in such a way to help ensure uniqueness.
• Text displayed on the menu entry for the command. This substring may contain backslash characters, which Solid Edge (Version 7 or later) will use to create additional pop-up submenus and/or to add a separator preceding the command entry (Version 8 or later). The strings appearing between the backslashes become the title of the pop-up menu and the last string becomes the entry on the final menu. If the first character of any substring (including the first) is itself a backslash, Solid Edge will add a separator preceding the menu entry.
• Status bar string. This is the string displayed on the status bar.
• Tooltip string. This is the string displayed as the tooltip.
• Macro string. If present, this string becomes the macro associated with the command. Commands that have a macro string will not be invoked by calling OnCommand. Instead, Solid Edge runs the macro.
• Parameter string. If present, this string is passed as an argument to the macro.
Example:
"MyAddinCommand1\nSEaddin Sample Command\nDisplays a message box\nSeaddin Command"
 
The non-internationalized tag for the command is "MyAddinCommand1". "Seaddin Sample Command" will appear as an entry on the addin's pop-up menu created by Solid Edge. "Displays a message box" will appear in the status field of the frame window. "Seaddin Command" is displayed as the tooltip for the command if it is added to a command bar by calling AddCommandBarButton.
Example:
"MyAddinCommand1\nSEaddin\ Sample Command\nDisplays a message box\nSeaddin Command"
 
This example is identical to the one above with one exception. That being that an additional pop-up submenu named "Seaddin" will exist with "Sample Command" being an entry on that pop-up
Example:
"MyAddinCommand1\nSEaddin\\ Another Sample Command\nDisplays a message box\nSeaddin Command"
 
This example is identical to the one above with one exception. Due to the additional backslash, a separator will be inserted preceding the menu entry "Another Sample Command".

This is a pointer to a SAFEARRAY of identifiers the add-in is to associate with each command being added. The add-in is free to choose any identifier it wishes. The command identifier chosen by the add-in is what is passed in OnCommand, OnCommandUpdateUI and OnCommandHelp.
CommandIDs is also an output of SetAddInInfo. When the function returns, the array contains the runtime command identifier Solid Edge has associated with the command. This identifier is what the operating system will pass in the WM_COMMAND message. It can also be used to add a button for the command using the "Add" method available in the command bar controls' automation interface.
The array size should match the size of the CommandNames array. Button styles are defined by the SeButtonStyle enumeration.
Description
Sets the parameters for the referenced AddIn object.
Syntax
Visual Basic
Public Function SetAddInInfoEx2( _
   ByVal ResourceFilename As String, _
   ByVal EnvironmentCatID As String, _
   ByVal CategoryName As String, _
   ByVal IDColorBitmapMedium As Long, _
   ByVal IDColorBitmapLarge As Long, _
   ByVal IDMonochromeBitmapMedium As Long, _
   ByVal IDMonochromeBitmapLarge As Long, _
   ByVal NumberOfCommands As Long, _
   ByRef CommandNames() As String, _
   ByRef CommandIDs() As Long, _
   ByRef CommandButtonStyles() As Long _
) As HResult
Parameters
ResourceFilename
EnvironmentCatID
This is the Identifier of the environment to which commands are being added.
CategoryName
This is a name that the add-in associates with the set of commands it is adding to the environment. The name should be internationalized as it can be presented to the user by Solid Edge.
IDColorBitmapMedium
This is the ID of the bitmap resource containing medium-sized images of all the toolbar buttons that the add-in is adding.
IDColorBitmapLarge
This is the ID of the bitmap resource containing large-sized images of all the toolbar buttons that the add-in is adding.
IDMonochromeBitmapMedium
This is the ID of the bitmap resource containing medium-sized monochrome images of all the toolbar buttons that the add-in is adding.
IDMonochromeBitmapLarge
This the ID of the bitmap resource containing large-sized monochrome images of all the toolbar buttons that the add-in is adding.
NumberOfCommands
This is the number of commands being added to the environment.
CommandNames

This is an array of BSTRs. Each string can contain sub-strings separated by "\n".

The substrings are defined as follows:
• Name of the command you are adding. This should not be internationalized and should be tagged in such a way to help ensure uniqueness.
• Text displayed on the menu entry for the command. This substring may contain backslash characters, which Solid Edge (Version 7 or later) will use to create additional pop-up submenus and/or to add a separator preceding the command entry (Version 8 or later). The strings appearing between the backslashes become the title of the pop-up menu and the last string becomes the entry on the final menu. If the first character of any substring (including the first) is itself a backslash, Solid Edge will add a separator preceding the menu entry.
• Status bar string. This is the string displayed on the status bar.
• Tooltip string. This is the string displayed as the tooltip.
• Macro string. If present, this string becomes the macro associated with the command. Commands that have a macro string will not be invoked by calling OnCommand. Instead, Solid Edge runs the macro.
• Parameter string. If present, this string is passed as an argument to the macro.
Example:
"MyAddinCommand1\nSEaddin Sample Command\nDisplays a message box\nSeaddin Command"
 
The non-internationalized tag for the command is "MyAddinCommand1". "Seaddin Sample Command" will appear as an entry on the addin's pop-up menu created by Solid Edge. "Displays a message box" will appear in the status field of the frame window. "Seaddin Command" is displayed as the tooltip for the command if it is added to a command bar by calling AddCommandBarButton.
Example:
"MyAddinCommand1\nSEaddin\ Sample Command\nDisplays a message box\nSeaddin Command"
 
This example is identical to the one above with one exception. That being that an additional pop-up submenu named "Seaddin" will exist with "Sample Command" being an entry on that pop-up
Example:
"MyAddinCommand1\nSEaddin\\ Another Sample Command\nDisplays a message box\nSeaddin Command"
 
This example is identical to the one above with one exception. Due to the additional backslash, a separator will be inserted preceding the menu entry "Another Sample Command".

CommandIDs
This is a pointer to a SAFEARRAY of identifiers the add-in is to associate with each command being added. The add-in is free to choose any identifier it wishes. The command identifier chosen by the add-in is what is passed in OnCommand, OnCommandUpdateUI and OnCommandHelp.
CommandIDs is also an output of SetAddInInfo. When the function returns, the array contains the runtime command identifier Solid Edge has associated with the command. This identifier is what the operating system will pass in the WM_COMMAND message. It can also be used to add a button for the command using the "Add" method available in the command bar controls' automation interface.
CommandButtonStyles
The array size should match the size of the CommandNames array. Button styles are defined by the SeButtonStyle enumeration.
Remarks
For more information on ISetAddInInfoEx2 kindly refer to "..\SDK\Advanced\samples\Addins\Doc\addin.doc" which is available on setup DVD.
See Also

ISEAddInEx2 Object  | ISEAddInEx2 Members