Is it possible to access/Set the grid properties voa the C++ SDK?
It is possible to access some proterties via DisplayAttrsMgrListDesc:
m_pAttrs->m_bUseDocumentGrid
m_pAttrs->m_bDrawGrid
m_pAttrs->m_bDrawAxes
but I did not find settings like Grid line count, Grid line spacing etc.
pascal
(Pascal Golay)
2
dale
(Dale Fugier)
3
Hi @Peter_Salzman,
A viewport’s grid settings are stored on every viewport’s ON_3dmConstructionPlane
object.
For example:
CRhinoViewIterator view_it(context.m_rhino_doc_sn);
CRhinoView* view = nullptr;
for (view = view_it.First(); nullptr != view; view = view_it.Next())
{
ON_3dmConstructionPlane cplane = view->ActiveViewport().ConstructionPlane();
cplane.m_grid_line_count *= 2;
view->ActiveViewport().SetConstructionPlane(cplane);
}
context.m_doc.Redraw();
Does this help?
– Dale
Hi Dale,
many thanks - that was what I was looking for. It seems so obvious now that I see it…
Best regards
Peter