2021-03-0205:43 AM - last edited on 2021-09-1412:57 AM by Noemi Balogh
I would like the functionality in my add-on to switch database/window to a 3D View from the Project Navigator. I have tried to use APIDo_GoToViewID, with the guid of a NavigatorItem of type API_ProjectMap and API_PublicViewMap, but the function keeps returning APIERR_BADPARS. I have also tried parsing the guid to a const char*, but with no luck.
Is APIDo_GoToViewID even possible to use with 3D views or is it only drawings?
I have also taken a look at the Navigator_Test example, but it seems like a lot of work switching to the 3D model window and thereafter applying all the view settings (LayerCombinations, DrawingScale and so on...) of the NavigatorViewItem.
What is the simplest way of showing a 3D View in the 3D model window through the API?
But if I want to switch to a specific 3D view, is this then possible? I can't seem to retrieve a database for a specific 3D view. The only way I've found is to apply the different viewsettings one by one, for whatever 3D context you are in. This however, seems a little overkill because I also have to reset the settings. Switching to the 3D window seems to open the most recent 3D view, but I would prefer not to tamper with any of the 3D views.