소스 정보
- 저장소
- hebackus/c3d-api-plugin
- 최근 소스 활동
- 2026년 4월 9일 01:53
- 감지된 SKILL.md 언어
- 영어
- 스타
- 3
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/hebackus/c3d-api-plugin --skill acad-fields명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | acad-fields |
| description | Dynamic text fields — field codes, evaluation, embedding in MText/attributes |
Use this skill when creating or managing field objects - dynamic text that updates based on object properties, system variables, dates, formulas, or other data sources.
Namespace: Autodesk.AutoCAD.DatabaseServices
Base class: DBObject
// Create a field that shows the current date
Field dateField = new Field("%<\\AcVar Date \\f \"M/d/yyyy\">%");
// Create a field that shows an object property
Field propField = new Field(
string.Format("%<\\AcObjProp Object(%<\\_ObjId {0}>%).Area \\f \"%lu2%pr2\">%",
entityId.Handle));
// Set evaluation options
dateField.EvaluationOption = FieldEvaluationOptions.OnOpen
| FieldEvaluationOptions.OnSave
| FieldEvaluationOptions.OnPlot;
// Evaluate the field
dateField.Evaluate();
// Object property (area of a polyline)
string areaField = string.Format(
"%<\\AcObjProp Object(%<\\_ObjId {0}>%).Area \\f \"%lu2%pr2\">%",
entity.Handle);
// System variable
string dateField = "%<\\AcVar Date \\f \"M/d/yyyy\">%";
string fileNameField = "%<\\AcVar FileName>%";
string scaleField = "%<\\AcVar CANNOSCALE \\f \"%sc\">%";
// Formula field
string formulaField = "%<\\AcExpr (1 + 2) * 3>%";
// Sheet set fields
string sheetTitle = "%<\\AcSm SheetSet.Title>%";
string sheetNumber = "%<\\AcSm Sheet.Number>%";
// Diesel expression
string dieselField = "%<\\AcDiesel $(getvar,dwgname)>%";
MText mtext = new MText();
// Embed a field in MText content using field code syntax
mtext.Contents = "Area: %<\\AcObjProp Object(%<\\_ObjId "
+ entity.Handle + ">%).Area \\f \"%lu2%pr2\">%";
For managing nested/compound fields. Implements IDisposable — always Dispose() when done.
using (FieldCodeWithChildren fcc = field.GetFieldCodeWithChildren())
{
string code = fcc.FieldCode;
Field[] children = fcc.Children;
// Modify
fcc.FieldCode = "new field code";
fcc.Add(0, childField); // add child at index
field.SetFieldCodeWithChildren(fcc);
} // Dispose() called automatically
FieldEvaluationStatusResult status = field.EvaluationStatus;
FieldEvaluationStatus evalStatus = status.Status;
int errorCode = status.ErrorCode;
string errorMsg = status.ErrorMessage;
// Construct status manually
var result = new FieldEvaluationStatusResult(
FieldEvaluationStatus.Success, 0, "");
FieldEvaluationOptions (flags): Disable=0, OnOpen=1, OnSave=2, OnPlot=4, OnEtransmit=8, OnRegen=16, OnDemand=32, Automatic=63
FieldEvaluationStatus: NotYetEvaluated=1, Success=2, EvaluatorNotFound=4, SyntaxError=8, InvalidCode=16, InvalidContext=32, OtherError=64
FieldEvaluationContext: Open=1, Save=2, Plot=4, Etransmit=8, Regen=16, Demand=32, Preview=64
FieldState (flags): Initialized=1, Compiled=2, Modified=4, Evaluated=8, HasCache=16, HasFormattedString=32
FieldCodeFlags (flags): FieldCode=1, EvaluatedText=2, EvaluatedChildren=4, ObjectReference=8, AddMarkers=16, EscapeBackslash=32, StripOptions=64, PreserveFields=128, TextField=256
FieldFilingOptions (flags): SkipFilingResult=1
%< and >% as delimiters - these MUST be presentEvaluate() must be called explicitly for programmatically created fields; automatic evaluation only happens based on EvaluationOption triggersConvertToTextField() permanently freezes the field - it cannot be converted back to a dynamic field\\AcVar, \\AcObjProp, \\AcExpr, etc.)%<\\_ObjId>% syntax for object referencesGetFieldCode() without flags returns the raw field code; use FieldCodeFlags.EvaluatedText to get the current display value\\f format specifier in field codes uses AutoCAD format strings, not .NET format stringsacad-mtext — embedding fields in MText contentacad-tables — field content in table cellsacad-blocks — embedding fields in attribute definitionsSOC 직업 분류 기준