| Table of Contents |
|---|
Overview
With the release of ETABS v22.0.0 , SAFE v22.0.0 , SAP2000 v26.0.0 , and CSiBridge v26.0.0 , it is now possible to create plugins for CSI products using .NET 8 . To learn more about the .NET 8 platform , please see What's new in .NET 8 . This example will guide a developer through creating a simple .NET 8 plugin using the C# programming language. By making use of the cross-product CSI API library, this example is compatible with ETABS v22.0.0 , SAFE v22.0.0 , SAP2000 v26.0.0 , and CSiBridge v26.0.0 (or a higher version of any of these).
Walkthrough
Prerequisites
This walkthrough uses Microsoft Visual Studio 2022 and the .NET 8 SDK. One of the following CSI products must be installed on the development computer: ETABS v22.0.0 , SAFE v22.0.0 , SAP2000 v26.0.0 , or CSiBridge v26.0.0 (higher versions of any product will also work)
Creating the plugin assembly
- Selecting C# as the language, create a new project of type Class Library. Ensure that the selected project type targets .NET or .NET Standard, not .NET Framework.
...
The file with extension deps.json will manage your plugin assembly's dependencies. Your plugin's dependencies will not interfere with those of CSI products. For instance, all CSI products make use of the Newtonsoft.Json package, but your plugin will only use the Newtonsoft.Json.dll present in the same folder as your plugin.
Using the plugin in a CSI product
Your project output directory should now contain your built plugin assembly ( CSiNET8PluginExample1.DLL ) and all of its dependencies, except CSiAPIv1.DLL . The steps below demonstrate how to call this plugin from within a CSI product. The screenshots below are of ETABS, but the steps are the same for every CSI product.
...
9. If you enter the text crash in the plugin textbox, a message box will appear with your chosen error code.
For download
Download the Visual Studio solution of this example, with an already built, ready-to-run plugin assembly: CSiNET8PluginExample1.zip
References
...

