Quick Start
Overview
When you install the ScriptEditor package, the following screen components are added, allowing you to write and run scripts to operate Next Design.
- [View] > [Pane] > [Script Editor] is added to the ribbon.
The following describes how to use the ScriptEditor package to start writing and running scripts in the following order:
- Install the ScriptEditor package
- Start writing and running scripts
Install the ScriptEditor package and NDInterop package
To prepare for using Script Editor, install the ScriptEditor package and NDInterop package using the following procedure.
- Install the [ScriptEditor] package and [NDInterop] package according to the following manual.
- After installation, restart Next Design and the ScriptEditor package will be available for use.
:::
Start writing and running scripts
You can write and run scripts by following the steps below.
- Click the [View] > [Pane] > [Script Editor] button on the ribbon.
:::
Preparations
Click [Open Folder] and specify the storage location for the output file of the script editor.
All files explained below will be stored in the folder specified here.
If you do not specify a folder, the script will be output to the following default folder.
C:\Users(user name)\AppData\Local\DENSO CREATE\Next Design ScriptEditor\Scripts
:::
Writing a script
- Write the script you want to run in the [Write a script] area of the script editor.
- Click the [Save] button to save the script.
Running a script
- Double-click the script you want to run from [Saved scripts] to open it.
- Click the [Run script] button to run the script written in the [Write a script] area.
Sharing a script
- You can share scripts created by members.
- You can refer to scripts created by others in the following way.
- When you write and save a script, a file with the extension [csx] is created.
- If you save the above file in the folder specified in [Open Folder], the file will appear in [Saved Scripts].
How to write a script
- The script language is C#.
In the [Write Script] area, you can use the input assistance function like Visual Studio.
:::
- For the API to be called, refer to About Next Design API in the Next Design Extension Development Manual.
Notes on running a script
Notes on running the script editor are listed below.
- Do not close the script editor while a script is running.
If you close it, the process will be interrupted. (No error will be displayed.) - Keep the running script editor active while running a script from the command line.
If you switch to another window during execution, processing may be performed on the active window. - If you want to run the script periodically using the Windows Task Scheduler, make sure that the user is logged on.
If you are logged on, there is no problem even if the screen is locked using the Windows screen lock function.