Click or drag to resize

Script Add-Ins (C#)

This topic shows how to create a script add-in for CUSTOMTOOLS using Visual C# 4 programming language in the Microsoft Visual Studio 2019 IDE.

Creating a C# project for the script add-in
  1. Start Microsoft Visual Studio 2019.

  2. Create C# Class library -project targeting .NET Framerwork 4.8.

  3. Open the .csproj project file with Notepad, and add <ProperyGroup><LangVersion>4</LangVersion></ProperyGroup> . This prevets you building with C# syntax that is not availble for CUSTOMTOOLS script add-ins.

  4. From CUSTOMTOOLS install folder, add Interop.CTEngineLib.dll and CTInterface.dll as Project References. Do NOT set Copy Local or Embed Interop Types for these assemblies. Copy Local should be set to true only in case you need to deploy a 3rd party DLL with your script, and your want to debug your script add-in in Visual Studio (Debugging Script Add-In With Visual Studio (C#)).

  5. Copy & Paste the example script from Getting Started. Notice it's recommended to use the Auto-References (C#) -syntax for all referenced DLLs like in the example script.

  6. Set target platform to x64 and build your project.

You have now successfully created a C# project for the CUSTOMTOOLS script add-in.

See Also