← Inbox

C3D-0550 · Why the soil underlay plots grey 260711 R2 (read-only) done

Read SS-OVERLAY layer, PdfReference 157DC display props, 22x17 page setup (ctb, transparency, shade plot) and viewport shade plot.

Script file
C3D-0550.cs
Target
260711 - 281 Maranatha Trail R2.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForRead);
var lr=(LayerTableRecord)Tx.GetObject(lt["SS-OVERLAY"],OpenMode.ForRead);
Log("LAYER SS-OVERLAY color="+lr.Color+" transp="+lr.Transparency+" plotStyle="+lr.PlotStyleName+" plot="+lr.IsPlottable+" lw="+lr.LineWeight);
ObjectId uid; Db.TryGetObjectId(new Handle(Convert.ToInt64("157DC",16)),out uid);
var u=(PdfReference)Tx.GetObject(uid,OpenMode.ForRead);
Log("UNDERLAY fade="+u.Fade+" contrast="+u.Contrast+" mono="+u.Monochrome+" adjustForBg="+u.AdjustColorForBackground+" entTransp="+u.Transparency+" color="+u.Color+" isClipped="+u.IsClipped+" isOn="+u.IsOn+" scale="+u.ScaleFactors.X.ToString("F3"));
var lmgr=LayoutManager.Current; var lay=(Layout)Tx.GetObject(lmgr.GetLayoutId("22x17"),OpenMode.ForRead);
Log("PAGESETUP dev="+lay.PlotConfigurationName+" media="+lay.CanonicalMediaName+" ctb="+lay.CurrentStyleSheet+" plotWithStyles="+lay.PlotPlotStyles+" plotTransparency="+lay.PlotTransparency+" shadePlot="+lay.ShadePlot+" shadeRes="+lay.ShadePlotResLevel+" customDpi="+lay.ShadePlotCustomDpi+" printLW="+lay.PrintLineweights+" plotHidden="+lay.PlotHidden);
var ps=(BlockTableRecord)Tx.GetObject(lay.BlockTableRecordId,OpenMode.ForRead);
foreach(ObjectId e in ps){ var v=Tx.GetObject(e,OpenMode.ForRead) as Viewport; if(v==null||v.Number==1) continue; Log("VP h="+v.Handle+" shadePlot="+v.ShadePlot+" visualStyle="+(v.VisualStyleId.IsNull?"none":((Autodesk.AutoCAD.DatabaseServices.DBObject)Tx.GetObject(v.VisualStyleId,OpenMode.ForRead)).GetType().Name)+" plotAsRaster="+v.PlotAsRaster+" plotWireframe="+v.PlotWireframe+" transparent="+v.Transparent); }
Log("sysvars PDFFRAME="+Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("PDFFRAME")+" FRAME="+Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("FRAME")+" PLOTTRANSPARENCYOVERRIDE="+Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("PLOTTRANSPARENCYOVERRIDE"));

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260711 - 281 Maranatha Trail, Lawrenceville, GA 30045, USA\260711 - 281 Maranatha Trail R2.dwg
Message
Executed C3D-0550 (0 entities touched).
Entities
—
Duration
875 ms
Civil 3D
25.0.0.0

Log

LAYER SS-OVERLAY color=yellow transp=(0) plotStyle=Color_2 plot=True lw=LineWeight000
UNDERLAY fade=77 contrast=100 mono=False adjustForBg=True entTransp=(0) color=BYLAYER isClipped=True isOn=True scale=50.450
PAGESETUP dev=AutoCAD PDF (High Quality Print).pc3 media=ANSI_full_bleed_C_(17.00_x_22.00_Inches) ctb= plotWithStyles=False plotTransparency=False shadePlot=AsDisplayed shadeRes=Maximum customDpi=300 printLW=True plotHidden=False
VP h=14E69 shadePlot=AsDisplayed visualStyle=DBVisualStyle plotAsRaster=False plotWireframe=True transparent=True
sysvars PDFFRAME=1 FRAME=3 PLOTTRANSPARENCYOVERRIDE=0

Notes

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

No notes yet.