C3D-0505 · Draw single building poly (HC+PORCH) 812 Christmas [C3D-0506] done
Draw one closed 8-corner building outline from HC + PORCH COR (601-600-613-614-615-612-611-606) on V-BLDG.
C# payload
var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForWrite);
if(!lt.Has("V-BLDG")){ var l=new LayerTableRecord{Name="V-BLDG",Color=Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByAci,5)}; lt.Add(l); Tx.AddNewlyCreatedDBObject(l,true); }
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
var V=new System.Collections.Generic.List<Point2d>(); V.Add(new Point2d(2434164.300000,1429374.844000));
V.Add(new Point2d(2434174.310000,1429371.460000));
V.Add(new Point2d(2434227.657000,1429362.235000));
V.Add(new Point2d(2434239.278000,1429359.884000));
V.Add(new Point2d(2434234.768000,1429402.036000));
V.Add(new Point2d(2434193.937000,1429409.540000));
V.Add(new Point2d(2434194.571000,1429406.941000));
V.Add(new Point2d(2434170.695000,1429411.740000));
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="V-BLDG";
ms.AppendEntity(pl); Tx.AddNewlyCreatedDBObject(pl,true);
Log("BLDG closed v="+pl.NumberOfVertices+" area="+pl.Area.ToString("F0")+" h="+pl.Handle);
Ed.Regen();
Result
Log
BLDG closed v=8 area=2815 h=22806
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.