Documentation Home
v1.22 v1.23
v1.22 v1.23

Getting started – C# Dev environment

Set up your machine and create your first CAD Forge Max extension, starting from the forge-scripts repository.

Prerequisites

  • Windows, with .NET 10 SDK, PowerShell and Git.

  • A C# IDE: Visual Studio or Rider.

  • Access to the SkyReal GitHub repositories SkrComputationAgentModel and SkrExtensionScripts (used as submodules).

  • NSIS, only if you build installers.

Get the repository

Clone forge-scripts, then fetch its submodules:

PowerShell
git submodule update --init --recursive

Folder

Content

libraries/SkrComputationAgentModel

The model and helpers your program uses (submodule).

resources/SkrExtensionScripts

The build and packaging scripts (submodule).

src/<Extension>

One folder per extension: .skrjob, .skrmanifest, solution and project.

Variables.json

Build settings and the list of extensions to build.

Create your extension

  1. Copy an example folder under src, for example src/ForgeMergeStructure, and rename it.

  2. Rename the project so that the executable name matches ScriptRelativePath in the .skrjob: the build looks for <executable name>.csproj under the .skrjob folder.

  3. Edit the .skrjob (job name, executable, settings) and the .skrmanifest (Name, DisplayName, Description; keep TargetPlatform: Script).

  4. Add your extension to the Output list of Variables.json:

JSON
{
  "Name": "SkrVR Extension - Forge Change Color",
  "SkrJobPath": "src\\ForgeChangeColor\\changecolor.skrjob",
  "OutputAsSinglePackage": "true",
  "OutputScript": true,
  "OutputCompressed": "false"
}
  1. Write your program: see C# for the contract and the APIs, and the Examples.

Debug

  • Your extension is a plain console program: run it from your IDE with a working directory as first argument, followed by your settings (-name value). The working directory must contain the Input folder (Input/structure, Input/parts) prepared by CAD Forge Max.

  • To debug the program while CAD Forge Max runs it, add Debugger.Launch(); at the start of Main (the examples have it commented out), and remove it before release.

Next: How to install / deploy C# extension.