Jump to content

Quantity of objects within a defined Area


Recommended Posts

I feel sure that I have seen this done before, but I cannot for the life of me remember what the procedure is.

 

I have a load of symbols  within the perimeter of a polygon. I want to be able to show the symbol count on a worksheet. Can anyone remind me of the function I should be using? I want to be able to do this without using the Space tool (if possible).

 

Many thanks

Link to comment

As a workaround you might add a unique prefix to your polygon "Names",  one that it is definitely not used by any other objects in the file. Something like "ZXCVBN-Name".

 

Then, in the worksheet, use that prefix and an asterisk as search criteria, eg. "Location is within ZXCVBN*"

 

This way you get a list of symbols only within objects you have named.

 

Tamsin probably finds a better way... 🙂

 

 

Link to comment
  • Vectorworks, Inc Employee

Thanks @JMR but I think this has beaten me. I agree that having a common prefix on all the areas will help narrow down the results.

However, I think that @markdd is also looking to include the name of the Location polyline or polygon alongside the objects that are reported. However, as there is no direct relationship between the elements, other than physical proximity, I can't see a way to do it. Although the symbols are enclosed within the polyline, they are not related to it. And it could be that they are actually enclosed within more than one polyline, so it's not necessarily a one to one correlation, if that makes any sense.

 

So, I think this will need someone much smarter than me to answer!

Link to comment

If the polygon name column ( Location is Within PREFIX* ) is sorted, objects with the same containing polygon name appear together. These can then be summed together if one needs to count them...I think.

 

The prefix can be something like "......" as well, not to appear so unappealing.

 

 

Link to comment

Thanks Tamsin. You are right. I'm looking for a way to list items within a specific area. The Space tool will do it, but I don't need anything like the other functionality the tool gives.

 

I have a working solution with the Space tool, but would like to find a simpler solution if possible. If I could specify "within the bounding box of a 3D object" then that would be perfect!

Link to comment
  • Vectorworks, Inc Employee

And you want to show the area name beside each item?

 

7 minutes ago, JMR said:

If the polygon name column ( Location is Within PREFIX* ) is sorted, objects with the same containing polygon name appear together. These can then be summed together if one needs to count them...I think.

 

The prefix can be something like "......" as well, not to appear so unappealing.

 

 

@JMR, how are you displaying the Polygon area name on the drawing? That's what I am struggling with because there is no relationship between the area and the objects being reported.

  • Like 1
Link to comment

Well...it seems the asterisk in not working here anyway, see the screenshot. The asterisk in the criteria displays the correct objects in the popup window, but shows zero in the "Objects that meet the criteria field". So much for that idea!

 

As to the names, I guess a data tag would be needed?

 

kuva.thumb.png.3aec398a2381deae268d3064468eb7ff.png

Link to comment
  • Vectorworks, Inc Employee

@markdd I think the Location is within thinks only in 2D... I extruded the polyline and gave it a new name. I then duplicated a symbol and moved it up on the Z axis, but within the bounding box of the extrude. They worksheet reported it. I then moved it up further on the Z axis, so still within the plan bounding box, but outside the 3D bounding box. The worksheet still reported it. Sorry.

Link to comment

I don't think you will find a way to get the location of an object. It is really intended to be a one-way thing from the location to the object with no reverse link from the object to the location. About the best I can think of would be a worksheet script that would compare an object in a database row to every named poly or space and return that name. But you will still have a problem if you ever end up with overlapping named objects.

Link to comment

Many thanks Pat. I understand the thinking. I managed to get the Space tool to report a location for the objects which is fine but have actually discovered a good workflow for what I need based on Tamsin's Location idea.

 

One quick question. Is there a way to merge different Workheet Database headers into one Worksheet or is copying a Database row and pasting to a new blank spreadsheet the best solution?

 

Thanks again

 

Mark

Link to comment

No magic formula to merger database criteria. 

 

But VW is "supposed" to OR matching criteria types and AND different criteria types so you can make fairly complicated database criteria.

 

So something like:

Layer is Layer-1

LOC is ABC

LOC is XYZ

 

Should give you all of the objects that are on Layer-1 AND are in either ABC or XYZ.

 

I say "supposed" because I did a test recently where I was using Field Is Not criteria and it ended up ANDing them rather than ORing them. I have not had time to go back and chase it or test with other criteria.

 

You can also manually edit the criteria rather than using the criteria builder. Right click on the database row header to open the criteria editor and click OK. When it closes the criteria formula is shown in the formula bar. You can edit as necessary. If you make it too complicated the next time you try to use the criteria builder it will warn you that you have to edit manually.

 

A vertical bar ( | ) in the formula is a logical OR.  And ampersand ( & ) is a logical AND. Changes the & you need to | and get spectacular results.  ;-). (after a dozen or so tries to get it right).

 

Ask again if you need more help.

  • Like 3
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...