Scripts and DLLs
Overview
There are two main methods for implementing extensions:
- Script Method (C# Script/Python Script)
Implementation method using script files
- .NET DLL Method
Implementation method compiling from C# to a .NET DLL
Differences Depending on Implementation Method
- The differences depending on the extension implementation method are as follows:
| Item | Script Method | .NET DLL Method |
|---|---|---|
| Next Design Object Model Manipulation | Yes | Yes |
| User-Triggered Event Handling | Yes | Yes |
| Extension Activation/Deactivation Processing (onActivate/onDeactivate) | Python Only | Yes |
| Advanced Functionality Extensions Conditional Formatting in Diagram View Adding Dynamic Constraints During Model Editing Operations Integrating User-Custom UI | No | Yes |
| Immediate Execution in Script Editor | Yes | No |
| Modification of Distributed Extensions | Yes | No |
| IntelliSense Code Completion | No | Yes (Visual Studio) |
| Debug Execution | No | Yes (Visual Studio) |
| Compilation Wait Time on First Processing Call | C#: Yes/Python: No | None |
| Processing Performance | High | High |
- Recommended is This is an implementation method for compiling C# to a .NET DLL.
It allows you to utilize powerful development support features such as IntelliSense and a debugger provided by Visual Studio, resulting in high productivity.
You can implement various custom functions using the extensive .NET libraries and develop extensions ranging from small to large scale.
-
With the C# script implementation method, the processing content can be made open. Extension users can check the processing content before using it, and if changes are needed, they can directly modify and run the script.
-
With the Python script implementation method, you can implement command and event handlers in the same way as with C# scripts.
-
Script-based C# scripts and Python scripts can also be executed immediately using Next Design's Script Editor.
-
The handler implementation code itself is common to both .NET DLL-based C# and script-based C# scripts. Therefore, it is possible to debug using Visual Studio with a .NET DLL, then make minor modifications to the implemented C# source code and provide it as a C# script.
Python scripts are a scripting language and cannot be developed as DLL extensions.
Also, some APIs may not be available from Python. For details, please refer to Python Script Limitations.