一键导入
autocad-class-reference
Quick reference for AutoCAD .NET API classes - 1,248 types across 28 namespaces
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Quick reference for AutoCAD .NET API classes - 1,248 types across 28 namespaces
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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
Superelevation design, attainment, cross slope, pivot points, lane config
Block definitions, references, attributes, dynamic block properties, exploding
Dimensions — aligned, rotated, arc, radial, angular, ordinate, text overrides
| name | autocad-class-reference |
| description | Quick reference for AutoCAD .NET API classes - 1,248 types across 28 namespaces |
Quick lookup for 1,248 classes across 28 namespaces
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
[CommandMethod("MYCOMMAND")]
public void MyCommand()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
// Work with database objects
BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
BlockTableRecord btr = tr.GetObject(bt[BlockTableRecord.ModelSpace],
OpenMode.ForWrite) as BlockTableRecord;
tr.Commit();
}
}
using (Transaction tr = db.TransactionManager.StartTransaction())
{
BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
BlockTableRecord btr = tr.GetObject(bt[BlockTableRecord.ModelSpace],
OpenMode.ForWrite) as BlockTableRecord;
// Create a line
Line line = new Line(new Point3d(0, 0, 0), new Point3d(100, 100, 0));
line.ColorIndex = 1; // Red
btr.AppendEntity(line);
tr.AddNewlyCreatedDBObject(line, true);
tr.Commit();
}
using Autodesk.AutoCAD.EditorInput;
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
// Prompt for point
PromptPointOptions ppo = new PromptPointOptions("\nSelect point: ");
PromptPointResult ppr = ed.GetPoint(ppo);
if (ppr.Status == PromptStatus.OK)
{
Point3d pt = ppr.Value;
}
// Prompt for entity
PromptEntityOptions peo = new PromptEntityOptions("\nSelect entity: ");
peo.SetRejectMessage("\nMust be a line.");
peo.AddAllowedClass(typeof(Line), true);
PromptEntityResult per = ed.GetEntity(peo);
if (per.Status == PromptStatus.OK)
{
ObjectId lineId = per.ObjectId;
}
See ../../autocad-api-reference/CLASS_INDEX.md for complete listing of all 1,248 types.
For Civil 3D-specific classes, use:
/c3d-api:c3d-class-reference - Civil 3D classes/c3d-api:c3d-root-objects - CivilApplication/CivilDocumentFor specific AutoCAD entity and API topics, use:
/c3d-api:acad-tables - Creating and modifying AutoCAD table entities/c3d-api:acad-geometry - Working with geometric types (Point3d, Vector3d, curves)/c3d-api:acad-mtext - Creating and formatting MText entities/c3d-api:acad-mleaders - Creating and configuring MLeader entities/c3d-api:acad-fields - Working with AutoCAD field expressions/c3d-api:acad-dimensions - Creating dimension entities/c3d-api:acad-hatches - Creating hatch pattern fills/c3d-api:acad-blocks - Creating and inserting block references/c3d-api:acad-sheet-sets - Reading/writing Sheet Set (.dst) files via COM/c3d-api:acad-layers - Layer table, layer records, properties, and states/c3d-api:acad-editor-input - Editor prompts, selection sets, and filters/c3d-api:acad-polylines - Polyline, Polyline2d, Polyline3d entity detailsac3d_netapi2docs/docs/AutoCAD_2026/html/index.htmlac3d_netapi2docs/src/AutoCAD_2026/