We can set all the four settings mentioned under Display Resolution box in Options.
Before setting them through API, we will understand what each variable does.
VIEWRES: Arc and circle smoothness, this sets the resolution for objects in the viewport.
SPLINESEGS: Segments in a polyline curve, this sets number of line segments to be generated for each spline-fit polyline generated by the spline objects of the PEDIT command.
FACETRES: Rendered object smoothness, adjusts the smoothness of shaded and rendered objects and objects with hidden lines removed.
ISOLINES: Contour lines per surface, specifies the number of contour lines displayed on the curved surface of 3D solids.
void changeDispRes() { AcDbDatabase *pDb = acdbHostApplicationServices()->workingDatabase(); acutPrintf(_T("n current SPLINESEGS value %d"),pDb->splinesegs()); acutPrintf(_T("n current FACETRES value %d"),pDb->facetres()); acutPrintf(_T("n current ISOLINES value %d"),pDb->isolines()); pDb->setSplinesegs(8);pDb->setFacetres(0.75);pDb->setIsolines(6); AcDbObjectId curVportId = AcDbObjectId::kNull; curVportId = acedActiveViewportId(); AcDbObjectPointer curVTR (curVportId,AcDb::kForWrite); if(curVTR.openStatus() == Acad::eOk) { acutPrintf(_T("n current VIEWRES value %d"),curVTR->circleSides()); curVTR->setCircleSides(100); } }

Leave a Reply