Skip to main content

define extension points

Define the following extension points by extension in your manifest:

  • Ribbon
  • event
  • command

Extension point details

For more information about extension points, see extension points.

Implementation example

Here is an example implementation of a simple extension point that defines a single button that executes the functionality of the extension.

  • In the extensionPoints section, define ribbon representing the configuration of the ribbon and commands representing the execution commands.

  • The ribbon defines the tabs, groups, and controls such as buttons that make up the ribbon.

  • Assign the command to execute to the button.

    In this example, the extensionPoints.ribbon.tabs[0].groups[0].controls[0].command property is given the ID Command.SayHello of the command defined later.

  • Command defines the ID and title of the execution command and the function name of the command handler.

    In this example, the extensionPoints.commands property defines the command with ID Command.SayHello as the first command to execute.
    The name SayHello in the extensionPoints.commands[0].execFunc property is the function name of the command handler implemented in the entry point executable main.cs.

manifest.json
{
//extension definition
"name": "Hello World",
"main": "main.cs",
"lifecycle": "application",

//extension point definition
"extensionPoints": {
//ribbon
"ribbon": {
"tabs": [
//ribbon tab
{
"id": "HelloWorld.MainTab",
"label": "Hello World",
"orderBefore": "System.View",
"groups": [
//group in ribbon tab
{
"id": "HelloWorld.FirstGroup",
"label": "Group 1",
"controls": [
//button
{
"id": "HelloWorld.SayHelloButton",
"type": "Button",
"label": "Say Hello",
"imageLarge": "images/About.png",
"command": "Command.SayHello"
}
]
}
]
}
]
},

//command
"commands": [
{
"id": "Command.SayHello",
"execFunc": "SayHello"
}
]
}
}

JSON Schema

Publish JSON schema definition (manifest.schema.json) on GitHub to help with manifest editing. I'm here. Please download and use it.