...
4. Once your project is created, add a reference to the CSI API library. This will be located in the installed program directory, e.g. C:\Program Files\Computers and Structures\ETABS 22\ . If you'd like your plugin to be compatible with other CSI products, such as SAFE or SAP2000, use the cross-product API library, CSiAPIv1.DLL . If you are making a plugin only for ETABS, select the ETABSv1.DLL .
5. Almost all plugins will depend on other (non-CSI) libraries to execute complicated functionality. To simulate the correct management of these dependencies, this plugin makes trivial use of the popular Newtonsoft.Json serialization/deserialization library. It can be added to your project using the NuGet package manager. It is freely available on GitHub.
5. Some manual edits must be made to the project file in order for the plugin to run successfully. Open the project file (in our example, CSiNET8PluginExample1.csproj ) in a text editor, and make the highlighted changes shown below
|
|
|---|
| Code Block | ||
|---|---|---|
| ||
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net8.0-windows</TargetFramework> <UseWindowsForms>true</UseWindowsForms> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <EnableDynamicLoading>true</EnableDynamicLoading> <Platforms>AnyCPU;x64</Platforms> </PropertyGroup> <ItemGroup> <Reference Include="CSiAPIv1"> <HintPath>..\..\..\..\..\API\CSI.API\bin\Debug\CSiAPIv1.dll</HintPath> <Private>false</Private> <ExcludeAssets>runtime</ExcludeAssets> </Reference> </ItemGroup> </Project> |
...