Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
JoeBayLD

Criteria in Python

Recommended Posts

How do you use multiple criteria in Python? When using the built in tool in the script manager, it makes it in vectorscript format. Currently I have:

crit = "T=RECT"

How would I also add "T=LINE"?

Thanks,

Joe

Share this post


Link to post
How do you use multiple criteria in Python? When using the built in tool in the script manager, it makes it in vectorscript format. Currently I have:

crit = "T=RECT"

How would I also add "T=LINE"?

Thanks,

Joe

Probably the same way as in vectorscript ?

((A) AND OR & |(B))

Share this post


Link to post

Criteria are just strings that follow a certain format. Think of them as a proprietary regular expression.

The format is documented here: http://developer.vectorworks.net/index.php/VS:Search_Criteria

I recommend liberal use of parentheses.

The criteria builder in both the VS editor and worksheets is a bit over-simplified. Having different kinds of criteria result in AND while more than one of the same kind results in OR. You can build up a criteria string much more complex than the dialog allows, but it can be a good start for learning syntax.

HTH,

Josh

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
Sign in to follow this  

 

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.

×