Jump to content
Developer Wiki and Function Reference Links Read more... ×
Andy Broomell

Script to work on visible layers only?

Recommended Posts

I have a couple custom scripts that I've collected over the years, many created by the fine folks on this forum.

 

A number of these scripts operate on "selected objects", but I've noticed that they also operate on selected objects on layers that are set to invisible (an odd concept, but that's what VW does). This sometimes produces unexpected results, so I'm wondering if there's a way to make the scripts operate on selected objects on visible, editable layers only?

 

For example, the script I currently have to hide selected objects looks like this:

 

Hide(SEL=TRUE);

 

What would I add to change the criteria? I should note that some of the scripts I'd like to modify are more complex, but this is a good starting point. Since I don't know Vectorscript at all, any help would be appreciated. Thanks!

 

 

Share this post


Link to post

There was a new call added a few years ago.

 

VSEL  for Visible Selection State. This only handles objects that are both visible (not in a hidden layer or class) AND selected.

 

Change your SEL above to VSEL and you should be good to go.

 

Other steps may be required for other scripts. Especially ones that use something like BLAH:=FSActLayer;

 

 

 

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×