C3D-AUTOLOAD · Auto-load plugin at Civil 3D startup (registry) done
ENVIRONMENT CHANGE, not a drawing edit. Registered Civil3DScriptHost.dll for demand-loading so it auto-loads at Civil 3D startup - NETLOAD no longer needed each session. KEY: HKCU\SOFTWARE\Autodesk\AutoCAD\R25.0\ACAD-8100:409\Applications\Civil3DScriptHost (LOADCTRLS=2 startup, MANAGED=1, LOADER=<dll path>). UNDO: Remove-Item -Path 'HKCU:\SOFTWARE\Autodesk\AutoCAD\R25.0\ACAD-8100:409\Applications\Civil3DScriptHost' -Recurse -Force. GOTCHA: the DLL is locked by acad.exe while loaded, so rebuilding now needs Civil 3D closed (or delete the key first). Scope: current user only, Civil 3D 2025 only. See the payload for full notes.
C# payload
// ENVIRONMENT CHANGE - NOT A DRAWING EDIT. Recorded for traceability only; this script was not run // by the plugin. The change was made directly to the Windows registry via PowerShell. // // WHAT WAS DONE // Registered Civil3DScriptHost.dll for demand-loading so it auto-loads at Civil 3D startup // and NETLOAD is no longer needed each session. // // REGISTRY KEY CREATED // HKCU\SOFTWARE\Autodesk\AutoCAD\R25.0\ACAD-8100:409\Applications\Civil3DScriptHost // // VALUES // DESCRIPTION (REG_SZ) = "Civil3D Jira Script Host" // LOADCTRLS (REG_DWORD) = 2 // 2 = load on application startup // LOADER (REG_SZ) = C:\dev\civil3d-jira\dotnet\Civil3DScriptHost\bin\Debug\Civil3DScriptHost.dll // MANAGED (REG_DWORD) = 1 // .NET assembly, not ObjectARX // // TO UNDO (PowerShell): // Remove-Item -Path "HKCU:\SOFTWARE\Autodesk\AutoCAD\R25.0\ACAD-8100:409\Applications\Civil3DScriptHost" -Recurse -Force // ...then NETLOAD manually again as before. // // SIDE EFFECT / GOTCHA // The DLL is locked by acad.exe whenever it is loaded. With auto-load enabled that is EVERY // session, so rebuilding the plugin (MSB3027 "locked by AutoCAD") now requires either: // a) close Civil 3D, build, reopen -- or -- // b) delete the registry key above (or rename the DLL), build, then re-add it. // // SCOPE // HKCU = current user only (sanja). Not machine-wide. Civil 3D 2025 (R25.0) only; a future // version has a different hive (R26.0 etc.) and would need its own key. // // VERIFICATION // Launch Civil 3D and read queue/host-status.json -- loaded:true with a fresh heartbeatUtc and // no manual NETLOAD means it worked.
Result
Log
ENVIRONMENT CHANGE - the plugin did NOT execute this script. Recorded for traceability.
WHAT: registered Civil3DScriptHost.dll for demand-loading so it auto-loads at Civil 3D
startup. NETLOAD is no longer needed each session.
KEY CREATED:
HKCU\SOFTWARE\Autodesk\AutoCAD\R25.0\ACAD-8100:409\Applications\Civil3DScriptHost
VALUES:
DESCRIPTION (REG_SZ) = Civil3D Jira Script Host
LOADCTRLS (REG_DWORD) = 2 (2 = load on application startup)
LOADER (REG_SZ) = C:\dev\civil3d-jira\dotnet\Civil3DScriptHostin\Debug\Civil3DScriptHost.dll
MANAGED (REG_DWORD) = 1 (.NET assembly, not ObjectARX)
(values read back after write - verified)
TO UNDO (PowerShell):
Remove-Item -Path 'HKCU:\SOFTWARE\Autodesk\AutoCAD\R25.0\ACAD-8100:409\Applications\Civil3DScriptHost' -Recurse -Force
...then NETLOAD manually again as before.
GOTCHA: the DLL is locked by acad.exe whenever loaded. With auto-load that is EVERY session,
so a plugin rebuild (MSB3027 'locked by AutoCAD') now requires either:
a) close Civil 3D, build, reopen -- or --
b) delete the registry key above (or rename the DLL), build, then re-add it.
SCOPE: HKCU = current user only (sanja), not machine-wide.
Civil 3D 2025 (R25.0) only - a future version uses a different hive (R26.0 etc).
VERIFY: launch Civil 3D and read queue/host-status.json. loaded:true with a fresh
heartbeatUtc and no manual NETLOAD means it worked.Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.