Executing in the script editor
Overview
Next Design's script editor allows you to write C# scripts directly and execute them immediately.
Because you can execute C# scripts without writing a manifest, it is useful when trying out handler implementation code while editing it or executing ad-hoc processing.
How to use
To execute a C# script in the script editor, follow these steps:
- Click [View] > [Pane] > [Script] from the ribbon to display the script editor.
- Write the script directly in the script editor, or copy the script to the clipboard and press ctrl+v to paste it.
- Click [Home] > [Script] > [Execute] from the ribbon in the script editor to execute the script.
Script example
When you execute the following script in the script editor, a confirmation dialog box will be displayed with the project name.
var project = App.Workspace.CurrentProject;
if (project == null)
{
UI.ShowInformationDialog(
"Please open the project file before executing.",
"script"
);
return;
}
UI.ShowInformationDialog(
"Project Name: " + project.Name,
"script"
);