C3D-0052 · READ-ONLY: the 4 ParcelSegments on C-PROP-LINE and their styles [PSEG-CPROP] error
A ParcelSegment layer is driven by the parcel style, which is why setting it in Properties reverts on regen. Lists each C-PROP-LINE segment with endpoints, owning parcel/site and style, plus every parcel with its site, layer and style. No changes.
C# payload
// READ-ONLY. The 4 ParcelSegments on C-PROP-LINE will not stay on a new layer - the layer is
// driven by the parcel STYLE, not the entity, so Properties gets overwritten on regen.
//
// Report each segment: its handle, endpoints, length, which parcel/site owns it, and the STYLE
// that is forcing the layer. Also print what each style's display settings actually say, since
// the style is what has to change (or the segment has to move to a parcel using another style).
// Nothing is modified.
var civil = CivilApplication.ActiveDocument;
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
Log("=== ParcelSegments on C-PROP-LINE ===");
foreach (ObjectId id in ms) {
var ps = Tx.GetObject(id, OpenMode.ForRead) as ParcelSegment;
if (ps == null) continue;
if (ps.Layer != "C-PROP-LINE") continue;
Log("");
Log("SEGMENT [" + ps.Handle + "] layer=" + ps.Layer);
Log(String.Format(" start {0:F2},{1:F2} end {2:F2},{3:F2}",
ps.StartPoint.X, ps.StartPoint.Y, ps.EndPoint.X, ps.EndPoint.Y));
try { Log(" StyleName " + ps.StyleName); } catch (System.Exception ex) { Log(" StyleName: " + ex.Message); }
try { Log(" StyleId " + ps.StyleId); } catch { }
try { Log(" Description " + ps.Description); } catch { }
try { Log(" BaseCurve " + ps.BaseCurve.GetType().Name); } catch { }
}
Log("");
Log("=== every parcel, its site and its style ===");
foreach (ObjectId sid in civil.GetSiteIds()) {
var site = (Site)Tx.GetObject(sid, OpenMode.ForRead);
foreach (ObjectId pid in site.GetParcelIds()) {
var p = (Parcel)Tx.GetObject(pid, OpenMode.ForRead);
string st = "?";
try { st = p.StyleName; } catch { }
Log(String.Format(" site \"{0}\" parcel \"{1}\" [{2}] layer={3} style={4} area={5:F2}",
site.Name, p.Name, p.ObjectId.Handle, p.Layer, st, p.Area));
}
}
Result
Log
=== ParcelSegments on C-PROP-LINE === SEGMENT [101C9] layer=C-PROP-LINE
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.