← Inbox

C3D-0300 · 260610 Tara Blvd: dump the store fixture lines done

READ-ONLY. Every line and polyline inside the store footprint with layer and endpoints, so the green fixture rectangles can be reconstructed and given areas.

Script file
C3D-0300.cs
Target
260610 - 6736 Tara Blvd R2.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

// READ-ONLY: dump every LINE in the store area with layer + endpoints, so the fixture rectangles
// can be reconstructed and measured. Store bbox is (2261062.93,1391815.69) + 40.90 x 41.50.
Log("drawing: " + Db.Filename);
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
double X0=2261060, Y0=1391805, X1=2261110, Y1=1391860;
int n=0;
var byLayer = new Dictionary<string,int>();
foreach (ObjectId id in ms) {
    var ent = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
    if (ent == null) continue;
    var ln = ent as Line;
    if (ln != null) {
        var a = ln.StartPoint; var b = ln.EndPoint;
        if (a.X < X0 || a.X > X1 || a.Y < Y0 || a.Y > Y1) continue;
        n++;
        if (!byLayer.ContainsKey(ent.Layer)) byLayer[ent.Layer]=0;
        byLayer[ent.Layer]++;
        Log(string.Format("L [{0}] {1,-16} ({2:F3},{3:F3})->({4:F3},{5:F3}) len={6:F3}",
            ent.Handle, ent.Layer, a.X, a.Y, b.X, b.Y, ln.Length));
        continue;
    }
    var pl = ent as Polyline;
    if (pl != null) {
        var e = pl.GeometricExtents;
        if (e.MinPoint.X < X0 || e.MinPoint.X > X1 || e.MinPoint.Y < Y0 || e.MinPoint.Y > Y1) continue;
        n++;
        if (!byLayer.ContainsKey(ent.Layer)) byLayer[ent.Layer]=0;
        byLayer[ent.Layer]++;
        Log(string.Format("P [{0}] {1,-16} verts={2} closed={3} area={4:F3} bbox {5:F2}x{6:F2} at ({7:F3},{8:F3})",
            ent.Handle, ent.Layer, pl.NumberOfVertices, pl.Closed, pl.Area,
            e.MaxPoint.X-e.MinPoint.X, e.MaxPoint.Y-e.MinPoint.Y, e.MinPoint.X, e.MinPoint.Y));
        for (int i=0;i<pl.NumberOfVertices;i++){var v=pl.GetPoint2dAt(i);Log(string.Format("     v{0} ({1:F3},{2:F3})",i,v.X,v.Y));}
    }
}
Log("");
Log("entities in the store area: " + n);
foreach (var kv in byLayer) Log(string.Format("   {0,-20} {1}", kv.Key, kv.Value));

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260610 - 6736 Tara Blvd, Jonesboro, GA 30236, USA\260610 - 6736 Tara Blvd R2.dwg
Message
Executed C3D-0300 (0 entities touched).
Entities
Duration
903 ms
Civil 3D
25.0.0.0

Log

drawing: C:\Users\sanja\OneDrive\_SurveyDisco\260610 - 6736 Tara Blvd, Jonesboro, GA 30236, USA\260610 - 6736 Tara Blvd R2.dwg
L [20921] WALL             (2261103.827,1391807.693)->(2261103.827,1391814.193) len=6.500
L [20935] WALL             (2261062.927,1391857.193)->(2261062.927,1391850.193) len=7.000
L [209EF] WALL             (2261103.827,1391807.693)->(2261103.827,1391857.193) len=49.500
L [20C7A] FIXTURE          (2261083.427,1391849.193)->(2261062.927,1391849.193) len=20.500
L [20C7C] FIXTURE          (2261083.427,1391857.193)->(2261083.427,1391849.193) len=8.000
L [20C80] WALL             (2261062.927,1391857.193)->(2261062.927,1391823.693) len=33.500
L [20C81] WALL             (2261103.827,1391814.193)->(2261103.827,1391807.693) len=6.500
L [20C8E] WALL             (2261062.927,1391857.193)->(2261103.827,1391857.193) len=40.900
L [20D44] FIXTURE          (2261103.827,1391845.193)->(2261096.327,1391845.193) len=7.500
L [20D45] FIXTURE          (2261096.327,1391845.193)->(2261096.327,1391821.193) len=24.000
L [20D47] FIXTURE          (2261103.827,1391835.693)->(2261096.327,1391835.693) len=7.500
L [20D48] FIXTURE          (2261103.827,1391821.193)->(2261096.327,1391821.193) len=7.500
L [20D49] WALL             (2261103.827,1391814.193)->(2261097.327,1391814.193) len=6.500
L [20D4E] WALL             (2261097.327,1391807.693)->(2261097.327,1391815.693) len=8.000
L [20D50] WALL             (2261097.327,1391807.693)->(2261062.927,1391807.693) len=34.400
L [20D5A] WALL             (2261097.327,1391807.693)->(2261103.827,1391807.693) len=6.500
L [20D6F] WALL             (2261078.827,1391807.693)->(2261078.827,1391810.193) len=2.500
L [20D70] WALL             (2261070.427,1391807.693)->(2261070.427,1391810.193) len=2.500
L [20D72] WALL             (2261062.927,1391807.693)->(2261062.927,1391823.693) len=16.000
L [20D85] WALL             (2261097.327,1391815.693)->(2261084.827,1391815.693) len=12.500
L [20D8B] WALL             (2261084.827,1391807.693)->(2261084.827,1391815.693) len=8.000
L [20D8C] WALL             (2261078.827,1391810.193)->(2261070.427,1391810.193) len=8.400
L [20D8D] FIXTURE          (2261065.427,1391818.193)->(2261062.927,1391818.193) len=2.500
L [20D8E] FIXTURE          (2261065.427,1391824.693)->(2261062.927,1391824.693) len=2.500
L [20D8F] FIXTURE          (2261065.427,1391831.193)->(2261062.927,1391831.193) len=2.500
L [20D91] FIXTURE          (2261065.427,1391831.193)->(2261065.427,1391818.193) len=13.000
L [20D92] FIXTURE          (2261081.927,1391842.193)->(2261078.927,1391842.193) len=3.000
L [20D9A] FIXTURE          (2261078.927,1391825.693)->(2261078.927,1391842.193) len=16.500
L [20DA1] FIXTURE          (2261081.927,1391825.693)->(2261081.927,1391842.193) len=16.500
L [20DB4] FIXTURE          (2261081.927,1391823.693)->(2261081.927,1391825.693) len=2.000
L [20DC6] FIXTURE          (2261082.427,1391842.193)->(2261078.427,1391842.193) len=4.000
L [20DC7] FIXTURE          (2261078.427,1391842.193)->(2261078.427,1391843.193) len=1.000
L [20DC8] FIXTURE          (2261082.427,1391842.193)->(2261082.427,1391843.193) len=1.000
L [20DC9] FIXTURE          (2261082.427,1391843.193)->(2261078.427,1391843.193) len=4.000
L [20DCB] FIXTURE          (2261081.927,1391823.693)->(2261078.927,1391823.693) len=3.000
L [20DE1] FIXTURE          (2261080.427,1391842.193)->(2261080.427,1391825.693) len=16.500
L [20DFC] FIXTURE          (2261070.927,1391823.693)->(2261073.927,1391823.693) len=3.000
L [20E0E] FIXTURE          (2261078.927,1391823.693)->(2261078.927,1391825.693) len=2.000
L [20E11] FIXTURE          (2261081.927,1391825.693)->(2261078.927,1391825.693) len=3.000
L [20E12] FIXTURE          (2261073.927,1391842.193)->(2261070.927,1391842.193) len=3.000
L [20E13] FIXTURE          (2261070.927,1391825.693)->(2261070.927,1391842.193) len=16.500
L [20E14] FIXTURE          (2261073.927,1391825.693)->(2261073.927,1391842.193) len=16.500
L [20E15] FIXTURE          (2261073.927,1391825.693)->(2261070.927,1391825.693) len=3.000
L [20E16] FIXTURE          (2261073.927,1391823.693)->(2261073.927,1391825.693) len=2.000
L [20E17] FIXTURE          (2261074.427,1391842.193)->(2261070.427,1391842.193) len=4.000
L [20E18] WALL             (2261070.427,1391842.193)->(2261070.427,1391843.193) len=1.000
L [20E19] FIXTURE          (2261074.427,1391842.193)->(2261074.427,1391843.193) len=1.000
L [20E1A] FIXTURE          (2261074.427,1391843.193)->(2261070.427,1391843.193) len=4.000
L [20E1B] FIXTURE          (2261072.427,1391842.193)->(2261072.427,1391825.693) len=16.500
L [20E1C] WALL             (2261070.927,1391823.693)->(2261070.927,1391825.693) len=2.000
L [20E1D] FIXTURE          (2261089.927,1391842.193)->(2261086.927,1391842.193) len=3.000
L [20E1E] FIXTURE          (2261086.927,1391825.693)->(2261086.927,1391842.193) len=16.500
L [20E1F] FIXTURE          (2261089.927,1391825.693)->(2261089.927,1391842.193) len=16.500
L [20E20] FIXTURE          (2261089.927,1391825.693)->(2261086.927,1391825.693) len=3.000
L [20E21] FIXTURE          (2261089.927,1391823.693)->(2261089.927,1391825.693) len=2.000
L [20E22] FIXTURE          (2261090.427,1391842.193)->(2261086.427,1391842.193) len=4.000
L [20E23] FIXTURE          (2261086.427,1391842.193)->(2261086.427,1391843.193) len=1.000
L [20E24] FIXTURE          (2261090.427,1391842.193)->(2261090.427,1391843.193) len=1.000
L [20E25] FIXTURE          (2261090.427,1391843.193)->(2261086.427,1391843.193) len=4.000
L [20E26] FIXTURE          (2261088.427,1391842.193)->(2261088.427,1391825.693) len=16.500
L [20E27] FIXTURE          (2261086.927,1391823.693)->(2261086.927,1391825.693) len=2.000
L [20E28] FIXTURE          (2261078.927,1391823.693)->(2261081.927,1391823.693) len=3.000
L [20E29] FIXTURE          (2261086.927,1391823.693)->(2261089.927,1391823.693) len=3.000
L [20FFB] FIXTURE          (2261068.927,1391849.193)->(2261068.927,1391847.193) len=2.000
L [20FFC] FIXTURE          (2261072.927,1391849.193)->(2261068.927,1391849.193) len=4.000
L [20FFD] FIXTURE          (2261072.927,1391846.193)->(2261068.927,1391846.193) len=4.000
L [20FFE] FIXTURE          (2261068.927,1391847.193)->(2261062.927,1391847.193) len=6.000
L [20FFF] FIXTURE          (2261068.927,1391847.193)->(2261068.927,1391846.193) len=1.000
L [21007] FIXTURE          (2261072.927,1391849.193)->(2261072.927,1391846.193) len=3.000
L [21048] WALL             (2261063.927,1391849.201)->(2261063.927,1391849.193) len=0.008
L [21049] FIXTURE          (2261063.927,1391846.193)->(2261062.927,1391846.193) len=1.000
L [2104A] FIXTURE          (2261063.927,1391835.193)->(2261062.927,1391835.193) len=1.000
L [2104B] WALL             (2261063.927,1391846.193)->(2261063.927,1391835.193) len=11.000
L [21AD8] FIXTURE          (2261070.927,1391831.193)->(2261070.927,1391823.693) len=7.500
L [21AE3] FIXTURE          (2261078.927,1391825.693)->(2261078.927,1391842.193) len=16.500
L [21AE4] FIXTURE          (2261086.927,1391825.693)->(2261086.927,1391842.193) len=16.500
L [21AEE] FIXTURE          (2261103.827,1391857.193)->(2261103.827,1391852.193) len=5.000
L [21AEF] FIXTURE          (2261103.827,1391852.193)->(2261100.827,1391852.193) len=3.000
L [21AF0] FIXTURE          (2261100.827,1391857.193)->(2261100.827,1391852.193) len=5.000
P [21B0C] SHELV-TEST       verts=11 closed=True area=1476.300 bbox 40.90x41.50 at (2261062.927,1391815.693)
     v0 (2261100.827,1391857.193)
     v1 (2261083.377,1391857.193)
     v2 (2261083.427,1391849.193)
     v3 (2261068.927,1391849.193)
     v4 (2261068.927,1391847.193)
     v5 (2261062.927,1391847.193)
     v6 (2261062.927,1391818.193)
     v7 (2261084.827,1391815.693)
     v8 (2261097.327,1391815.693)
     v9 (2261103.827,1391821.193)
     v10 (2261103.827,1391857.193)

entities in the store area: 80
   WALL                 20
   FIXTURE              59
   SHELV-TEST           1

Notes

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

No notes yet.