Hi
I need a procedure, which is able to change my view to the perspective view no matter which view was previously there. So if im in the hypergraph it should change the view to the perspective view same for the orthographic, hypershade and whatsoever views. It should of course also just display the persp view if there was for an example a two panel layout with the hypergraph and the perspective.
the easiest way to do this is:
CODE
setNamedPanelLayout "Single Perspective View"; updateToolbox();
But now I don't know what view has been there previously, but I need that to restore it.
And there seems to be another problem. Whenever the control at the right top corner of the perspective view is used to see an object from an orthographic view inside that perspective panel and then the code above is used it somehow changes to the corresponding orthographic view but not in the perspective view anymore meaning the manipulater at the right top disappears.
so what i need to do is
1. save the current layout (which panel/panels are currently displayed)
CODE
getPanel -withFocus;
can determine which panel has the focus but unfortunately this doesn't really help since it just returns one Panel, if we have the hypregraph and the hypershade in a two panel layout it will just return one of them depending on which one has been selected previously
2. get the panel containing the persp view
CODE
getPanel -withLabel "Persp View";
result: modelPanel4
3. displaying just this panel
CODE
modelPanel -edit -replacePanel panelHavingFocus modelPanel4; updateToolbox();
replaces the currentlyfocused view with the perspective
but now we still have the problem in case of a multiple panel layout because the other panels will still be there..
CODE
panePop;findNewCurrentModelView;
could do that if the mouse is over the perspective view but there must be a possibility to just display the focused window without using the mouse 
4. go to persp view if for an example an orthographic view was displayed
CODE
lookThroughModelPanel persp modelPanel4;
modelpanel4 should of course be replaced with the panel found by getPanel
5. display the perspective view in this panel if it was changed through the right top control
CODE
viewSet -fit -ff 0.8 -krs true -an 1 -p ;
So to sum up I need to know how I can determine which panels are all visible(in my current view) and how I can make just one panel (the perspective view) visible without having any other panels displayed.
So i have no clue how to manage the different views except replacing them.
I know this was a lot to read through for describing the actual problem but I wanted to make clear what I know already and what really misses since I didn't really know that myself before i began this post.
Thx so much if somebody can help me