Peter Vandewalle Posted November 18, 2019 Share Posted November 18, 2019 I'm working on some saved views scripts. This is very powerful, but now I'd like to store some script parameters in a worksheet. But to do so I need to get the name of the currently running saved view. Any ideas on how to get that name? Quote Link to comment
Pat Stanford Posted November 18, 2019 Share Posted November 18, 2019 A Saved View is not running. It is just a script that executes once and is done so there is no MODE to be able to get. You could probably do something with the Edit Script... button in the Edit Saved View dialog box. Maybe create a locus in the drawing with a record attached that you would change when you ran a Saved View. But that data will have no way of knowing that after you ran the saved view that you changed the visibility of 3 layers, changes the attributes of a dozen classes and switched from an isometric view to Top/Plan. It will only know what the last saved view you ran was, even if that was three weeks before. 😞 Quote Link to comment
Peter Vandewalle Posted November 18, 2019 Author Share Posted November 18, 2019 Thanks Pat, But the script in the saved view (via the edit script button) doesn't know the name of the script it belongs to. That's what I'm after... Quote Link to comment
JBenghiat Posted November 18, 2019 Share Posted November 18, 2019 I don’t believe this is possible. Saved views just trigger an execution of saved setting rather than run as a defined event. I think the only way to do this is to create your own interface for selecting a saved view. Quote Link to comment
Peter Vandewalle Posted November 18, 2019 Author Share Posted November 18, 2019 Thanks JBenghiat, I was afraid so. Then I'll have to enter the saved view name into a script parameter. I managed to use an external script and a worksheet so modifications can be done in one central place... Quote Link to comment
Pat Stanford Posted November 18, 2019 Share Posted November 18, 2019 Correct. The script does not know. You will have to manually edit the script attached to each Saved View to make it set a parameter somewhere that you can then access from a worksheet. 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.