C3DO-0808 · septic: read house / property lines around 285 (read-only) [C3D-S1READ] done
Read-only: polylines, lines, text and dims around the 285 Huckaby house, to place the 2005 septic sketch.
C# payload
string F(double v)=>v.ToString("0.###");
ObjectId H(string h)=>Db.GetObjectId(false,new Handle(Convert.ToInt64(h,16)),0);
ObjectId Lyr(string name,short c){ var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForRead); if(lt.Has(name)) return lt[name]; lt.UpgradeOpen(); var r=new LayerTableRecord{Name=name,Color=Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByAci,c)}; var id=lt.Add(r); Tx.AddNewlyCreatedDBObject(r,true); Log("layer created "+name); return id; }
ObjectId Put(BlockTableRecord btr, Autodesk.AutoCAD.DatabaseServices.Entity e, string layer){ e.SetDatabaseDefaults(Db); e.Layer=layer; var id=btr.AppendEntity(e); Tx.AddNewlyCreatedDBObject(e,true); return id; }
var LM=LayoutManager.Current;
BlockTableRecord PS(string name){ var l=(Layout)Tx.GetObject(LM.GetLayoutId(name),OpenMode.ForRead); return (BlockTableRecord)Tx.GetObject(l.BlockTableRecordId,OpenMode.ForWrite); }
var BT=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
var MS=(BlockTableRecord)Tx.GetObject(BT[BlockTableRecord.ModelSpace],OpenMode.ForWrite);
bool HasText(BlockTableRecord btr,string contains){ foreach(ObjectId id in btr){ var o=Tx.GetObject(id,OpenMode.ForRead); if(o is MText m && m.Contents.Contains(contains)) return true; if(o is DBText t && t.TextString.Contains(contains)) return true; } return false; }
// read-only: geometry around the 285 house (window N 1206700-1207350, E 2206000-2206550)
double x0=2206000,x1=2206550,y0=1206700,y1=1207350;
bool In(Point3d p)=>p.X>x0&&p.X<x1&&p.Y>y0&&p.Y<y1;
var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForRead);
foreach(ObjectId id in MS){
var e=Tx.GetObject(id,OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity; if(e==null) continue;
try{
var ex=e.GeometricExtents; if(ex.MaxPoint.X<x0||ex.MinPoint.X>x1||ex.MaxPoint.Y<y0||ex.MinPoint.Y>y1) continue;
}catch{ continue; }
string head=e.GetType().Name+" "+e.Handle+" ["+e.Layer+"]";
if(e is Polyline pl){ var s=new System.Text.StringBuilder(); for(int i=0;i<pl.NumberOfVertices;i++){ var p=pl.GetPoint2dAt(i); s.Append(" ("+F(p.X)+","+F(p.Y)+(pl.GetBulgeAt(i)!=0?" b"+pl.GetBulgeAt(i).ToString("0.###"):"")+")"); } Log(head+(pl.Closed?" closed":"")+" n"+pl.NumberOfVertices+s); }
else if(e is Line l) Log(head+" ("+F(l.StartPoint.X)+","+F(l.StartPoint.Y)+")-("+F(l.EndPoint.X)+","+F(l.EndPoint.Y)+")");
else if(e is MText m) Log(head+" @"+F(m.Location.X)+","+F(m.Location.Y)+" h"+F(m.TextHeight)+" rot"+F(m.Rotation*180/Math.PI)+" style "+((TextStyleTableRecord)Tx.GetObject(m.TextStyleId,OpenMode.ForRead)).Name+" | "+m.Contents.Replace("\\P"," / "));
else if(e is DBText t) Log(head+" @"+F(t.Position.X)+","+F(t.Position.Y)+" h"+F(t.Height)+" | "+t.TextString);
else if(e is AlignedDimension ad) Log(head+" ("+F(ad.XLine1Point.X)+","+F(ad.XLine1Point.Y)+")-("+F(ad.XLine2Point.X)+","+F(ad.XLine2Point.Y)+") style "+ad.DimensionStyleName+" txt "+ad.DimensionText+" meas "+F(ad.Measurement)+" scale "+F(ad.Dimscale)+" txth "+F(ad.Dimtxt));
else if(e is Autodesk.Civil.DatabaseServices.CogoPoint) continue;
else Log(head);
}
// any aligned dims anywhere: style + scale sample
int n=0; foreach(ObjectId id in MS){ if(Tx.GetObject(id,OpenMode.ForRead) is AlignedDimension d && n<7){ n++; Log("DIM "+d.Handle+" ["+d.Layer+"] style "+d.DimensionStyleName+" dimscale "+F(d.Dimscale)+" txt "+F(d.Dimtxt)+" asz "+F(d.Dimasz)+" meas "+F(d.Measurement)+" text '"+d.DimensionText+"'"); } }
Log("DIMSTYLE current "+((DimStyleTableRecord)Tx.GetObject(Db.Dimstyle,OpenMode.ForRead)).Name+" ; layers green-ish existing: "+string.Join(",", new[]{"SS-SEPTIC","C-SSWR-SEPT","V-SSWR-SEPT","SEPTIC"}.Where(x=>lt.Has(x))));
Result
Log
Circle 1A9D7 [SS-FLOW WELL] Line 20B77 [SS-0-FRAME] (2206359.564,1207313.013)-(2206344.787,1206809.19) Line 20B79 [PARCEL] (2206344.787,1206809.19)-(2205255.835,1206798.969) DBText 20B7A [LABELS] @2206389.038,1206837.763 h73.45 | P1 Line 20B81 [PARCEL] (2203439.776,1207293.677)-(2206379.573,1207312.932) DBPoint 20B83 [LABELS] Polyline 20CC6 [SS-V-ROAD-CNTR] n10 (2206420.867,1207345.771) (2206419.789,1207305.162) (2206418.923,1207267.691) (2206417.231,1207207.39) (2206415.054,1207135.818) (2206413.49,1207092.563) (2206413.226,1207086.529) (2206411.476,1207040.77) (2206409.861,1206994.509) (2206406.542,1206888.335) Polyline 20CC7 [SS-V-ROAD-EPVM] n4 (2206410.166,1207386.487) (2206407.934,1207303.242) (2206405.962,1207225.44) (2206402.702,1207124.256) Polyline 20CC8 [X-DRIV-CONC] closed n23 (2206284.68,1207157.797 b-0.19) (2206300.654,1207153.686) (2206311.151,1207141.568) (2206326.938,1207113.433 b0.101) (2206353.489,1207082.786) (2206372.694,1207071.085) (2206399.28,1207049.986) (2206399.604,1207050.151) (2206401.078,1207087.241) (2206381.523,1207084.378 b-0.179) (2206355.568,1207096.374 b-0.075) (2206333.428,1207125.894) (2206321.412,1207147.326 b0.274) (2206273.737,1207175.659) (2206237.149,1207178.416) (2206236.38,1207158.656) (2206242.739,1207158.557) (2206248.542,1207157.321) (2206252.554,1207153.932) (2206254.451,1207148.654) (2206254.801,1207143.749) (2206270.75,1207143.899 b-0.204) (2206279.876,1207156.231) Polyline 20CCC [SS-V-WALK] n14 (2206279.821,1207156.175) (2206284.68,1207157.797 b-0.157) (2206288.827,1207146.624) (2206289.668,1207115.498) (2206289.264,1207109.512 b-0.258) (2206284.786,1207102.782 b-0.093) (2206279.854,1207100.946) (2206277.67,1207100.853) (2206277.529,1207108.893) (2206280.159,1207108.834 b0.334) (2206285.363,1207112.572) (2206285.484,1207115.301) (2206284.675,1207146.274 b0.187) (2206279.821,1207156.175) Polyline 20CCE [V-STRC-WALL] n6 (2206379.582,1207034.912) (2206382.13,1207034.912 b0.178) (2206384.895,1207037.611 b0.197) (2206385.584,1207049.504 b0.149) (2206377.454,1207058.743 b0.149) (2206364.71,1207062.11) Polyline 20CCF [V-STRC-WALL] n6 (2206370.499,1207106.546 b0.146) (2206379.444,1207105.353 b0.214) (2206384.583,1207107.828 b0.087) (2206387.203,1207116.965 b0.092) (2206386.417,1207128.665 b0.092) (2206384.308,1207133.227) Polyline 20CD0 [SS-V-BLDG-OTLN] closed n4 (2206223.731,1207216.515) (2206221.065,1207211.07) (2206226.477,1207208.38) (2206229.129,1207213.64) Polyline 20CD1 [X-DRIV-CONC] closed n4 (2206224.326,1207123.605) (2206224.25,1207128.683) (2206218.557,1207128.63) (2206218.55,1207123.555) Polyline 20CD7 [SS-V-BLDG-OTLN] closed n12 (2206226.902,1207076.391) (2206226.62,1207090.657) (2206224.658,1207090.638) (2206224.141,1207143.51) (2206274.38,1207144.003) (2206274.388,1207132.658) (2206276.715,1207132.667) (2206276.881,1207119.984) (2206267.611,1207119.886) (2206267.893,1207091.074) (2206263.578,1207091.062) (2206263.701,1207076.258) Polyline 20CD8 [SS-V-BLDG-OTLN] closed n6 (2206275.798,1207119.975) (2206276.04,1207084.932) (2206263.64,1207084.851) (2206263.578,1207091.062) (2206267.893,1207091.074) (2206267.611,1207119.886) Line 20CF0 [SS-V-BLDG-OTLN] (2206218.436,1207118.992)-(2206218.393,1207124.494) Line 20CF2 [SS-V-BLDG-OTLN] (2206218.393,1207124.494)-(2206221.94,1207124.522) Line 20CF9 [SS-V-BLDG-OTLN] (2206218.4,1207123.577)-(2206221.947,1207123.605) Line 20CFA [SS-V-BLDG-OTLN] (2206218.408,1207122.66)-(2206221.955,1207122.688) Line 20CFB [SS-V-BLDG-OTLN] (2206218.415,1207121.743)-(2206221.962,1207121.771) Line 20CFC [SS-V-BLDG-OTLN] (2206218.422,1207120.826)-(2206221.969,1207120.854) Line 20CFD [SS-V-BLDG-OTLN] (2206218.429,1207119.909)-(2206221.976,1207119.937) Line 20CFE [SS-V-BLDG-OTLN] (2206218.436,1207118.992)-(2206221.983,1207119.02) Line 20CFF [SS-V-BLDG-OTLN] (2206221.94,1207124.522)-(2206221.983,1207119.02) Hatch 20D01 [X-DRIV-CONC] Line 20D0D [SS-V-BLDG-OTLN] (2206275.875,1207108.864)-(2206277.529,1207108.893) Line 20D11 [SS-V-BLDG-OTLN] (2206276.729,1207108.879)-(2206276.87,1207100.839) Line 20D19 [SS-V-BLDG-OTLN] (2206275.93,1207100.839)-(2206277.67,1207100.853) Polyline 20D1A [X-DRIV-CONC] closed n5 (2206218.436,1207118.992) (2206218.879,1207090.758) (2206224.658,1207090.638) (2206224.369,1207119.016) (2206221.983,1207119.02) Polyline 20D23 [V-STRC-WALL] n6 (2206370.909,1207107.457 b0.148) (2206379.353,1207106.351 b0.211) (2206383.74,1207108.381 b0.086) (2206386.209,1207117.076 b0.092) (2206385.448,1207128.417 b0.092) (2206383.491,1207132.649 b0.092) Polyline 20D32 [V-STRC-WALL] n6 (2206379.582,1207035.912) (2206381.906,1207035.912 b0.167) (2206383.993,1207038.042 b0.197) (2206384.654,1207049.133 b0.148) (2206376.928,1207057.892 b0.149) (2206364.747,1207061.11 b0.149) Line 20D33 [V-STRC-WALL] (2206364.71,1207062.11)-(2206364.747,1207061.11) Line 20D34 [V-STRC-WALL] (2206379.582,1207035.912)-(2206379.582,1207034.912) Line 20D35 [V-STRC-WALL] (2206370.909,1207107.457)-(2206370.499,1207106.546) Line 20D36 [V-STRC-WALL] (2206383.491,1207132.649)-(2206384.308,1207133.227) Polyline 20D40 [SS-V-ROAD-EPVM] n4 (2206402.702,1207124.256) (2206400.469,1207041.012) (2206398.498,1206963.209) (2206395.237,1206862.026) Polyline 20D48 [SS-V-ROAD-EPVM] n3 (2206395.237,1206862.026) (2206393.005,1206778.781) (2206391.953,1206749.984) Polyline 20D50 [SS-V-ROAD-CNTR] n4 (2206406.542,1206888.335) (2206405.464,1206847.726) (2206404.599,1206810.255) (2206402.906,1206749.954) Hatch 20D66 [X-DRIV-CONC] Line 20D91 [PARCEL] (2206379.573,1207312.932)-(2206344.787,1206809.19) Polyline 21215 [SS-V-ROAD-EPVM] n10 (2206432.863,1207345.453) (2206431.786,1207304.864) (2206430.92,1207267.384) (2206429.226,1207207.039) (2206427.048,1207135.419) (2206425.481,1207092.083) (2206425.216,1207086.037) (2206423.468,1207040.332) (2206421.854,1206994.113) (2206418.536,1206887.96) Polyline 21216 [SS-V-ROAD-EPVM] n4 (2206418.538,1206888.016) (2206417.461,1206847.428) (2206416.595,1206809.948) (2206414.901,1206749.603) Polyline 21237 [SS-BOUNDARY MAG FULL] closed n6 (2203439.776,1207293.677) (2203439.294,1206709.997) (2205253.509,1206719.663) (2205255.835,1206798.969) (2206344.787,1206809.19) (2206379.573,1207312.932) Polyline 213CD [SS-BOUNDARY CYAN 050] closed n8 (2206355.144,1206959.183) (2205260.181,1206948.904) (2205260.785,1206969.705) (2204842.492,1206967.355) (2204844.838,1206717.366) (2205253.532,1206719.662) (2205255.835,1206798.969) (2206344.787,1206809.19) Line 213DA [PARCEL] (2206359.417,1207313.018)-(2206344.787,1206809.19) Line 213DB [PARCEL] (2206344.787,1206809.19)-(2205255.838,1206798.652) AlignedDimension 213E1 [V-NODE-TEXT] (2206379.573,1207312.932)-(2206420.027,1207313.145) style Standard txt meas 40.455 scale 100 txth 0.11 Line 21452 [SS-0-FRAME] (2206344.787,1206809.19)-(2206342.461,1206729.884) NoteLabel 21485 [SS-BOUNDARY] Site 21488 [SS-BUFFER SETBACK] ParcelSegment 2148A [SS-BOUNDARY CYAN 050] Parcel 2148B [SS-BOUNDARY CYAN 050] Line 2149A [SS-0-FRAME] (2206408.431,1208254.489)-(2206379.573,1207312.932) Line 2149B [SS-BUFFER SETBACK] (2206379.573,1207312.932)-(2206384.57,1207312.778) Polyline 214A5 [SS-BOUNDARY] closed n8 (2206379.573,1207312.932) (2203439.776,1207293.677) (2203439.294,1206709.997) (2204844.837,1206717.486) (2204842.492,1206967.355) (2205260.785,1206969.705) (2205758.849,1207204.963) (2206376.506,1207212.913) Site 214A6 [SS-BOUNDARY] Line 2172E [PARCEL] (2206419.332,1207310.198)-(2206369.063,1206579.149) Polyline 217EF [SS-BOUNDARY RED] n7 (2206359.265,1207313.675) (2206343.895,1206809.869) (2205254.932,1206800.929) (2205252.513,1206721.626) (2203438.288,1206714.093) (2203439.456,1207297.772) (2206379.273,1207313.57) Line 21A00 [V-NODE-TEXT] (2206358.975,1206622.37)-(2206386.818,1207530.347) Line 21ADC [SS-V-POWER-EASEMENT] (2206379.508,1207323.339)-(2204868.663,1207306.503) NoteLabel 21C4F [C-ANNO] AlignedDimension 21C55 [SS-V-POWER-EASEMENT] (2206276.538,1207211.201)-(2206276.775,1206954.662) style Standard txt meas 256.539 scale 100 txth 0.11 NoteLabel 21DED [C-ANNO] ParcelSegment 2201F [C-PROP-LINE] Parcel 22020 [C-PROP] ParcelSegmentLabel 22027 [C-PROP-LINE-TEXT] Line 2241D [SS-BUFFER SETBACK] (2206224.658,1207090.638)-(2206224.141,1207143.51) Polyline 22572 [SS-BOUNDARY 5AC-C] closed n5 (2206376.506,1207212.913) (2205758.849,1207204.963) (2205260.785,1206969.705) (2205260.181,1206948.904) (2206368.603,1206955.175) Site 23113 [SPSYMBOLS] ParcelSegment 23115 [C-PROP-LINE] Parcel 23116 [C-PROP] ParcelSegmentLabel 23117 [C-PROP-LINE-TEXT] ParcelSegmentLabel 2311B [C-PROP-LINE-TEXT] ParcelSegmentLabel 2314C [C-PROP-LINE-TEXT] NoteLabel 2318A [C-ANNO] NoteLabel 231B1 [C-ANNO] MText 2322C [SPSYMBOLS] @2205715.315,1206853.581 h11 rot0 style SIMPLEX | TRACTS 1 AND 2 ARE A SUBDIVISION OF THE PARENT TRACT / CONTAINING 31.19 ACRES (1,358,462.43 SQ FT) AS DESCRIBED / IN DB 5857, PG 692, FAYETTE COUNTY, GEORGIA RECORDS. Line 23450 [SS-BUFFER SETBACK] (2206376.506,1207212.913)-(2206368.603,1206955.175) Line 23456 [SS-BUFFER SETBACK] (2205830.399,1207155.88)-(2206299.907,1207161.923) Line 23457 [SS-BUFFER SETBACK] (2206295.088,1207004.759)-(2205501.038,1207000.267) Line 2346C [SS-BUFFER SETBACK] (2206299.907,1207161.923)-(2206295.088,1207004.759) Line 2346D [SS-BUFFER SETBACK] (2206374.972,1207162.889)-(2206377.149,1207162.917) AlignedDimension 2363D [0] (2205445.168,1207306.778)-(2206379.573,1207312.932) style Standard txt meas 934.424 scale 100 txth 0.18 Polyline 23D8A [1] closed n4 (2206299.907,1207161.923) (2205830.399,1207155.88) (2205501.038,1207000.267) (2206295.088,1207004.759) MText 23D95 [0] @2205715.072,1206775.096 h10 rot0 style SIMPLEX | / CONTIGUOUS AREA - / TRACT 1 2.26 AC (98,267 SQ FT) / TRACT 2 - WEST OF STREAM 4.32 AC (188,214 SQ FT) / TRACT 2 - EAST OF STREAM 4.83 AC (210,252 SQ FT) AlignedDimension 23E91 [V-NODE-TEXT] (2206368.603,1206955.175)-(2206409.057,1206955.388) style Standard txt meas 40.455 scale 100 txth 0.11 MText 2429C [C-ANNO] @2205852.491,1207125.098 h12.3 rot0 style SIMPLEX | #285 HUCKABY RD MText 242A0 [C-ANNO] @2206438.147,1206979.325 h9.2 rot88.333 style SIMPLEX | DRIVEWAY CROSSES DITCH AT GRADE, NO CULVERT MText 242A6 [C-ANNO] @2206306.456,1207052.497 h9.9 rot88.244 style SIMPLEX | 75' FRONT B/L MText 242A7 [C-ANNO] @2206021.455,1207168.24 h9.9 rot0.737 style SIMPLEX | 50' SIDE B/L MText 24422 [C-ANNO] @2205844.459,1207025.9 h10.4 rot359.743 style SIMPLEX | MFFE 778.74 DIM 213E1 [V-NODE-TEXT] style Standard dimscale 100 txt 0.11 asz 0.18 meas 40.455 text '' DIM 21BA3 [SS-V-POWER-EASEMENT] style Standard dimscale 100 txt 0.11 asz 0.18 meas 99.586 text '100'' DIM 21C55 [SS-V-POWER-EASEMENT] style Standard dimscale 100 txt 0.11 asz 0.18 meas 256.539 text '' DIM 21CFD [SS-V-POWER-EASEMENT] style Standard dimscale 100 txt 0.11 asz 0.18 meas 150.002 text '150'' DIM 23534 [SS-BUFFER SETBACK] style Standard dimscale 100 txt 0.18 asz 0.18 meas 250.023 text '' DIM 2363D [0] style Standard dimscale 100 txt 0.18 asz 0.18 meas 934.424 text '' DIM 23E91 [V-NODE-TEXT] style Standard dimscale 100 txt 0.11 asz 0.18 meas 40.455 text '' DIMSTYLE current Standard ; layers green-ish existing:
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.