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
SkrComputationAgentModelandSkrExtensionScripts(used as submodules). -
NSIS, only if you build installers.
Get the repository
Clone forge-scripts, then fetch its submodules:
git submodule update --init --recursive
|
Folder |
Content |
|---|---|
|
|
The model and helpers your program uses (submodule). |
|
|
The build and packaging scripts (submodule). |
|
|
One folder per extension: |
|
|
Build settings and the list of extensions to build. |
Create your extension
-
Copy an example folder under
src, for examplesrc/ForgeMergeStructure, and rename it. -
Rename the project so that the executable name matches
ScriptRelativePathin the.skrjob: the build looks for<executable name>.csprojunder the.skrjobfolder. -
Edit the
.skrjob(job name, executable, settings) and the.skrmanifest(Name,DisplayName,Description; keepTargetPlatform: Script). -
Add your extension to the
Outputlist ofVariables.json:
{
"Name": "SkrVR Extension - Forge Change Color",
"SkrJobPath": "src\\ForgeChangeColor\\changecolor.skrjob",
"OutputAsSinglePackage": "true",
"OutputScript": true,
"OutputCompressed": "false"
}
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 theInputfolder (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 ofMain(the examples have it commented out), and remove it before release.