Versions Compared

Key

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

...

To create a plugin compatible with multiple CSI products, use the cross-product API library, CSiAPIv1.DLL . This library contains all available interfacesinterfaces for all methods supported by all CSi products. Please note, however, that no CSI product implements every interface. Some API methods are not applicable to specific . Attempting to call an unsupported API method will return an error code. Developers should refer to the API documentation in the installed program directory to determine which methods are supported.

If you are making a plugin only for one CSI product, you can use the program-specific API library instead of the cross-product library. The program-specific API libraries are:

...

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 is freely available on GitHub and can be added to your project using the NuGet package manager . It is freely available on GitHub.

...

within Visual Studio.

Image Added


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 belowfollowing edits:




Code Block
languagexml
<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<TargetFramework>net8.0</TargetFramework>	
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<Platforms>AnyCPU;x64</Platforms>
	</PropertyGroup>

	<ItemGroup>
	  <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
	</ItemGroup>

	<ItemGroup>
	  <Reference Include="CSiAPIv1">
	
<HintPath>..\..\..\..\..\API\CSI.API\bin\Debug\CSiAPIv1.dll</HintPath> </Reference> </ItemGroup> </Project> Code Block
languagexml
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net8.0-windows</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <Platforms>AnyCPU;x64</Platforms> <EnableDynamicLoading>true</EnableDynamicLoading> <UseWindowsForms>true</UseWindowsForms> </PropertyGroup> <ItemGroup> <Reference Include="CSiAPIv1"> <HintPath>..\..\..\..\..\API\CSI.API\bin\Debug\
    <HintPath>..\Program Files\Computers and Structures\ETABS 22\CSiAPIv1.dll</HintPath>
		<Private>false</Private>
		<ExcludeAssets>runtime</ExcludeAssets>
	  </Reference>
	</ItemGroup>

</Project>



Code Block
languagexml
<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<TargetFramework>net8.0-windows</TargetFramework>	
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<Platforms>AnyCPU;x64</Platforms>
		<EnableDynamicLoading>true</EnableDynamicLoading>
		<UseWindowsForms>true</UseWindowsForms>
	</PropertyGroup>

	<ItemGroup>
	  <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
	</ItemGroup>

	<ItemGroup>
	  <Reference Include="CSiAPIv1">
	    <HintPath>..\
..\..\..\..\API\CSI.API\bin\Debug
Program Files\Computers and Structures\ETABS 22\CSiAPIv1.dll</HintPath>
		<Private>false</Private>
		<ExcludeAssets>runtime</ExcludeAssets>
	  </Reference>
	</ItemGroup>

</Project>



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>

...