← Inbox

C3DO-0768 · 261101: manholes D -> S [C3D-MHS] done

Point style 'Storm Sewer Manhole' marker block Drainage MH (D) -> Sewer Manhole (S); repoint block refs 21920 (11X17 legend) and 1E7B6 (HOUSEDIM) from Drainage MH to Sewer Manhole. Drainage MH block definition is left in place.

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

C# payload

Func<string,ObjectId> oid=hs=>{ ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64(hs,16)),out id); return id; };
var bt=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
if(!bt.Has("Sewer Manhole")){ Log("STOP - block Sewer Manhole not found"); return; }
var sId=bt["Sewer Manhole"];
Autodesk.Civil.DatabaseServices.Styles.PointStyle ps=null;
foreach(ObjectId sid in CivilDoc.Styles.PointStyles){ var s=(Autodesk.Civil.DatabaseServices.Styles.PointStyle)Tx.GetObject(sid,OpenMode.ForRead); if(s.Name=="Storm Sewer Manhole") ps=s; }
if(ps==null){ Log("STOP - point style Storm Sewer Manhole not found"); return; }
string was=ps.MarkerSymbolName; ps.UpgradeOpen(); ps.MarkerSymbolName="Sewer Manhole";
Log("point style Storm Sewer Manhole symbol: "+was+" -> "+ps.MarkerSymbolName+(ps.MarkerSymbolName=="Sewer Manhole"?" (verified)":" (NOT SET)"));
foreach(var h in new[]{"21920","1E7B6"}){ var rid=oid(h); if(rid.IsNull||rid.IsErased){ Log("ref "+h+" not found"); continue; }
 var br=(BlockReference)Tx.GetObject(rid,OpenMode.ForWrite); string bw=br.Name; br.BlockTableRecord=sId;
 Log("ref "+h+": "+bw+" -> "+br.Name+(br.Name=="Sewer Manhole"?" (verified)":" (NOT SET)")); }
Ed.Regen();

Result

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

Log

point style Storm Sewer Manhole symbol: Drainage MH -> Sewer Manhole (verified)
ref 21920: Drainage MH -> Sewer Manhole (verified)
ref 1E7B6: Drainage MH -> Sewer Manhole (verified)

Notes

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

No notes yet.