This is my first question here, hope not an unsolvable one:)
I would like to attach user Data to views. I can not attach data directly to Viewport objects, but it is possible to add user data to ViewportInfo objects.
Is it possible to get the connected ViewportInfo object from Viewport object (or View object) somehow? These should have a connection I think… or maybe not?
I’ve never tried storing user data on a Rhino viewport - it may not be possible.
Rather than trying to store user data on a viewport, you might consider just keeping a table viewport user data and storing it as document data. Viewports have unique ids (System.Guid), so you can use this as the field to key off of.
Viewport changes don’t play in the document undo/redo system. Rather, each view maintain’s it’s own undo stack. Thus, you will want to use UndoView and RedoView.