Jump to content

Reports & worksheets - extracting polygon area data from inside a symbol


Recommended Posts

Hello VW community!

I'm new here and new to using reports so hopefully this isn't too obvious of a question..


I am attempting to create a report and/or worksheet that looks something like this:
 

Name | Count | Area
Unit 1  |   xxx   |  yyy  | 

Unit 2  |   xxx   |  yyy  |

Unit 3  |   xxx   |  yyy  |

...

 

Where:

'Unit 1, 2, 3, etc.' are the symbol types listed out

'Count' is the number of each symbol on specified layers

'Area' is the area of a polygon drawn within each symbol on a specific class (call it FSR).

 

The goal is to get the report to update automatically whenever a new unit type is added.

 

I can manage the first two columns, but I can't figure out how to extract the floor area of the polygon from within an individual symbol (or even a type of symbol).
The 'AREA' function in the report returns the total area of each symbol instance (including all polygons), but I just want the area from one specific class (FSR).

Likewise, when I try to do this in a worksheet, I can get it to output the whole FSR area using 'INSYMBOL', but whenever I try to specify the desired unit by adding S='Unit #', I get nothing back.

I attached a test file which illustrates the above.

Thanks in advance for the help on this!

 

I'm also wondering if there's a better way to handle the "(L='...') | (L='...') | (L='......" in worksheet mode if I'm just trying to exclude one layer. Is there a 'does not equal' equivalent to the '=' in this formula?

 

I'm using VW2023 on a mac (OS Monterey)

Area Per Unit Test File.vwx

Link to comment

Weird.  The 2021 file would open.  But not the 2023.

 

This should work in 2023.

 

I changed the criteria to look for the class FSR and to include looking inside symbols.  That makes getting the FSR area easy 🙂

 

Then I wrote a little script to return the name of the "Parent". That gets the name of the symbol.  Currently, if there is any FSR class geometry not in a symbol it returns a blank. 

 

The area of the symbol is tricky.  This one doesn't currently work.  Are you looking for the footprint of the symbol or the the total of all the geometry inside the symbol?

 

The first time you recalculate the worksheet you will get a warning about executing a script inside the worksheet.  Choose Always Allow.

 

 

Area Per Unit Test File v2021 v2024 v2023.vwx

Link to comment

Wow this is awesome! Thanks for this!

I agree with your logic here. With these parameters it makes way more sense to list the area objects as your search criteria and then display their 'parent symbol' as a column of data (great script by the way!)

 

However, my ultimate goal is to create a schedule of unit types (which are built as symbols) and include the following columns:
gross area, exclusions, net area, count, total area

'gross area' and 'exclusions' are two different polygons drawn inside each unit plan symbol.

 

With the above solution, I don't think we can achieve this. Actually after playing around with reports a little more I'm not sure if it's possible to do.

What do you think the best approach for something like this would be?
I'm trying to automate as much as possible and avoid creating unique classes for each unit type.
If it's a matter of writing scripts, perhaps you can direct me to some learning resources? (I'm pretty new to coding as well).

I've attached a more elaborate test file in case you want to play around.
Thanks again for the help!

Unit Type Schedule Test File v2021.vwx

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...