预订演示
前页 后页

EA_GetRibbonCategory

Add-Ins can use EA_GetRibbonCategory events to identify the Ribbon in which the Add-In should place its menu icon.

This event occurs when Enterprise Architect first loads your Add-In. Enterprise Architect itself is loading at this time so that while a Repository object is supplied, there is limited information that you can extract from it.

The chief use for EA_GetRibbonCategory is in initializing the Add-In access point.

Syntax

Function EA_GetRibbonCategory (Repository As EA.Repository) As String

The EA_GetRibbonCategory function syntax has this parameter:

Parameter

Description

See also

Repository

EA.Repository

Direction: IN

Description: An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.

Repository Class

Return Value

A string matching the name of the selected ribbon (in English if you are using a translated version). The possible names are:

  • Start
  • Design
  • Layout
  • Publish
  • Specialize
  • Construct
  • Code
  • Simulate
  • Execute
  • Manage

It is not possible to include Add-Ins in the 'Specification - Specify' ribbon or 'Documentation - Edit' ribbon.

If the function isn't implemented (or if an invalid name is returned) the 'Add-In' menu will be available from the 'Specialize' ribbon, 'Add-Ins' panel.

Learn more