Skip to main content

File Preparation

When developing a script-based extension, create a development folder in any location and prepare the following files:

  • Required Files
  • Manifest file (manifest.json) ... Extension definition
  • Script file ... Entry point C# script file or Python script file
  • Locale file (locale.{lang}.json) ... Definition for each localization language (only required for multilingual support)

For example, when developing a script-based extension named helloworld, the basic file structure would be as follows:

helloworld/
manifest.json
main.cs
locale.en.json (for multilingual support)
locale.ja.json (for multilingual support)
resources/
button.png

Manifest File

  • Every Next Design extension requires one file named manifest.json. This is called the manifest.

  • This manifest contains the following definitions:

  • Extension Overview

  • Entry Point File Name

  • Lifecycle

  • Extension Points for UI, Events, and Commands

  • Use UTF-8 character encoding for the manifest.

  • The ribbon icon image specified in the manifest should be provided as a PNG file.

manifest.json
{
"name": "HelloWorld",

"main": "main.cs",

"lifecycle": "application",

"extensionPoints": {
...
}
}

For more information on manifests, see the Manifest Reference.

Script File

  • Implement the handlers called from the extension points defined in the manifest in the script file.

  • The file containing the handlers called from the extension points is called the Entry Point.

  • Only one entry point can be specified in the manifest. All handlers must be implemented in that single entry point.

main.cs
//Public function for command handler
public void SayHello(ICommandContext context, ICommandParams parameters)
{
App.Window.UI.ShowInformationDialog("Hello !", "Hello World");
}

For details on handlers, see Implementing Handlers with Scripts below.

Preparing Locale Files (Optional)

  • If you want to make the extension multilingual, define a locale file named locale.{lang}.json for each localization language.

  • For more information on multilingual support, see Multilingual Support.