michaelk Posted October 19, 2021 Share Posted October 19, 2021 Is there a pushattrs and popattrs for view? In a plug-in I'd like to get the current view (Top/Plan, Top, Front, etc) and zoom and location so I can restore it all at the end. Is it a combination of SetView and Projection? Not sure everything I should be 'Get'ing and 'Set'ting. Quote Link to comment
Pat Stanford Posted October 19, 2021 Share Posted October 19, 2021 How about just vSave, vRestore, vDelete? 1 Quote Link to comment
michaelk Posted October 19, 2021 Author Share Posted October 19, 2021 That's certainly easier that what I'm currently trying… Quote Link to comment
michaelk Posted October 19, 2021 Author Share Posted October 19, 2021 …it's confusing that Projection() has 7 arguments (5 of which I sort of understand :-), and GetProjection() has only 1 argument. And how are those parameters related to GetView and SetView? Quote Link to comment
Pat Stanford Posted October 19, 2021 Share Posted October 19, 2021 So, GetProjection returns the first parameter of Projection for a specified Layer. Our good friend @_c_ has a great writeup on Projection on the developer site. 1 Quote Link to comment
michaelk Posted October 19, 2021 Author Share Posted October 19, 2021 Aha! I was looking at the local version. Thanks @Pat Stanford and thanks @_c_! 1 Quote Link to comment
michaelk Posted October 22, 2021 Author Share Posted October 22, 2021 A simple 3 line test doesn't do what I expected. VSave('test'); SetView(#-90d,#0d,#0d,0",0",0"); VRestore('test'); What am I missing? Quote Link to comment
MullinRJ Posted October 22, 2021 Share Posted October 22, 2021 @michaelk, Try two scripts. First script: VSave('test'); SetView(#-90d,#0d,#0d,0",0",0"); Second script: VRestore('test'); Unless your eyes are really, really quick (or your computer is really, really slow), you'll never see a view change between the VSave and VRestore in a single three line script. I'm not at all sure what you are trying to do, but often it is recommended NOT to change the view in a plug-in. Good luck. Raymond 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.