Thank you, I did end up using the GetViewList and it is giving me my expected results.
But, there is a specific problem that I’m facing now.
You see, when I get the viewports by the following, what happens is when a namedview is also active in the document, then it just gives me the namedview+3 default viewports, what I need is this : namedView + all 4 default viewports.
How should I proceed with that, is there any option to let the GetViewList only traverse through the default viewports(active/inactive) and ignore the namedview?
My current code looks like this:
// Get all the viewports
CRhinoView* currentRhinoView = nullptr;
for (int vpc = 0; vpc < viewPortsCount; vpc++)
currentRhinoView = allViewPorts[vpc];
::RhinoApp().Print("\nThe view name is %s\n", currentVpName);
// DO STUFF
::RhinoApp().Print("\nDone Processing views!");
// Iterate through named views:
if (namedViewsCount > 0)
const ON_wString namedViewName;
while (nullptr != (view_3dm = rhinoDocument.Properties().NamedView(namedViewIndex)))
//Get name for the NamedView:
const char* currentNamedViewName = GetNameFromONwStr(view_3dm->m_name);
::RhinoApp().Print("\n The named view's name is %ls!", currentNamedViewName);
// Get named view ID:
const char* currentNViewUUID = GetUUIDFromONUUID(view_3dm->m_named_view_id);
// DO STUFF: