← Inbox

C3D-0542 · 261003 linework: CARPORT [C3D-0606] done

Draw CARPORT (4 verts, closed) on SS-V-BLDG-OTLN from the 236 Pinewood points.

Script file
C3D-0542.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("SS-V-BLDG-OTLN")){ lt.UpgradeOpen(); var l=new LayerTableRecord{Name="SS-V-BLDG-OTLN"}; lt.Add(l); Tx.AddNewlyCreatedDBObject(l,true); }
var lr=(LayerTableRecord)Tx.GetObject(lt["SS-V-BLDG-OTLN"],OpenMode.ForRead);
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
var V=new System.Collections.Generic.List<Point2d>(); V.Add(new Point2d(2323518.3230,1582461.4430));
V.Add(new Point2d(2323503.8410,1582473.5330));
V.Add(new Point2d(2323490.5480,1582457.9480));
V.Add(new Point2d(2323505.0300,1582445.8580));
var pl=new Polyline(); for(int i=0;i<V.Count;i++) pl.AddVertexAt(i,V[i],0,0,0); pl.Closed=true; pl.Layer="SS-V-BLDG-OTLN";
ms.AppendEntity(pl); Tx.AddNewlyCreatedDBObject(pl,true);
Log("CARPORT on SS-V-BLDG-OTLN 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-0542 (0 entities touched).
Entities
—
Duration
418 ms
Civil 3D
25.0.0.0

Log

CARPORT on SS-V-BLDG-OTLN v=4 closed=True len=78.7 h=21031 layerOff=False frozen=False

Notes

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

No notes yet.