← Inbox

C3D-0538 · 261003 linework: FENCE [C3D-0602] done

Draw FENCE (4 verts) on V-SITE-FNCE from the 236 Pinewood points.

Script file
C3D-0538.cs
Target
261003 - 236 Pinewood Trail.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForRead);
if(!lt.Has("V-SITE-FNCE")){ lt.UpgradeOpen(); var l=new LayerTableRecord{Name="V-SITE-FNCE"}; lt.Add(l); Tx.AddNewlyCreatedDBObject(l,true); }
var lr=(LayerTableRecord)Tx.GetObject(lt["V-SITE-FNCE"],OpenMode.ForRead);
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
var V=new System.Collections.Generic.List<Point2d>(); V.Add(new Point2d(2323567.7870,1582553.7620));
V.Add(new Point2d(2323550.2340,1582534.6820));
V.Add(new Point2d(2323518.4930,1582498.4920));
V.Add(new Point2d(2323457.1040,1582428.1570));
var pl=new Polyline(); for(int i=0;i<V.Count;i++) pl.AddVertexAt(i,V[i],0,0,0); pl.Closed=false; pl.Layer="V-SITE-FNCE";
ms.AppendEntity(pl); Tx.AddNewlyCreatedDBObject(pl,true);
Log("FENCE on V-SITE-FNCE v="+pl.NumberOfVertices+" closed="+pl.Closed+" len="+pl.Length.ToString("F1")+" h="+pl.Handle+" layerOff="+lr.IsOff+" frozen="+lr.IsFrozen);
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261003 - 236 Pinewood Trail, Dawsonville, GA 30534, USA\261003 - 236 Pinewood Trail.dwg
Message
Executed C3D-0538 (0 entities touched).
Entities
—
Duration
483 ms
Civil 3D
25.0.0.0

Log

FENCE on V-SITE-FNCE v=4 closed=False len=167.4 h=2102D layerOff=False frozen=False

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.