← Inbox

C3DO-0710 · 261101 redline read (read-only) done

Read-only: point group styles and order, point label styles, the monument and FF points, the legend ELELVATION text, the BLOCK_LEGEND tie dimensions, rasters, 11X17 paper text extents, title block cell lines and attribute positions.

Script file
C3DO-0710.cs
Target
261101 - 5491 Roswell Rd NE.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var cd=CivilDoc;
Func<ObjectId,string> nm=id=>{ if(id.IsNull) return "<null>"; try{ var o=Tx.GetObject(id,OpenMode.ForRead); var p=o.GetType().GetProperty("Name"); return p!=null?(string)p.GetValue(o):o.GetType().Name; }catch{ return "?"; } };
int i=0;
foreach(ObjectId id in cd.PointGroups){ var g=(Autodesk.Civil.DatabaseServices.PointGroup)Tx.GetObject(id,OpenMode.ForRead);
 Log("PG["+(i++)+"] "+g.Name+" n="+g.PointsCount+" styleOvr="+g.IsPointStyleOverridden+" style="+nm(g.PointStyleId)+" labelOvr="+g.IsPointLabelStyleOverridden+" label="+nm(g.PointLabelStyleId)); }
foreach(ObjectId id in cd.Styles.LabelStyles.PointLabelStyles.LabelStyles) Log("POINT LABEL STYLE "+nm(id));
foreach(ObjectId id in cd.Styles.PointStyles) Log("POINT STYLE "+nm(id));
var pts=new uint[]{163,309,243,328,329,330,334,154};
foreach(ObjectId id in cd.CogoPoints){ var p=(Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id,OpenMode.ForRead); if(Array.IndexOf(pts,p.PointNumber)<0) continue;
 Log("PT "+p.PointNumber+" style="+nm(p.StyleId)+" label="+nm(p.LabelStyleId)+" layer="+p.Layer+" desc="+p.RawDescription); }
var bt=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
foreach(var bn in new[]{"SS_LEGEND"}){ if(!bt.Has(bn)) continue; var b=(BlockTableRecord)Tx.GetObject(bt[bn],OpenMode.ForRead);
 foreach(ObjectId id in b){ var o=Tx.GetObject(id,OpenMode.ForRead); var t=o as DBText; var m=o as MText; if(t!=null&&t.TextString.ToUpper().Contains("EL")) Log("LEGEND DBText "+t.Handle+" '"+t.TextString+"'"); if(m!=null&&m.Contents.ToUpper().Contains("ELEL")) Log("LEGEND MText "+m.Handle+" '"+m.Contents+"'"); } }
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
foreach(ObjectId id in ms){ var d=Tx.GetObject(id,OpenMode.ForRead) as AlignedDimension; if(d==null||d.Layer!="BLOCK_LEGEND") continue;
 Log("DIM "+d.Handle+" "+d.XLine1Point.X.ToString("F2")+","+d.XLine1Point.Y.ToString("F2")+" -> "+d.XLine2Point.X.ToString("F2")+","+d.XLine2Point.Y.ToString("F2")+" meas="+d.Measurement.ToString("F2")+" style="+nm(d.DimensionStyle)+" dimtxt="+d.Dimtxt+" dimscale="+d.Dimscale+" dimasz="+d.Dimasz+" text='"+d.DimensionText+"'"); }
var ld=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
foreach(DBDictionaryEntry de in ld){ var lo=(Layout)Tx.GetObject(de.Value,OpenMode.ForRead); var b=(BlockTableRecord)Tx.GetObject(lo.BlockTableRecordId,OpenMode.ForRead);
 foreach(ObjectId id in b){ var r=Tx.GetObject(id,OpenMode.ForRead) as RasterImage; if(r!=null){ var ex=r.GeometricExtents; Log("RASTER "+lo.LayoutName+" "+r.Handle+" "+ex.MinPoint+" "+ex.MaxPoint); } }
 if(lo.LayoutName=="11X17"){ foreach(ObjectId id in b){ var e=(Autodesk.AutoCAD.DatabaseServices.Entity)Tx.GetObject(id,OpenMode.ForRead); try{ var ex=e.GeometricExtents; if(e is MText||e is DBText||e is BlockReference) Log("PS "+e.GetType().Name+" "+e.Handle+" "+e.Layer+" x "+ex.MinPoint.X.ToString("F2")+"-"+ex.MaxPoint.X.ToString("F2")+" y "+ex.MinPoint.Y.ToString("F2")+"-"+ex.MaxPoint.Y.ToString("F2")); }catch{} } } }
if(bt.Has("SS_BLOCK_11X17")){ var b=(BlockTableRecord)Tx.GetObject(bt["SS_BLOCK_11X17"],OpenMode.ForRead);
 foreach(ObjectId id in b){ var l=Tx.GetObject(id,OpenMode.ForRead) as Line; if(l!=null&&l.Length>0.3) Log("TBLINE "+l.StartPoint.X.ToString("F2")+","+l.StartPoint.Y.ToString("F2")+" -> "+l.EndPoint.X.ToString("F2")+","+l.EndPoint.Y.ToString("F2")); }
 foreach(ObjectId id in b){ var a=Tx.GetObject(id,OpenMode.ForRead) as AttributeDefinition; if(a!=null) Log("TBATT "+a.Tag+" @"+a.Position.X.ToString("F2")+","+a.Position.Y.ToString("F2")+" h="+a.Height.ToString("F3")); } }

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - 5491 Roswell Rd NE.dwg
Message
Executed C3DO-0710 (0 entities touched).
Entities
—
Duration
623 ms
Civil 3D
25.0.0.0

Log

PG[0] POB n=0 styleOvr=False style=? labelOvr=False label=?
PG[1] IPF NS n=4 styleOvr=False style=? labelOvr=False label=?
PG[2] PP n=2 styleOvr=False style=? labelOvr=False label=<null>
PG[3] Copy of TBC n=29 styleOvr=False style=? labelOvr=False label=?
PG[4] MH n=2 styleOvr=False style=? labelOvr=False label=<null>
PG[5] UTIL n=6 styleOvr=False style=? labelOvr=False label=?
PG[6] FH n=0 styleOvr=False style=? labelOvr=False label=<null>
PG[7] WM n=0 styleOvr=False style=? labelOvr=False label=<null>
PG[8] FF n=2 styleOvr=False style=? labelOvr=False label=?
PG[9] GAS n=1 styleOvr=False style=? labelOvr=False label=<null>
PG[10] TBC n=40 styleOvr=False style=? labelOvr=False label=<null>
PG[11] BUILDING n=18 styleOvr=False style=? labelOvr=False label=?
PG[12] No Display n=234 styleOvr=False style=<null> labelOvr=False label=<null>
PG[13] NORTHING_EASTING n=0 styleOvr=False style=? labelOvr=False label=?
PG[14] FENCE n=10 styleOvr=False style=? labelOvr=False label=?
PG[15] Display [SPECIFIC] n=64 styleOvr=False style=? labelOvr=False label=?
PG[16] TOPO n=184 styleOvr=False style=? labelOvr=False label=?
PG[17] WALL ELEV n=10 styleOvr=False style=? labelOvr=False label=?
PG[18] TREES n=0 styleOvr=False style=? labelOvr=False label=?
PG[19] _All Points n=234 styleOvr=False style=? labelOvr=False label=?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT LABEL STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
POINT STYLE ?
PT 154 style=<null> label=<null> layer=0 desc=BLDG COR STEP
PT 163 style=<null> label=<null> layer=0 desc=FF
PT 243 style=<null> label=<null> layer=0 desc=IPF 1\2 RBF
PT 309 style=<null> label=<null> layer=0 desc=FF
PT 328 style=<null> label=<null> layer=0 desc=IPF 1\2 OTP
PT 329 style=<null> label=<null> layer=0 desc=PROP LINE STAKE
PT 330 style=<null> label=<null> layer=0 desc=IPF 1 IN OTP
PT 334 style=<null> label=<null> layer=0 desc=I IN CRT IPF
LEGEND MText 1FDA7 'IPF IRON PIN FOUND \PIPP IRON PIN PROPOSED\PR/W RIGHT OF WAY\PRWM RIGHT OF WAY MARKER \PMAG MAGNETIC \PPOB POINT OF BEGINNING\PPOC POINT OF COMMENCEMENT\PB/L BUILDING LINE \PD.E. DRAINAGE EASEMENT\PN/F NOW OR FORMERLY \PL.L. LAND LOT\PPP POWER POLE    \P   DROP INLET\P   WATER VALVE\P   SEWER MANHOLE\P   FIRE HYDRANT\P   ELELVATION POINT\P   PROPERTY CORNER\P   FENCE'
DIM 213C1 2232598.44,1420480.33 -> 2232597.02,1420463.47 meas=16.91 style=Standard dimtxt=0.18 dimscale=40 dimasz=0.18 text=''
DIM 213DD 2232615.30,1420377.32 -> 2232597.02,1420463.47 meas=88.07 style=Standard dimtxt=0.18 dimscale=40 dimasz=0.18 text=''
PS DBText 157FA BLOCK_NORTH_ARROW x 10.49-10.57 y 13.46-14.11
PS MText 158D1 BLOCK_NOTES_FLOOD x 11.67-14.57 y 2.98-3.39
PS DBText 158E6 BLOCK_STAMP x 9.21-9.30 y 0.95-1.04
PS DBText 158E7 BLOCK_STAMP x 9.21-9.30 y 0.95-1.04
PS DBText 158E8 BLOCK_STAMP x 9.26-9.34 y 0.91-1.00
PS DBText 158E9 BLOCK_STAMP x 9.26-9.34 y 0.91-0.99
PS DBText 158EA BLOCK_STAMP x 9.86-9.95 y 0.94-1.03
PS DBText 158EB BLOCK_STAMP x 9.86-9.95 y 0.94-1.03
PS DBText 158EC BLOCK_STAMP x 9.74-9.81 y 0.86-0.94
PS DBText 158ED BLOCK_STAMP x 9.74-9.81 y 0.86-0.94
PS DBText 158EE BLOCK_STAMP x 9.03-9.17 y 0.83-0.98
PS DBText 158EF BLOCK_STAMP x 9.47-9.53 y 0.82-0.90
PS DBText 158F0 BLOCK_STAMP x 9.47-9.53 y 0.82-0.90
PS DBText 158F1 BLOCK_STAMP x 9.32-9.40 y 0.87-0.96
PS DBText 158F2 BLOCK_STAMP x 9.32-9.40 y 0.87-0.95
PS DBText 158F3 BLOCK_STAMP x 9.41-9.51 y 0.64-0.75
PS DBText 158F4 BLOCK_STAMP x 9.30-9.40 y 0.67-0.79
PS DBText 158F5 BLOCK_STAMP x 9.17-9.29 y 0.73-0.86
PS DBText 158F6 BLOCK_STAMP x 9.54-9.59 y 0.82-0.89
PS DBText 158F7 BLOCK_STAMP x 9.61-9.67 y 0.82-0.90
PS DBText 158F8 BLOCK_STAMP x 9.61-9.67 y 0.82-0.90
PS DBText 158F9 BLOCK_STAMP x 9.54-9.59 y 0.82-0.89
PS DBText 158FA BLOCK_STAMP x 9.68-9.75 y 0.83-0.92
PS DBText 158FB BLOCK_STAMP x 9.68-9.75 y 0.83-0.92
PS DBText 158FC BLOCK_STAMP x 9.69-9.77 y 0.64-0.75
PS DBText 158FD BLOCK_STAMP x 9.54-9.64 y 0.63-0.73
PS DBText 158FE BLOCK_STAMP x 10.00-10.12 y 0.83-0.95
PS DBText 158FF BLOCK_STAMP x 9.91-10.02 y 0.76-0.87
PS DBText 15900 BLOCK_STAMP x 9.80-9.89 y 0.89-0.98
PS DBText 15901 BLOCK_STAMP x 9.80-9.89 y 0.89-0.98
PS DBText 15902 BLOCK_STAMP x 9.81-9.90 y 0.69-0.80
PS DBText 15904 BLOCK_STAMP x 9.77-9.84 y 1.69-1.77
PS DBText 15905 BLOCK_STAMP x 9.21-9.99 y 1.29-1.36
PS DBText 15906 BLOCK_STAMP x 9.21-9.99 y 1.29-1.36
PS DBText 15907 BLOCK_STAMP x 9.21-9.99 y 1.29-1.36
PS DBText 15908 BLOCK_STAMP x 9.21-9.99 y 1.29-1.36
PS DBText 15909 BLOCK_STAMP x 9.21-9.99 y 1.29-1.36
PS DBText 1590A BLOCK_STAMP x 9.36-9.86 y 1.42-1.50
PS DBText 1590B BLOCK_STAMP x 9.16-9.24 y 1.02-1.10
PS DBText 1590C BLOCK_STAMP x 9.16-9.24 y 1.02-1.10
PS DBText 1590D BLOCK_STAMP x 9.08-9.20 y 1.70-1.82
PS DBText 15912 BLOCK_STAMP x 9.28-9.35 y 1.66-1.74
PS DBText 15913 BLOCK_STAMP x 9.34-9.42 y 1.70-1.78
PS DBText 15914 BLOCK_STAMP x 9.70-9.78 y 1.72-1.80
PS DBText 15915 BLOCK_STAMP x 9.22-9.30 y 1.61-1.70
PS DBText 15916 BLOCK_STAMP x 9.21-9.31 y 1.80-1.91
PS DBText 15917 BLOCK_STAMP x 9.43-9.46 y 1.73-1.80
PS DBText 15918 BLOCK_STAMP x 9.36-9.46 y 1.86-1.97
PS DBText 15919 BLOCK_STAMP x 9.64-9.70 y 1.74-1.82
PS DBText 1591A BLOCK_STAMP x 9.49-9.55 y 1.74-1.82
PS DBText 1591B BLOCK_STAMP x 9.57-9.62 y 1.75-1.82
PS DBText 1591C BLOCK_STAMP x 9.53-9.59 y 1.89-1.99
PS DBText 1591D BLOCK_STAMP x 9.68-9.77 y 1.87-1.98
PS DBText 1591E BLOCK_STAMP x 9.90-9.99 y 0.99-1.07
PS DBText 1591F BLOCK_STAMP x 9.90-9.99 y 0.99-1.07
PS DBText 15920 BLOCK_STAMP x 9.83-9.91 y 1.65-1.73
PS DBText 15921 BLOCK_STAMP x 9.94-10.06 y 1.72-1.84
PS DBText 15922 BLOCK_STAMP x 9.84-9.89 y 1.83-1.92
PS MText 1592B BLOCK_NOTES_FLOOD x 0.35-2.99 y 14.69-16.56
PS DBText 1660E BLOCK_CLOSURE x 9.38-9.79 y 4.02-4.08
PS DBText 1660F BLOCK_CLOSURE x 9.39-9.82 y 3.82-3.88
PS DBText 16610 BLOCK_CLOSURE x 8.84-10.58 y 4.11-4.19
PS DBText 16611 BLOCK_CLOSURE x 9.38-10.34 y 3.69-3.74
PS DBText 16612 BLOCK_CLOSURE x 9.39-10.21 y 3.91-3.97
PS DBText 16613 BLOCK_CLOSURE x 9.39-10.15 y 3.59-3.65
PS DBText 16614 BLOCK_CLOSURE x 8.86-10.62 y 3.46-3.51
PS MText 1664C BLOCK_CLOSURE x 0.34-2.89 y 13.75-14.61
PS BlockReference 1FDBA SS-BOUNDARY x 7.59-10.29 y 13.37-16.58
PS BlockReference 20355 BLOCK_TB2 x 0.17-10.81 y 0.29-16.76
PS DBText 20955 BLOCK_CLOSURE x 0.66-2.00 y 3.37-3.46
RASTER Model 1D6A6 (2235238.64554868,1420006.1242759498,1192.743799999822) (2235281.3628486805,1420099.8387759496,1192.743799999822)
TBLINE -0.04,0.04 -> -0.04,1.82
TBLINE -10.61,16.43 -> -0.04,16.43
TBLINE -10.65,16.48 -> 0.00,16.48
TBLINE -3.90,2.71 -> -3.90,2.05
TBLINE -10.20,1.78 -> -2.45,1.78
TBLINE -10.20,1.51 -> -2.45,1.51
TBLINE -10.20,1.24 -> -2.45,1.24
TBLINE -10.20,0.97 -> -2.45,0.97
TBLINE -10.20,2.05 -> -2.58,2.05
TBLINE -7.66,1.78 -> -7.66,0.97
TBLINE -2.58,2.05 -> -0.04,2.05
TBLINE -10.20,2.71 -> -0.04,2.71
TBLINE -5.55,1.78 -> -5.55,0.97
TBLINE -5.93,2.32 -> -5.18,2.32
TBLINE -4.18,2.39 -> -6.18,2.39
TBLINE -6.18,2.45 -> -4.18,2.45
TBLINE -5.17,2.33 -> -4.18,2.33
TBLINE -4.18,2.36 -> -5.18,2.36
TBLINE -5.17,2.34 -> -4.18,2.34
TBLINE -5.18,2.37 -> -4.18,2.37
TBLINE -5.18,2.32 -> -4.18,2.32
TBLINE -5.18,2.34 -> -4.18,2.34
TBLINE -5.18,2.35 -> -4.18,2.35
TBLINE -5.18,2.36 -> -4.18,2.36
TBLINE -5.18,2.38 -> -4.18,2.38
TBLINE -10.20,2.71 -> -10.20,0.04
TBLINE -2.45,2.05 -> -2.45,0.04
TBLINE -6.81,0.04 -> -0.04,0.04
TBLINE -0.04,2.71 -> -10.20,2.71
TBLINE 0.00,0.00 -> 0.00,6.88
TBLINE -0.04,0.04 -> -0.04,16.43
TBLINE -10.65,0.00 -> 0.00,0.00
TBLINE -10.65,16.48 -> -10.65,0.00
TBLINE -3.10,0.97 -> -3.10,0.04
TBLINE -0.00,6.88 -> -0.00,13.77
TBLINE -0.00,13.77 -> 0.00,16.48
TBATT JOB_NO @-5.10,1.06 h=0.117
TBATT SITE_ADDRESS @-10.14,1.87 h=0.117
TBATT REF_DB_PG @-10.13,1.05 h=0.117
TBATT LAND_LOT @-7.62,1.60 h=0.117
TBATT DISTRICT @-7.62,1.33 h=0.117
TBATT COUNTY @-7.63,1.05 h=0.117
TBATT DATE @-5.07,1.59 h=0.117
TBATT SUBDIVISION_NAME_LOT @-5.06,1.85 h=0.117
TBATT PREP_FOR @-10.09,2.24 h=0.150
TBATT SURVEY_TYPE @-10.18,2.82 h=0.200
TBATT FIRM_PANEL @-3.09,2.76 h=0.055
TBATT FIRM_DATE @-2.49,2.75 h=0.055
TBATT FLOOD_ZONE @-1.14,2.75 h=0.055

Notes

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

No notes yet.