Jump to content
Peter Vandewalle

Saved Views Names in script

Recommended Posts

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?

Share this post


Link to post

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.  😞

 

Share this post


Link to post

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. 

Share this post


Link to post

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...

Share this post


Link to post

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.

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...