用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hebackus/c3d-api-plugin --skill c3d-project-setup命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Corridors, baselines, regions, assemblies, subassemblies, corridor surfaces
Custom subassembly .NET design — CorridorState, SubassemblyGenerator, targets, SATemplate
Stock-subassembly pattern catalog — need→file index, worked DrawImplement recipes, point/link/shape code reference, mined from Autodesk's 120 VB stock subassemblies
基于 SOC 职业分类
正在显示 SKILL.md
| name | c3d-project-setup |
| description | .NET project setup for Civil 3D 2026 — references, namespaces, config, debugging |
Use this skill when creating a new Civil 3D plugin project or troubleshooting build/reference issues.
NETLOAD command in Civil 3DThe acad_path.props file defines three path variables for the three subdirectory locations where Civil 3D DLLs reside:
| Variable | Resolved Path | DLLs |
|---|---|---|
$(ArxMgdPath) | C:\Program Files\Autodesk\AutoCAD 2026 | acdbmgd.dll, acmgd.dll, accoremgd.dll |
$(OMFMgdPath) | C:\Program Files\Autodesk\AutoCAD 2026\ACA | AecBaseMgd.dll |
$(AeccMgdPath) | C:\Program Files\Autodesk\AutoCAD 2026\C3D | AeccDbMgd.dll |
| DLL | Variable | Purpose |
|---|---|---|
acdbmgd.dll | $(ArxMgdPath) | AutoCAD database managed wrapper |
acmgd.dll | $(ArxMgdPath) | AutoCAD application managed wrapper |
accoremgd.dll | $(ArxMgdPath) | AutoCAD core managed wrapper |
AecBaseMgd.dll | $(OMFMgdPath) | AEC base classes |
AeccDbMgd.dll | $(AeccMgdPath) | Civil 3D database classes |
AeccPressurePipesMgd.dll | $(AeccMgdPath) | Civil 3D pressure pipe network classes |
CRITICAL: Set Copy Local (Private) to False for all Autodesk DLLs. These are resolved at runtime by the Civil 3D host process. Setting them to True causes version conflicts and bloated output.
In .csproj (full reference block pattern):
<Reference Include="acdbmgd">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(ArxMgdPath)\acdbmgd.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="acmgd">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(ArxMgdPath)\acmgd.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="accoremgd">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(ArxMgdPath)\accoremgd.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AecBaseMgd">
<SpecificVersion>False</>
$(OMFMgdPath)\AecBaseMgd.dll
False
False
$(AeccMgdPath)\AeccDbMgd.dll
False
$(AeccMgdPath)\AeccPressurePipesMgd.dll
False
The acad_path.props file defines the Civil 3D installation paths:
<Civil3DPath>C:\Program Files\Autodesk\AutoCAD 2026</Civil3DPath>
<ArxMgdPath>$(Civil3DPath)</ArxMgdPath>
<OMFMgdPath>$(Civil3DPath)\ACA</OMFMgdPath>
<AeccMgdPath>$(Civil3DPath)\C3D</AeccMgdPath>
Import it in your .csproj (path is relative to your project; projects in CSharp/<PluginName>/ use two levels up):
<Import Project="..\..\acad_path.props" />
// AutoCAD base
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
// Civil 3D
using Autodesk.Civil.ApplicationServices;
using Autodesk.Civil.DatabaseServices;
using Autodesk.Civil.Settings;
Implement IExtensionApplication for initialization:
using Autodesk.AutoCAD.Runtime;
namespace MyPlugin
{
public class MyPlugin : IExtensionApplication
{
public void Initialize()
{
// Called when assembly is loaded via NETLOAD
}
public void Terminate()
{
// Called when Civil 3D shuts down
}
[CommandMethod("MYCOMMAND")]
public void MyCommand()
{
CivilDocument doc = CivilApplication.ActiveDocument;
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
// ...
}
}
}
In project Properties > Debug (or launchSettings.json):
C:\Program Files\Autodesk\AutoCAD 2026\acad.exe/ld "C:\Program Files\Autodesk\AutoCAD 2026\AecBase.dbx" /p "<<C3D_Imperial>>" /nologoC:\Program Files\Autodesk\AutoCAD 2026\UserDataCacheNote: Both acad.exe and AecBase.dbx live under the same AutoCAD install path (C:\Program Files\Autodesk\AutoCAD 2026).
Most Civil 3D features are exposed in the .NET API, including sites, parcels, sections, section views, data bands, and labels. COM interop may still be needed for certain advanced or niche features not covered by the managed wrappers. Use COM interop:
// Add COM interop DLL references:
// Autodesk.AEC.Interop.Base
// Autodesk.AEC.Interop.UiBase
// Autodesk.AECC.Interop.<domain> (Land, Roadway, Pipe, Survey)
// Autodesk.AECC.Interop.UiLand
CommandMethod attribute defines the AutoCAD command name (case-insensitive)[CommandMethod("COMMANDNAME")] on public void methodsc3d-root-objects - CivilApplication, transactions, settingsc3d-label-styles - Label style creation and components