gogary Posted March 6, 2017 Share Posted March 6, 2017 In my Worksheet Database criteria Formula: I want to use a partial match on layer name - to allow for future change to the name, according to each file's needs using VectorWorks Designer 2017 The following is not finished, as I'd like to filter for any layer name, containing the word "Demolition" =IF((((L='Demolition') & (C='(Spaces-Existing-Non Living Enclosed')))=TRUE, space.area, 0) New at vectorscript, Thanks to anyone with this knowledge Quote Link to comment
Pat Stanford Posted March 6, 2017 Share Posted March 6, 2017 I don't think there is a way to use a substring in a layer name or a classname as criteria for a worksheet. If you want to get fancy, you could write a Vectorscript that would present a dialog box of the layers allow a multiple selection and then have the script create the criteria for the database. The hardest part will be the dialog box. There was another thread here recently that was talking about a selectable list of either layers or classes that would be a good place to start. You can put multiple layers into a criteria is you edit the criteria manually. Something like: =DATABASE((L='Layer-3') | (L='Design Layer-2')) The vertical bar indicates a logical OR so it will return things on Layer-3 OR Design Layer-2 Other fields like Name and (I think) Field values will allow you to use a wildcard of * So another possibility is to write a script that will store the current layer into a custom Record.Field and then use that field with wildcards as the database criteria. The problem is that if you move an object between layers (or add more objects) you will have to remember to rerun the script or manually update the field. Wildcards for Layer and Class names would be a good wishlist item. Quote Link to comment
michaelk Posted March 7, 2017 Share Posted March 7, 2017 Pat It does work for Classes. I wonder if that's a bug. I do this exact trick often with classes and it works great. =DATABASE((C='Demolition*')) will return everything in the class Demolition-Man, Demolition-Derby ,etc. Never knew it didn't work for Layers. mk Quote Link to comment
Pat Stanford Posted March 7, 2017 Share Posted March 7, 2017 Interesting. I only tried it for Layers and then looked at the options for classes and did not see a CONTAINS option in the criteria builder and assumed it would not work for Classes either. I doubt it is a bug on Layers. Layers live in an entirely different List inside Vectorworks. Ever noticed that you can have a Layer with the same name as a class or any other object. Like I said before, It would be a good wish to have Wildcard for Layer names be acceptable criteria. Quote Link to comment
michaelk Posted March 7, 2017 Share Posted March 7, 2017 There's no GUI for using wildcards, you have to do it the old fashioned way. I always thought that it worked on everything (I've done it with names of hatches fills). I just never tried Layers. But you're right. I never thought of Layer names like that. VW will let you name a Layer as "Door", but doing that with a Class name is a real bad idea. I think we could start a nice wish list database criteria improvements :-) Quote Link to comment
Pat Stanford Posted March 7, 2017 Share Posted March 7, 2017 Yes there is a wildcard function. Both Name and Symbol give the option for Contains or Does Not Contain and generate the * on both ends of the search term. This is one of the many areas that VW could be improved. You start the wish list and I will add to it as I come across things. Quote Link to comment
PO4 Posted September 19, 2022 Share Posted September 19, 2022 any news on wilcards for layer and class names in sheets? just stumbled over this limitation and could really use this feature 🙂 Quote Link to comment
Pat Stanford Posted September 19, 2022 Share Posted September 19, 2022 No Apparent change from VW2022. Criteria containing layers do not appear to accept wildcards. Criteria containing classes and wildcards can not be created by the Criteria Builder but can be manually edited to accept wildcards by adding * to replace the part that might change. Quote Link to comment
PO4 Posted September 19, 2022 Share Posted September 19, 2022 thanks for the reply! I hope this will be addressed in the future, this thread 5 years old :/. another request would be to filter by tag. not sure why this is not possible at the moment. 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.