Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

4. Once your project is created, add a reference to the CSI API library. This will be located in the installed ETABS directory, typically C:\Program Files\Computers and Structures\ETABS 22\ . If you are making a plugin only for ETABS, select the ETABSv1.DLL . 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 .


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
languagexml
<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>


6. Rename the Class1.cs file to cPlugin.cs and paste in the following code. Please pay attention to the comments in the code, they contain important information about correct plugin operation.

...