Jump to content

Worksheet Criteria Setup?


Recommended Posts

It took me forever to find this setup to count the number of a specific symbol instance in two layers. I found it by trial and error. I don't know why this setup works but no other setup I tried does? I want to count the number of instances of my #8 x 1-1/4" FH screws in the layers Sheathing Left and Sheathing Right. The correct count is 48, so why does this setup work but others don't? I mean the way the any criteria and all criteria are used? Is there another setup that would work?

 

1928821352_ScreenShot2022-08-09at10_00_33PM.thumb.png.d6e69acc99f543f5fa05a60e0ffd4bd1.png

Link to comment

If the only thing you know is the Layer Names and the Symbol name, then the criteria you show (or a very similar one with the Symbol name at the top) are the only versions that are going to give you what you want.

 

In English, what this criteria says is:

 

Return all the object who are ((On Layer Sheathing Left OR on Layer Sheeting Right) AND are a symbol with a name of "#8 x 1-1/4" FH screws")

 

It specifies the What (specific symbol) and the Where (Left OR Right).

 

How else would you expect it to work?

 

Multiple instances of the same criteria type (in your case two different layers) are OR'd together meaning that it will return objects that exist on either of the layers.

 

Instances of different criteria types (On a Layer, Symbol Name) are AND'd together meaning that only objects that have both criteria will be returned.

 

Just the way criteria work in VW.

  • Like 2
Link to comment

I think I would have tried it the other way:

 

All the Criteria in this set:

__Symbol is #8 x 1 1/4 FH Screw

__Any of the Criteria in this set:

____Layer is Right

____Layer is Left

 

Same thing with the order reversed.  I just think backwards from you. 🙂 

 

Back in the day (the day being 3 years ago) this would have been harder to see what was going on.  More complicated versions of this would have involved a little hand coding of the criteria.

 

Think of All the Criteria as putting an AND between criteria.  They all have to be true for an object to belong to the database.

Think of Any of the Criteria as putting an OR between criteria.  Just one of the criteria has to be true for an object to belong in the database.

 

So the old way of doing your criteria, with may make more sense to some would be

 

Symbol = '#8 x 1 1/4 FH Screw' AND (Layer = 'Left' OR Layer = 'Right')

 

 

  • Like 2
Link to comment
5 minutes ago, Bruce Kieffer said:

This way by asking for the symbol in these layers, but it does not work and I think I understand why.

What you are showing there is all AND condition. So you are saying return the Symbols who are on Layer Left AND Layer Right. Since a symbol can't be on multiple layers at the same time it probably returns zero item.

 

Michael's version with the Symbol Name at the top is exactly the same logically as the one you originally posted that worked with the Symbol name at the bottom.

 

((Layer OR Layer) AND Symbol) = (Symbol AND (Layer OR Layer))

Link to comment
6 minutes ago, Bruce Kieffer said:

This way by asking for the symbol in these layers, but it does not work and I think I understand why.

505375135_ScreenShot2022-08-09at11_44_49PM.thumb.png.dafbfcbb3c47a90142d8b4a75255096b.png

If you look at the bottom of the Criteria window it tells you that 0 objects meet the criteria.  [That number (almost) always tells you when you have it right.]

 

That's because no object can be in both Layer Sheathing Left and Layer Sheathing Right.

 

 

Link to comment
3 minutes ago, Pat Stanford said:

What you are showing there is all AND condition. So you are saying return the Symbols who are on Layer Left AND Layer Right. Since a symbol can't be on multiple layers at the same time it probably returns zero item.

 

Michael's version with the Symbol Name at the top is exactly the same logically as the one you originally posted that worked with the Symbol name at the bottom.

 

((Layer OR Layer) AND Symbol) = (Symbol AND (Layer OR Layer))

Yep. I'm trying to learn and understand this, and what you both have pointed out is helpful. Thanks.

Edited by Bruce Kieffer
Link to comment
1 hour ago, michaelk said:

 

Think of All the Criteria as putting an AND between criteria.  They all have to be true for an object to belong to the database.

Think of Any of the Criteria as putting an OR between criteria.  Just one of the criteria has to be true for an object to belong in the database.

 

Thanks for spelling this out @michaelk I was never really sure what I was asking for until I checked the formula in the worksheet to see where I had an '&' + a '|' + then changed it there... I didn't understand how to read the Criteria dialog properly.

 

Cool.

Link to comment

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.

×
×
  • Create New...