← Inbox

C3D-CURBNOW · Read curb layer state done

Read-only: current Lines/Polylines on SS-V-ROAD-CURB with full geometry, to plan curb offsets.

Script file
C3D-CURBNOW.cs
Target
active document · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

// READ-ONLY: what linework is on the curb layer now, and where are the CL points, so the
// offset direction (toward the road) can be determined per run.
const string LAYER = "SS-V-ROAD-CURB";
int nl=0, npl=0, np3=0;
foreach (ObjectId id in ModelSpace)
{
    var ent = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
    if (ent == null || ent.Layer != LAYER) continue;
    var pl = ent as Polyline;
    if (pl != null) {
        npl++;
        var sb=new System.Text.StringBuilder();
        sb.Append($"PLINE h={ent.Handle} v={pl.NumberOfVertices} len={pl.Length:F1} closed={pl.Closed} :");
        for (int i=0;i<pl.NumberOfVertices;i++){var p=pl.GetPoint2dAt(i); sb.Append($" ({p.X:F2},{p.Y:F2})");}
        Log(sb.ToString());
        continue;
    }
    if (ent is Polyline3d) { np3++; continue; }
    var ln = ent as Line;
    if (ln != null) { nl++;
        Log($"LINE h={ent.Handle} ({ln.StartPoint.X:F2},{ln.StartPoint.Y:F2}) -> ({ln.EndPoint.X:F2},{ln.EndPoint.Y:F2}) len={ln.Length:F1}");
        continue; }
}
Log($"counts: Line={nl} Polyline={npl} Polyline3d={np3}");

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260709 - 1512 Bass Rd, Macon, GA 31210, USA\260709 - 1512 Bass Rd.dwg
Message
Executed C3D-CURBNOW (0 entities touched).
Entities
Duration
413 ms
Civil 3D
25.0.0.0

Log

LINE h=1C90F (2429507.87,1064344.54) -> (2429525.77,1065115.08) len=771.1
LINE h=1C910 (2429532.88,1064342.83) -> (2429550.90,1065116.06) len=773.8
PLINE h=1D0AC v=8 len=32.2 closed=False : (2429015.91,1064608.86) (2429013.97,1064612.31) (2429009.75,1064613.96) (2429006.13,1064609.97) (2429008.16,1064603.87) (2429012.74,1064602.76) (2429015.42,1064605.54) (2429015.91,1064608.86)
LINE h=1D0B7 (2429053.03,1064608.57) -> (2429052.31,1064607.17) len=1.6
PLINE h=1D0B9 v=9 len=89.4 closed=True : (2429108.67,1064691.10) (2429107.66,1064687.52) (2429135.54,1064678.51) (2429137.86,1064676.53) (2429140.14,1064674.39) (2429140.73,1064671.76) (2429145.36,1064672.40) (2429143.10,1064677.30) (2429139.16,1064680.82)
PLINE h=1D0BA v=5 len=8.0 closed=False : (2429142.46,1064665.03) (2429142.82,1064666.62) (2429143.54,1064668.06) (2429144.02,1064669.56) (2429145.36,1064672.40)
PLINE h=1D0BD v=5 len=11.3 closed=False : (2429139.61,1064669.34) (2429143.54,1064668.06) (2429142.82,1064666.62) (2429139.10,1064667.74) (2429139.61,1064669.34)
PLINE h=1D0BE v=2 len=2.7 closed=False : (2429140.73,1064671.76) (2429139.61,1064669.34)
PLINE h=1D0BF v=5 len=6.7 closed=False : (2429143.44,1064664.82) (2429143.77,1064666.29) (2429144.46,1064667.69) (2429144.95,1064669.19) (2429145.84,1064671.06)
LINE h=1D0C8 (2429142.46,1064665.03) -> (2429143.44,1064664.82) len=1.0
PLINE h=1D0C9 v=5 len=32.4 closed=False : (2429163.15,1064655.46) (2429160.30,1064645.22) (2429158.07,1064637.07) (2429156.50,1064631.99) (2429164.26,1064629.92)
PLINE h=1D0CA v=5 len=34.0 closed=False : (2429162.19,1064655.73) (2429159.34,1064645.49) (2429157.11,1064637.35) (2429155.36,1064631.68) (2429164.03,1064629.22)
LINE h=1D0DD (2429099.20,1064591.66) -> (2429099.92,1064591.48) len=3.0
LINE h=1D0DE (2429099.92,1064591.48) -> (2429098.42,1064586.00) len=5.7
PLINE h=1D0DF v=5 len=22.0 closed=True : (2429072.37,1064603.41) (2429073.77,1064603.02) (2429070.87,1064593.79) (2429070.87,1064593.79) (2429069.68,1064594.20)
LINE h=1D17A (2429045.38,1064696.46) -> (2429044.58,1064697.06) len=1.0
LINE h=1D31F (2429164.26,1064629.92) -> (2429164.03,1064629.22) len=0.7
LINE h=1D320 (2429112.05,1064607.90) -> (2429138.59,1064600.50) len=27.5
LINE h=1D321 (2429138.59,1064600.50) -> (2429140.59,1064608.20) len=2388.3
LINE h=1D322 (2429140.59,1064608.20) -> (2429114.20,1064615.61) len=2388.4
LINE h=1D323 (2429114.20,1064615.61) -> (2429112.05,1064607.90) len=8.0
PLINE h=1EF80 v=4 len=26.5 closed=False : (2429022.54,1064613.98) (2429023.89,1064614.84) (2429028.72,1064631.27) (2429030.49,1064638.85)
PLINE h=1EF81 v=4 len=25.4 closed=False : (2429022.28,1064615.01) (2429023.04,1064615.49) (2429027.75,1064631.52) (2429029.52,1064639.07)
PLINE h=1EF8A v=6 len=20.3 closed=False : (2429044.58,1064697.06) (2429046.12,1064696.32) (2429046.84,1064693.85) (2429046.71,1064688.51) (2429045.32,1064684.77) (2429041.94,1064678.97)
PLINE h=1EF8B v=6 len=18.6 closed=False : (2429044.15,1064696.15) (2429045.28,1064695.61) (2429045.83,1064693.71) (2429045.72,1064688.70) (2429044.41,1064685.20) (2429041.07,1064679.48)
PLINE h=1EF8C v=9 len=42.6 closed=False : (2429041.07,1064679.48) (2429038.26,1064674.32) (2429035.28,1064667.22) (2429033.63,1064661.71) (2429031.97,1064656.20) (2429030.24,1064650.65) (2429029.13,1064645.93) (2429029.11,1064642.12) (2429029.52,1064639.07)
PLINE h=1EF8D v=9 len=42.0 closed=False : (2429041.95,1064679.00) (2429039.16,1064673.89) (2429036.23,1064666.89) (2429034.58,1064661.43) (2429032.92,1064655.91) (2429031.21,1064650.38) (2429030.13,1064645.81) (2429030.11,1064642.19) (2429030.51,1064639.21)
LINE h=1EF96 (2429030.49,1064638.85) -> (2429058.29,1064631.04) len=1198.6
LINE h=1EF97 (2429032.92,1064647.51) -> (2429036.77,1064646.43) len=4.0
LINE h=1EF98 (2429036.98,1064661.95) -> (2429040.83,1064660.87) len=4.0
LINE h=1EF99 (2429036.98,1064661.95) -> (2429032.92,1064647.51) len=15.0
LINE h=1F575 (2429040.83,1064660.87) -> (2429036.77,1064646.43) len=15.0
LINE h=1F576 (2429034.95,1064654.73) -> (2429038.80,1064653.65) len=4.0
LINE h=20F1A (2428087.05,1064333.83) -> (2428045.95,1064370.83) len=56.4
LINE h=20F1B (2427981.34,1064423.05) -> (2427942.84,1064453.12) len=48.9
LINE h=20F1C (2427876.57,1064539.16) -> (2427867.90,1064532.23) len=11.1
LINE h=20F1D (2427867.90,1064532.23) -> (2427860.55,1064523.95) len=11.1
LINE h=20F1E (2427860.55,1064523.95) -> (2427857.36,1064517.44) len=7.2
LINE h=20F1F (2427857.36,1064517.44) -> (2427855.64,1064507.72) len=9.9
LINE h=20F20 (2427855.64,1064507.72) -> (2427855.00,1064502.96) len=4.8
LINE h=20F21 (2427855.00,1064502.96) -> (2427854.52,1064502.02) len=1.1
LINE h=20F22 (2427854.52,1064502.02) -> (2427853.03,1064500.45) len=2.2
LINE h=20F23 (2427853.03,1064500.45) -> (2427851.16,1064499.40) len=2.1
LINE h=20F24 (2427851.16,1064499.40) -> (2427850.03,1064498.57) len=1.4
LINE h=20F25 (2427850.03,1064498.57) -> (2427849.21,1064496.93) len=1.8
LINE h=20F26 (2427849.21,1064496.93) -> (2427849.13,1064496.55) len=0.4
LINE h=20F27 (2427849.13,1064496.55) -> (2427849.11,1064496.55) len=0.0
LINE h=20F28 (2427849.11,1064496.55) -> (2427850.70,1064492.44) len=4.4
LINE h=20F29 (2427850.70,1064492.44) -> (2427852.97,1064488.66) len=4.4
LINE h=20F2D (2427831.31,1064450.69) -> (2427818.16,1064452.41) len=13.3
LINE h=20F2E (2427818.16,1064452.41) -> (2427797.69,1064430.91) len=29.7
LINE h=20F2F (2427800.70,1064590.29) -> (2427813.07,1064537.84) len=56.2
LINE h=20F31 (2427781.98,1064553.13) -> (2427785.05,1064531.87) len=21.5
LINE h=20F33 (2427813.64,1064526.61) -> (2427812.91,1064504.53) len=22.1
LINE h=20F34 (2427812.91,1064504.53) -> (2427813.45,1064498.98) len=5.6
LINE h=20F35 (2427813.45,1064498.98) -> (2427815.07,1064491.34) len=7.8
LINE h=20F36 (2427815.07,1064491.34) -> (2427818.09,1064484.51) len=7.5
LINE h=20F37 (2427818.09,1064484.51) -> (2427824.72,1064479.71) len=8.2
LINE h=20F38 (2427824.72,1064479.71) -> (2427835.15,1064475.87) len=11.1
LINE h=20F39 (2427835.15,1064475.87) -> (2427844.48,1064476.41) len=9.4
LINE h=20F3A (2427844.48,1064476.41) -> (2427849.56,1064480.51) len=6.5
LINE h=20F3B (2427849.56,1064480.51) -> (2427849.67,1064480.51) len=0.1
LINE h=20F3C (2427849.67,1064480.51) -> (2427851.59,1064485.27) len=5.1
LINE h=20F3D (2427851.59,1064485.27) -> (2427852.74,1064488.51) len=3.4
LINE h=20F3E (2427796.19,1064605.18) -> (2427796.17,1064605.18) len=0.0
LINE h=20F3F (2427796.17,1064605.18) -> (2427798.73,1064601.18) len=4.7
LINE h=20F40 (2427798.73,1064601.18) -> (2427799.74,1064598.08) len=3.3
LINE h=20F41 (2427799.74,1064598.08) -> (2427800.70,1064590.29) len=7.9
LINE h=20F43 (2427769.79,1064596.39) -> (2427770.25,1064591.32) len=5.1
LINE h=20F44 (2427770.25,1064591.32) -> (2427770.94,1064588.50) len=2.9
LINE h=20F45 (2427770.94,1064588.50) -> (2427773.52,1064583.78) len=5.4
LINE h=20F46 (2427773.52,1064583.78) -> (2427779.11,1064565.44) len=19.2
LINE h=20F49 (2427796.19,1064605.18) -> (2427778.32,1064665.46) len=62.9
LINE h=20F4A (2427813.34,1064704.03) -> (2427797.62,1064698.52) len=16.7
LINE h=20F4B (2427797.62,1064698.52) -> (2427789.95,1064695.15) len=8.4
LINE h=20F4C (2427789.95,1064695.15) -> (2427783.77,1064690.42) len=7.8
LINE h=20F4D (2427783.77,1064690.42) -> (2427778.67,1064681.78) len=10.0
LINE h=20F4E (2427778.67,1064681.78) -> (2427777.46,1064677.38) len=4.6
LINE h=20F4F (2427777.46,1064677.38) -> (2427777.43,1064670.38) len=7.0
LINE h=20F50 (2427777.43,1064670.38) -> (2427778.32,1064665.46) len=5.0
LINE h=20F52 (2427874.24,1064754.19) -> (2427849.69,1064745.92) len=25.9
LINE h=20F53 (2427849.69,1064745.92) -> (2427844.26,1064745.94) len=5.4
LINE h=20F54 (2427844.26,1064745.94) -> (2427841.50,1064745.22) len=2.9
LINE h=20F55 (2427841.50,1064745.22) -> (2427837.64,1064741.72) len=5.2
LINE h=20F57 (2427860.95,1064720.25) -> (2427854.50,1064716.22) len=7.6
LINE h=20F58 (2427854.50,1064716.22) -> (2427851.46,1064715.28) len=3.2
LINE h=20F59 (2427851.46,1064715.28) -> (2427844.83,1064714.61) len=6.7
LINE h=20F5A (2427844.83,1064714.61) -> (2427813.34,1064704.03) len=33.2
LINE h=20F5C (2427837.64,1064741.72) -> (2427791.46,1064726.06) len=48.8
LINE h=20F5D (2427791.46,1064726.06) -> (2427783.52,1064723.99) len=8.2
LINE h=20F5E (2427783.52,1064723.99) -> (2427777.48,1064723.66) len=6.1
LINE h=20F5F (2427777.48,1064723.66) -> (2427773.15,1064724.37) len=4.4
LINE h=20F60 (2427773.15,1064724.37) -> (2427764.13,1064728.77) len=10.0
LINE h=20F61 (2427764.13,1064728.77) -> (2427758.45,1064735.04) len=8.5
LINE h=20F62 (2427769.79,1064596.39) -> (2427733.10,1064718.22) len=127.2
LINE h=20F63 (2427933.18,1064803.66) -> (2427929.40,1064801.64) len=4.3
LINE h=20F64 (2427929.40,1064801.64) -> (2427926.51,1064799.26) len=3.7
LINE h=20F65 (2427926.51,1064799.26) -> (2427924.60,1064795.15) len=4.5
LINE h=20F66 (2427924.60,1064795.15) -> (2427922.03,1064786.80) len=8.7
LINE h=20F67 (2427922.03,1064786.80) -> (2427921.24,1064783.71) len=3.2
LINE h=20F68 (2427921.24,1064783.71) -> (2427919.51,1064779.37) len=4.7
LINE h=20F69 (2427919.51,1064779.37) -> (2427916.02,1064774.30) len=6.2
LINE h=20F6A (2427916.02,1064774.30) -> (2427910.85,1064769.24) len=7.2
LINE h=20F6B (2427910.85,1064769.24) -> (2427905.40,1064765.83) len=6.4
LINE h=20F6C (2427905.40,1064765.83) -> (2427898.75,1064762.73) len=7.3
LINE h=20F6E (2427910.69,1064736.98) -> (2427917.61,1064737.48) len=6.9
LINE h=20F6F (2427917.61,1064737.48) -> (2427923.57,1064736.35) len=6.1
LINE h=20F70 (2427923.57,1064736.35) -> (2427928.00,1064733.99) len=5.0
LINE h=20F71 (2427928.00,1064733.99) -> (2427931.55,1064731.19) len=4.5
LINE h=20F72 (2427931.55,1064731.19) -> (2427932.71,1064730.11) len=1.6
LINE h=20F98 (2427933.18,1064803.66) -> (2427997.98,1064825.25) len=68.3
LINE h=20F99 (2427997.98,1064825.25) -> (2428002.16,1064828.13) len=5.1
LINE h=20F9A (2428002.16,1064828.13) -> (2428005.99,1064834.33) len=7.3
LINE h=20F9B (2428005.99,1064834.33) -> (2428006.28,1064841.54) len=7.2
LINE h=20F9D (2428029.67,1064852.22) -> (2428032.62,1064846.16) len=6.7
LINE h=20F9E (2428032.62,1064846.16) -> (2428039.63,1064841.75) len=8.3
LINE h=20F9F (2428039.63,1064841.75) -> (2428047.46,1064841.69) len=7.8
LINE h=20FA0 (2428047.46,1064841.69) -> (2428050.31,1064842.41) len=3.0
LINE h=20FA1 (2428050.31,1064842.41) -> (2428055.03,1064844.02) len=5.0
LINE h=20FA2 (2428055.03,1064844.02) -> (2428057.14,1064844.58) len=2.2
LINE h=20FA3 (2428057.14,1064844.58) -> (2428063.74,1064846.84) len=7.0
LINE h=20FA4 (2428063.74,1064846.84) -> (2428064.85,1064847.62) len=1.4
LINE h=20FA5 (2428064.85,1064847.62) -> (2428064.48,1064848.86) len=1.3
LINE h=20FB4 (2427994.88,1064802.03) -> (2427993.63,1064801.33) len=1.4
LINE h=20FB5 (2427993.63,1064801.33) -> (2427992.50,1064798.88) len=2.7
LINE h=20FB6 (2427992.50,1064798.88) -> (2427988.27,1064781.44) len=18.0
LINE h=20FB7 (2427988.27,1064781.44) -> (2427960.05,1064772.15) len=29.7
LINE h=20FBF (2427993.49,1064774.78) -> (2427965.27,1064765.49) len=29.7
LINE h=20FC1 (2427860.95,1064720.25) -> (2427910.69,1064736.98) len=52.5
LINE h=20FC2 (2427813.07,1064537.84) -> (2427813.64,1064526.61) len=11.2
LINE h=20FC3 (2427889.22,1064480.15) -> (2427890.95,1064477.90) len=2.9
LINE h=20FC4 (2427890.95,1064477.90) -> (2427907.97,1064487.12) len=19.4
LINE h=20FC5 (2427907.97,1064487.12) -> (2427911.09,1064483.94) len=4.5
LINE h=20FC6 (2427911.09,1064483.94) -> (2427942.07,1064493.58) len=32.4
LINE h=20FC7 (2427942.07,1064493.58) -> (2427958.24,1064506.78) len=20.9
LINE h=20FC8 (2427958.24,1064506.78) -> (2427976.43,1064514.09) len=19.6
PLINE h=20FCD v=2 len=18.4 closed=False : (2428026.93,1064744.86) (2428041.49,1064735.59)
LINE h=20FCF (2428155.49,1064483.51) -> (2428140.24,1064495.49) len=19.4
LINE h=20FD1 (2428196.65,1064492.69) -> (2428135.26,1064529.86) len=72.3
PLINE h=20FD2 v=2 len=35.0 closed=False : (2428155.49,1064483.51) (2428169.77,1064452.57)
LINE h=20FD3 (2428123.35,1064442.77) -> (2428155.49,1064483.51) len=51.9
LINE h=20FDB (2428068.04,1064371.91) -> (2428117.93,1064435.58) len=80.9
LINE h=20FE5 (2427778.99,1064565.27) -> (2427781.98,1064553.13) len=20.7
counts: Line=126 Polyline=17 Polyline3d=25

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.