Using the Process Analyst > Process Analyst for Developers > Automation Model > IToolbarButtons.Add [Method]

IToolbarButtons.Add [Method]

Adds a toolbar button linked to the command identified by the supplied Command Id to this Toolbar.

Defined As



[in] The Command ID of a command to link to the new button that is being added.

Execution Result

If this method succeeds, the return value will be Success. If the command ID is invalid, the return value will be InvalidArgument.


If this method succeeds, the ID supplied will be linked to the new button that is added. The Commands properties will be applied to that button. (its icon, tooltip, security) If this button is pressed, the CommandExecuted event will raise with this Command ID.

See Also

CommandExecuted [Event]

Calling Syntax

This example assumes there is a valid ToolbarButtons collection as retrieved from an ObjectView (for example, VBA: objectView.Toolbars.Item(1).Buttons).


Sub Example(Buttons As Object)
End Sub


FUNCTION Example(OBJECT hButtons)
_ObjectCallMethod(hButtons, "Add", "Citect_Command_Help");