Can Script close Graphics View 1, showing 3D View instead?

James Factor shared this question 8 years ago
Answered

Hi,


I am using version 4.9.260 GeoGebra Beta (with 3D).


Using GeoGebra Script or JavaScript, is it possible to start with Graphics View 1 and Graphics View 2 on then screen and then close Graphics View 1, showing the 3D View in place of it?

And even toggle back and forth between these two views?


Could the command SetActiveView[<View 1|2>] as a script in a button be used for this? If so, how would this be written?


Or is there some other way to do this?


Thanks,


Jim

Comments (6)

photo
1

I think not ...


the command "SetActiveView[<View 1|2>]" ist not to open and close a view. Active is the view with the bold title. You can see the difference when grafic view one and two are open. If you enter a command to draw an object, it is shown in the grafic view that is active.


The only solution is IMHO to have two GeoGebra file.


Birgit

photo
1

Try this new command :)

SetPerspective

photo
2

Thanks Birgit,


Your explanation gives me the understanding necessary to properly the command "SetActiveView[<View 1|2>]".


Best Wishes,


Jim

photo
1

Thanks Mike,


The SetPerspective[] command does exactly what I need to do.


Best Wishes,


Jim

photo
1

SetPerspective["D"] to toggle to Graphics 2 View gives script error in HTML after uploaded to GGB resources platform...... any solution?

photo
1

Try making a dummy 3D point (and post the link)

Dummy=(0,0,1)

photo
© 2023 International GeoGebra Institute