I am not sure if you are the guy who asked the similar question recently on our blog. The followingis what I replied there:
Yes, CurrentSavedViewpoint tells the last selected view points only. Can I know why you want to know the multi-selected items? As I know, only one saved viewpoint can be applied to the current view. If what you wanted is to do some post work after the user multi-selected the viewpoints, I would suggest you create your own panel to manage the viewpoints. Thus you can know multi-selected easily.
As to position of the viewpoint, it is stored with the camera of the viewpoint contains.
1) before 2013, you will need to use COM API e.g.
Com.InwNvCamera cam = m_state.CurrentView.ViewPoint.Camera;
Com.InwLPos3f oPos = cam.Position;
// .... other properties
2) from 2013, .NET API provides the relevant objects. Pleae refer to the blogs:
yes its me again.
well i solved this the next folowing (as you sad):
created new dock panel transfer all data from viewpoint,
actually now am working with clash.
but unfortunally Navis cant work with multi - selection.
And btw, i want use multi-select for package renaming pointviews.
Thx for reply
glad it helps. yes, you could manage flexibly in your own tree. The built-in trees of Navisworks do not always meet the requirement of customization.
thats right! you absolutly right!
some users dont want to work with newly panels, and want to use standarts panels.
but standarts panels and instuments have a limit.
btw, one more thing. can you tell me when i select viewpoint in mypanel tree, how can i select the same in Navis, i mean that Navis show me a view from this point?
Same to the original question, since API cannot tell the multi-selection, it cannot either apply multi-selection. CurrentSavedViewPoint is a single select. Probably we could setup a wish if it has strong use cases.
In product, the scenarios when the user wants to multi-select may be:
- Move them the one folder together
- Add a copy with these selected items
- Edit their common properties
- Transform them with same transformation
In a word, the aim is to get a result, instead of just showing they are multi-selected.
So I think, when your user multi-selects in your own tree, he could decide what he what to do. And your program provides the ability to do what he wants. He does not need to concern switch back-forth between the built-in tree and your tree.
sorry, but now i mean not multiselection.
i mean, when we selectin some viewpoint in a "Saved viewpoints" panel, Navis shows this point view in a model.
how can i make it with my panel of viewpoints tree?
it sounds you need to apply the saved viewpoint (if multi-selection, the last saved viewpoint) to the current viewpoint in model? If yes, with COM API, you can just call state.ApplyView with the last saved viewpoint. If you are working with 2013, you can use pure .NET API to manage, e.g. oDoc.SavedViewpoints.CurrentSavedViewpoint = oLastSavedViewPoint;
btw i am noticed a little strange.
when i get viewpoint position (SavedItem.Viewpoint.Position.X,Y,Z) and after that i am compare with coordinate (viewpoint>edit>position) those data have not same values.
SavedItem.Viewpoint.Position.X = 2028,7496
but in a property window Position X = 71,74
why that happens?