Hello,
I’m trying to get the Guid of NamedView Viewport but I’m getting strange results.
to get the NamedView viewport ids I use this piece of code:
List<Guid> namedViewIds = RhinoDoc.ActiveDoc.NamedViews
.Select(v => v.Viewport.Id)
.ToList();
But it return strange values, either only 0 as seen on this pic:
or sometimes the Viewport does return a valid Guid value, but all the named view viewport have the same Guid. for info those NamedView can be active in a visible viewport or not but their viewport guid will still seems wrong.
Now there is another method that get Rhino standard view :
List<Guid> standardViewIds = RhinoDoc.ActiveDoc.Views.GetStandardRhinoViews()
.Select(v => v.ActiveViewportID)
.ToList();
This method does include some of the NamedView (not all but that’s another subject), the important thing here is that this method when it return NamedViews they will have a correct Viewport Id (valid guid)
So I tried to look on the forum and read the doc but still don’t understand if I’m just getting this wrong or it’s a bug. how can I get consistent result for NamedView viewport Id from the NamedView table ?
Thanks for anyone who can help.