C3D-0037 · READ-ONLY: identify the sewer easement label that will not move [SSE-LABEL-READ] done
Enumerates every label/MText/leader on the SS-/C-PROP/SEWER layers with its concrete type, layer, position, text and (for Civil labels) its LabelLocation, parent FeatureId and style. Determines what the label is anchored to before anything is moved. No changes.
C# payload
// READ-ONLY. Find the sewer-easement label that "points way out here" and won't move.
//
// Earlier the ParcelAreaLabel scan returned 0, so whatever is annotating these parcels is NOT a
// ParcelAreaLabel. Enumerate EVERY label-ish entity in model space, print its concrete type, its
// layer, where it sits, and what it is anchored to. No changes - I am not moving anything until
// I know what holds it.
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
int n = 0;
foreach (ObjectId id in ms) {
var o = Tx.GetObject(id, OpenMode.ForRead);
var t = o.GetType();
string tn = t.Name;
bool labelish = tn.Contains("Label") || o is MText || o is DBText || o is Leader || o is MLeader;
if (!labelish) continue;
var ent = o as Autodesk.AutoCAD.DatabaseServices.Entity;
string lay = ent != null ? ent.Layer : "?";
// only the sewer-easement neighbourhood
if (!(lay.StartsWith("SS-") || lay.StartsWith("C-PROP") || lay.Contains("SEWER"))) continue;
n++;
string where = "";
try { var e2 = ent.GeometricExtents; where = String.Format("at {0:F2},{1:F2}", e2.MinPoint.X, e2.MinPoint.Y); } catch { }
string txt = "";
var mt = o as MText; if (mt != null) txt = mt.Contents;
var dt = o as DBText; if (dt != null) txt = dt.TextString;
if (txt.Length > 60) txt = txt.Substring(0, 60) + "...";
Log(String.Format("[{0}] {1} layer={2} {3} {4}", ent.ObjectId.Handle, tn, lay, where, txt));
// If it is a Civil label, report its anchor/parent - that is what decides whether it can move.
var lbl = o as Autodesk.Civil.DatabaseServices.Label;
if (lbl != null) {
try { Log(" LabelLocation " + lbl.LabelLocation.ToString()); } catch (System.Exception ex) { Log(" LabelLocation: " + ex.Message); }
try { Log(" FeatureId " + lbl.FeatureId.Handle + " (" + Tx.GetObject(lbl.FeatureId, OpenMode.ForRead).GetType().Name + ")"); } catch (System.Exception ex) { Log(" FeatureId: " + ex.Message); }
try { Log(" StyleName " + lbl.StyleName); } catch { }
}
}
Log("label-ish entities on sewer/prop layers: " + n);
Result
Log
[2E1ED] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296402.12,1280240.39
LabelLocation (2296403.17850637,1280241.1394547732,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Bearing over Distance
[2E1EE] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296385.66,1280165.81
LabelLocation (2296385.9884127406,1280166.834350622,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Bearing over Distance
[2E1EF] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296375.22,1279890.37
LabelLocation (2296420.326186874,1279890.9206833479,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Delta over Length and Radius
[2E1F0] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296346.56,1279804.74
LabelLocation (2296384.560719898,1279805.2883349122,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Delta over Length and Radius
[2E1F1] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296363.41,1279702.40
LabelLocation (2296411.1535444846,1279702.9534467752,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Delta over Length and Radius
[2E1F2] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296484.22,1279726.89
LabelLocation (2296527.9463112555,1279727.440927723,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Delta over Length and Radius
[2E1F3] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296682.40,1279952.18
LabelLocation (2296683.0629058126,1279953.216673859,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Bearing over Distance
[2E1F4] ParcelSegmentLabel layer=C-PROP-LINE-TEXT at 2296681.95,1280254.82
LabelLocation (2296683.116576569,1280255.162403881,743.1886999998242)
FeatureId 2E1EB (ParcelSegment)
StyleName Bearing over Distance
[2E305] MText layer=SS-0-FRAME at 2296635.25,1280100.14 FFE:728.5
[2E308] MText layer=SS-0-FRAME at 2296639.25,1280108.42 F.F.E.=728.50
[2ED70] MText layer=SEWER_MANHOLE_TEXT at 2296341.54,1279963.01 MH A16\PRIM 751.17\PIN N/A\POUT N/A
[2ED72] MText layer=SEWER_MANHOLE_TEXT at 2296515.73,1279921.78 MH A14\PRIM 734.14\PIN 722.02\POUT 721.82
[2ED74] MText layer=SEWER_MANHOLE_TEXT at 2296614.34,1279988.73 MH A12\PRIM 727.40\PIN N/A\POUT N/A
[2ED76] MText layer=SEWER_MANHOLE_TEXT at 2296603.69,1280087.47 TEST MH\PRIM 727.72\PIN N/A\POUT N/A
[2ED78] MText layer=SEWER_MANHOLE_TEXT at 2296719.11,1280063.42 TEST MH\PRIM 727.68\PIN 718.33\POUT 718.13
[2ED7A] MText layer=SEWER_MANHOLE_TEXT at 2296663.25,1279990.70 MH A10\PRIM 727.55\PIN 717.37\POUT 717.17
[2ED7C] MText layer=SEWER_MANHOLE_TEXT at 2296746.75,1279995.71 MH A9\PRIM 726.97\PIN 714.42\POUT 714.22
[2ED7E] MText layer=SEWER_MANHOLE_TEXT at 2296835.49,1280097.09 MH A6\PRIM 724.78\PIN 712.49\POUT 712.49
[2ED80] MText layer=SEWER_MANHOLE_TEXT at 2296844.60,1280009.00 MH A5\PRIM 721.41\PIN 699.94\POUT 699.56
[2ED82] MText layer=SEWER_MANHOLE_TEXT at 2296997.36,1279916.07 MH A4\PRIM 691.53\PIN 679.57\POUT 677.97
[2ED84] MText layer=SEWER_MANHOLE_TEXT at 2297204.67,1279650.20 MH A3\PRIM 682.94\PIN 673.80\POUT 673.72
[2ED86] MText layer=SEWER_MANHOLE_TEXT at 2297229.59,1279569.54 MH A2\PRIM 688.33\PIN 673.34\POUT 673.34
[2ED88] MText layer=SEWER_MANHOLE_TEXT at 2297436.05,1279626.17 MH A1\PRIM 687.05\PIN 672.41\POUT 672.31
[2ED8A] MText layer=SEWER_MANHOLE_TEXT at 2297429.21,1279569.39 MH 384\PRIM 686.70\PIN 671.84\POUT N/A
[2EDAA] Leader layer=SEWER_MANHOLE_TEXT at 2296638.20,1280058.10
[2EDAC] MText layer=SEWER_MANHOLE_TEXT at 2296636.40,1280088.49 \A1;
[2EDAF] Leader layer=SEWER_MANHOLE_TEXT at 2296685.19,1280052.35
[2EDB0] MText layer=SEWER_MANHOLE_TEXT at 2296719.16,1280063.51 \A1;
[2EDB3] Leader layer=SEWER_MANHOLE_TEXT at 2296604.65,1280013.46
[2EDB4] MText layer=SEWER_MANHOLE_TEXT at 2296613.48,1280011.66 \A1;
[2EDB7] Leader layer=SEWER_MANHOLE_TEXT at 2296690.96,1280012.65
[2EDB8] MText layer=SEWER_MANHOLE_TEXT at 2296691.43,1280010.92 \A1;
[2EDBB] Leader layer=SEWER_MANHOLE_TEXT at 2296714.07,1280010.88
[2EDBC] MText layer=SEWER_MANHOLE_TEXT at 2296746.76,1280009.08 \A1;
[2EDF8] MText layer=SEWER_MANHOLE_TEXT at 2296825.45,1280094.19 \A1;
[2EDFA] MText layer=SEWER_MANHOLE_TEXT at 2296821.13,1280098.45 \A1;
[2EE59] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296443.52,1279967.60
LabelLocation (2296443.673476115,1279967.5164062697,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE5A] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296538.57,1280000.74
LabelLocation (2296538.785916862,1280000.7527451166,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE5B] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296552.75,1280037.09
LabelLocation (2296552.8738791877,1280037.3141714982,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE5C] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296534.82,1280054.48
LabelLocation (2296535.042534085,1280054.5679922258,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE5D] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296571.55,1280065.35
LabelLocation (2296571.639421759,1280065.278315844,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE5E] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296651.48,1280061.07
LabelLocation (2296651.56915,1280060.9863999998,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE5F] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296706.16,1280052.43
LabelLocation (2296706.1781,1280052.42895,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE60] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296772.84,1280079.83
LabelLocation (2296773.0308,1280079.8111000005,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE61] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296860.31,1280079.72
LabelLocation (2296860.3068,1280079.7349500004,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE62] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296941.06,1279982.81
LabelLocation (2296941.08825,1279982.8738000002,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE63] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296990.09,1279920.36
LabelLocation (2296996.8540391745,1279950.6205502409,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE64] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296980.39,1279912.05
LabelLocation (2296980.4500003513,1279912.310000293,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE65] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296965.12,1279887.70
LabelLocation (2296965.5232022554,1279887.7828063422,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE66] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296917.79,1279963.41
LabelLocation (2296918.0517499996,1279963.6562,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE67] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296845.38,1280050.23
LabelLocation (2296845.6332,1280050.47505,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE68] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296768.21,1280041.22
LabelLocation (2296768.2892000005,1280041.4789,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE69] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296698.60,1280018.52
LabelLocation (2296698.8519,1280018.77105,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE6A] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296647.92,1280030.84
LabelLocation (2296648.0637999997,1280031.04905,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EE6C] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296564.12,1279983.51
LabelLocation (2296564.1667,1279983.7645,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EEDB] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297123.45,1279799.66
LabelLocation (2297123.5540520735,1279799.7357647703,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEDC] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297267.76,1279644.54
LabelLocation (2297267.7385,1279644.76205,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEDD] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297353.78,1279619.49
LabelLocation (2297354.0498524886,1279619.4451503404,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEDE] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297432.92,1279619.90
LabelLocation (2297432.867704977,1279620.1355006807,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEDF] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297347.62,1279598.14
LabelLocation (2297347.8478524885,1279598.4103503404,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEE0] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297250.93,1279627.90
LabelLocation (2297251.2215,1279628.1979500004,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEE1] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2297106.48,1279787.47
LabelLocation (2297106.8259482775,1279787.8142355229,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEE2] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296980.11,1279912.22
LabelLocation (2296980.4500003513,1279912.310000293,0)
FeatureId 2EED9 (ParcelSegment)
StyleName Standard.Tag.3
[2EEFD] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296428.03,1279937.54
LabelLocation (2296428.1907468364,1279937.75662987,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EEFE] ParcelSegmentLabel layer=SEWER_EASEMENT_TEXT at 2296378.74,1279946.19
LabelLocation (2296378.9666717914,1279946.3054797887,0)
FeatureId 2EE56 (ParcelSegment)
StyleName Standard.Tag.2
[2EF4E] MText layer=SEWER_LINE_TEXT at 2296646.40,1280045.65 12.07'
[2EF4F] MText layer=SEWER_LINE_TEXT at 2296437.94,1279954.37 131.42'
[2EF50] MText layer=SEWER_LINE_TEXT at 2296548.47,1279994.63 133.04'
[2EF51] MText layer=SEWER_LINE_TEXT at 2296571.36,1280050.73 55.11'
[2EF52] MText layer=SEWER_LINE_TEXT at 2296627.60,1280039.09 86.31'
[2EF53] MText layer=SEWER_LINE_TEXT at 2296698.88,1280032.67 30.96'
[2EF54] MText layer=SEWER_LINE_TEXT at 2296746.37,1280048.63 133.45'
[2EF55] MText layer=SEWER_LINE_TEXT at 2296833.09,1280068.79 80.39'
[2EF56] MText layer=SEWER_LINE_TEXT at 2296926.07,1279968.51 158.80'
[2EF57] MText layer=SEWER_LINE_TEXT at 2297110.45,1279789.95 358.92'
[2EF58] MText layer=SEWER_LINE_TEXT at 2297259.83,1279630.51 79.84'
[2EF59] MText layer=SEWER_LINE_TEXT at 2297337.46,1279609.17 155.36'
[2EF5A] MText layer=SEWER_LINE_TEXT at 2297425.25,1279602.83 19.53'
[2EF5B] MText layer=SEWER_LINE_TEXT at 2296686.09,1280046.57 8.66'
[2EF5C] MText layer=SEWER_LINE_TEXT at 2296655.17,1280047.63 N/A
[2EF5D] MText layer=SEWER_LINE_TEXT at 2296441.00,1279944.65 N/A
[2EF5E] MText layer=SEWER_LINE_TEXT at 2296557.12,1279990.22 N/A
[2EF5F] MText layer=SEWER_LINE_TEXT at 2296571.97,1280041.24 N/A
[2EF60] MText layer=SEWER_LINE_TEXT at 2296643.35,1280038.27 N/A
[2EF61] MText layer=SEWER_LINE_TEXT at 2296693.69,1280026.79 6.98%
[2EF62] MText layer=SEWER_LINE_TEXT at 2296762.99,1280058.70 1.29%
[2EF63] MText layer=SEWER_LINE_TEXT at 2296843.41,1280055.37 15.60%
[2EF64] MText layer=SEWER_LINE_TEXT at 2296920.01,1279963.53 12.58%
[2EF65] MText layer=SEWER_LINE_TEXT at 2297106.70,1279785.25 1.16%
[2EF66] MText layer=SEWER_LINE_TEXT at 2297251.96,1279628.90 0.47%
[2EF67] MText layer=SEWER_LINE_TEXT at 2297340.20,1279601.26 0.60%
[2EF68] MText layer=SEWER_LINE_TEXT at 2297417.12,1279602.45 2.41%
[2EF69] MText layer=SEWER_LINE_TEXT at 2296679.26,1280040.31 2.25%
label-ish entities on sewer/prop layers: 93Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.