C3D-0542 · 261003 linework: CARPORT [C3D-0606] done
Draw CARPORT (4 verts, closed) on SS-V-BLDG-OTLN from the 236 Pinewood points.
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
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.