C3D-0539 · 261003 linework: GATE [C3D-0603] done
Draw GATE (2 verts) on V-SITE-FNCE from the 236 Pinewood points.
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(2323542.9400,1582483.4670));
V.Add(new Point2d(2323537.1920,1582487.3150));
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("GATE 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
Log
GATE on V-SITE-FNCE v=2 closed=False len=6.9 h=2102E layerOff=False frozen=False
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.