Ruby Room Area?


ACADuser
 Share

Recommended Posts

Looking at the ROOM data I'm not sure where the Room Area variable is.

Looking at Joe's macro, he used obj.room.internal_area.round(2)

 

It appears that the variable is already rounded. Not sure if this is new.

What I wanted is the area the Room polyline is based on.  369.83  --> Measurement

I see several area variables, but how to get the one I want?

How do you know what prefix to get the area you want?

 

Data Type: String

base_moldings ------------------- size = 1 ---------------------- Collection

[0] ------------------------- ------------------------------ NVPublisher

component_moldings ------ size = 0 ---------------------- Collection

description ------------- "base molding: PVC 4" Base" --- String

formatted_size ---------- "1x4" ------------------------- String

length ------------------ 600 in ------------------------ Measurement

room -------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

cantilever_underside_material --- ------------------------------ NVPublisher

id -------------------------- 133 --------------------------- Integer

name ------------------------ "Color - White" --------------- String

ceiling_elevation --------------- 108 in ------------------------ Measurement

ceiling_finish_layers ----------- size = 2 ---------------------- Collection

[0] ------------------------- ------------------------------ NVPublisher

area -------------------- 373.153214 sq ft -------------- Measurement

material_data ----------- ------------------------------ NVPublisher

description --------- "Square Ceiling Tiles" -------- String

formatted_size ------ "24"x24"x1/2"" ---------------- String

quantity ------------ 93.5 -------------------------- Measurement

owner ------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

thickness --------------- 0.5 in ------------------------ Measurement

[1] ------------------------- ------------------------------ NVPublisher

area -------------------- 369.825474 sq ft -------------- Measurement

material_data ----------- ------------------------------ NVPublisher

description --------- "Color - White" --------------- String

formatted_size ------ "" ---------------------------- String

quantity ------------ 369.825474 sq ft -------------- Measurement

owner ------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

thickness --------------- 0 in -------------------------- Measurement

ceiling_finish_name ------------- "Color - White" --------------- String

ceiling_insulation -------------- ------------------------------ NVPublisher

area ------------------------ 369.825474 sq ft -------------- Measurement

cavity_r_value -------------- 0.0 --------------------------- Float

continuous_r_value ---------- 0.0 --------------------------- Float

depth ----------------------- 12 in ------------------------- Measurement

formatted_size -------------- "12x24x48" batts" ------------- String

length ---------------------- 48 in ------------------------- Measurement

num_batts ------------------- 46.25 ------------------------- Measurement

owner ----------------------- ------------------------------ NVPublisher

SEE ABOVE --------------- ------------------------------

width ----------------------- 24 in ------------------------- Measurement

ceiling_platform_layers --------- size = 1 ---------------------- Collection

[0] ------------------------- ------------------------------ NVPublisher

area -------------------- 0 sq ft ----------------------- Measurement

material_data ----------- ------------------------------ NVPublisher

description --------- "Steel Stud 24" OC" ----------- String

formatted_size ------ "" ---------------------------- String

quantity ------------ 0 ----------------------------- Measurement

rebar_length ------------ 0 in -------------------------- Measurement

rebar_size -------------- 0 ----------------------------- Integer

room -------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

thickness --------------- 2 in -------------------------- Measurement

ceiling_thermal_envelope_area --- 369.825474 sq ft -------------- Measurement

chair_rail_moldings ------------- size = 0 ---------------------- Collection

crown_moldings ------------------ size = 0 ---------------------- Collection

custom_pattern_scale ------------ 1.0 --------------------------- Float

dimensions ---------------------- "14'-10" x 23'-10"" ----------- String

drawing_group ------------------- default:_35_-_room_fill ------- Symbol

fill_line_weight ---------------- 1 ----------------------------- Integer

finished_ceiling_elevation ------ 107.5 in ---------------------- Measurement

finished_floor_elevation -------- 0.125 in ---------------------- Measurement

floor_ceiling_group ------------- 1 ----------------------------- Integer

floor_elevation ----------------- 0 in -------------------------- Measurement

floor_finish_layers ------------- size = 1 ---------------------- Collection

[0] ------------------------- ------------------------------ NVPublisher

area -------------------- 371.216099 sq ft -------------- Measurement

material_data ----------- ------------------------------ NVPublisher

description --------- "Floor-C4 Laminate" ----------- String

formatted_size ------ "1/8" thick" ------------------ String

quantity ------------ 371.216099 sq ft -------------- Measurement

owner ------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

thickness --------------- 0.125 in ---------------------- Measurement

floor_finish_name --------------- "Floor-C4 Laminate" ----------- String

floor_insulation ---------------- ------------------------------ NVPublisher

area ------------------------ 0 sq ft ----------------------- Measurement

cavity_r_value -------------- 0.0 --------------------------- Float

continuous_r_value ---------- 0.0 --------------------------- Float

depth ----------------------- 12 in ------------------------- Measurement

formatted_size -------------- "12x24x48" batts" ------------- String

length ---------------------- 48 in ------------------------- Measurement

num_batts ------------------- 0 ----------------------------- Measurement

owner ----------------------- ------------------------------ NVPublisher

SEE ABOVE --------------- ------------------------------

width ----------------------- 24 in ------------------------- Measurement

floor_number -------------------- 1 ----------------------------- Integer

floor_platform_layers ----------- size = 2 ---------------------- Collection

[0] ------------------------- ------------------------------ NVPublisher

area -------------------- 0 sq ft ----------------------- Measurement

material_data ----------- ------------------------------ NVPublisher

description --------- "OSB-Hrz" --------------------- String

formatted_size ------ "48"x96"x3/4"" ---------------- String

quantity ------------ 0 ----------------------------- Measurement

rebar_length ------------ 0 in -------------------------- Measurement

rebar_size -------------- 0 ----------------------------- Integer

room -------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

thickness --------------- 0 in -------------------------- Measurement

[1] ------------------------- ------------------------------ NVPublisher

area -------------------- 0 sq ft ----------------------- Measurement

material_data ----------- ------------------------------ NVPublisher

description --------- "Concrete" -------------------- String

formatted_size ------ "4" thick" -------------------- String

quantity ------------ 0 cu ft ----------------------- Measurement

rebar_length ------------ 0 in -------------------------- Measurement

rebar_size -------------- 0 ----------------------------- Integer

room -------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

thickness --------------- 4 in -------------------------- Measurement

floor_thermal_envelope_area ----- 369.825474 sq ft -------------- Measurement

function ------------------------ "Living" ---------------------- String

internal_area ------------------- 370 sq ft --------------------- Measurement

layer --------------------------- rooms ------------------------- Symbol

layer_line_color ---------------- 2151678207 -------------------- Integer

layer_line_style ---------------- 111 --------------------------- Integer

layer_line_weight --------------- 18 ---------------------------- Integer

layer_set ----------------------- "Floor Plan" ------------------ String

layer_text_style ---------------- "Default Text Style" ---------- String

moldings ------------------------ size = 1 ---------------------- Collection

[0] ------------------------- ------------------------------ NVPublisher

component_moldings ------ size = 0 ---------------------- Collection

description ------------- "base molding: PVC 4" Base" --- String

formatted_size ---------- "1x4" ------------------------- String

length ------------------ 600 in ------------------------ Measurement

room -------------------- ------------------------------ NVPublisher

SEE ABOVE ----------- ------------------------------

name ---------------------------- "Shared Medical" -------------- String

pattern_angle ------------------- 0.0 --------------------------- Float

pattern_horizontal_spacing ------ 8 in -------------------------- Measurement

pattern_vertical_spacing -------- 8 in -------------------------- Measurement

perimeter ----------------------- 1020.936748 in ---------------- Measurement

schedule_number ----------------- "R69" ------------------------- String

simple_schedule_number ---------- "69" -------------------------- String

standard_area ------------------- 389 sq ft --------------------- Measurement

stem_wall_height ---------------- 16 in ------------------------- Measurement

stem_wall_top_elevation --------- 0 in -------------------------- Measurement

type_name ----------------------- "Office" ---------------------- String

volume -------------------------- 3309.16752 cu ft -------------- Measurement

wall_coverings ------------------ size = 0 ---------------------- Collection

wall_material ------------------- ------------------------------ NVPublisher

id -------------------------- -32765 ------------------------ Integer

name ------------------------ "No Change" ------------------- String

 

Link to comment
Share on other sites

2 hours ago, ACADuser said:

It appears that the variable is already rounded. Not sure if this is new.

What I wanted is the area the Room polyline is based on.  369.83  --> Measurement

I see several area variables, but how to get the one I want?

How do you know what prefix to get the area you want?

 

Alan I think what you have highlighted is the ceiling paint area.  What you want is internal_area or standard_area.

It looks like you are using Joe's object properties macro ?  Either he has rounded those values off or your room is an exact dimension that just works out to a round number ( 14'-10" x 23'-10" )  but i did not check the math. 

Link to comment
Share on other sites

Thanks

 

This seems to work in a Rich Text object when placed in the room:

Not sure what I was domh wrom before.

 

########################################################

# Macro Name: "room_internal_area"

# Displays the internal area of the room a Note is in.

########################################################

# Copywrite by Joseph P. Carrick, August 2, 2019

########################################################

# Macro --> myRoomArea

referenced ? obj= referenced : obj=owner

begin

obj.room.internal_area.round(2)

rescue

"Failed to get Area"

end

Link to comment
Share on other sites

  • 3 weeks later...

Ok, back to this project.

The obj.room.internal_area is a Chief rounded number.

I found obj.room.ceiling_insulation.area.round(3) was a close as I could come to the correct number.

If you select a ROOM and look at its properties you get this:

 

background_color_from_background..................... true

background_color_from_layer......................... false

base_moldings............................... [NVPublisher]

cantilever_underside_material................. NVPublisher

ceiling_elevation................................... 108.0

ceiling_finish_layers.......... [NVPublisher, NVPublisher]

ceiling_finish_name......................... Color - White

ceiling_insulation............................ NVPublisher

ceiling_platform_layers..................... [NVPublisher]

ceiling_thermal_envelope_area.......... 167.67399790629196

chair_rail_moldings.................................... []

conditioned.......................................... true

conditioned_is_set_to_use_default_value.............. true

crown_moldings......................................... []

custom_pattern_scale.................................. 1.0

dimensions................................ 12'-6" x 13'-5"

drawing_group..................... default:_35_-_room_fill

fill_color_from_background.......................... false

fill_color_from_layer............................... false

fill_line_weight........................................ 1

finished_ceiling_elevation.......................... 107.5

finished_floor_elevation............................ 0.125

floor_ceiling_group..................................... 1

floor_elevation....................................... 0.0

floor_finish_layers......................... [NVPublisher]

floor_finish_name....................... Floor-C4 Laminate

floor_insulation.............................. NVPublisher

floor_number............................................ 1

floor_platform_layers.......... [NVPublisher, NVPublisher]

floor_thermal_envelope_area............ 167.67399790629196

function........................................... Living

has_ceiling.......................................... true

has_floor........................................... false

has_floor_supplied_by_room_below..................... true

has_monolithic_slab................................. false

has_roof............................................. true

has_shelf_ceiling................................... false

include_in_living_area............................... true

include_in_living_area_is_set_to_use_default_value... true

include_in_schedule.................................. true

internal_area....................................... 168.0

layer............................................... rooms

layer_is_default..................................... true

layer_line_color............................... 2151678207

layer_line_style...................................... 111

layer_line_weight...................................... 18

layer_set...................................... Floor Plan

layer_text_style....................... Default Text Style

moldings.................................... [NVPublisher]

name.......................................... lab / blood

pattern_angle......................................... 0.0

pattern_color_from_background....................... false

pattern_color_from_layer............................ false

pattern_horizontal_spacing............................ 8.0

pattern_vertical_spacing.............................. 8.0

perimeter............................... 622.0000000000006

schedule_number....................................... R67

show_room_label...................................... true

simple_schedule_number................................. 67

standard_area....................................... 187.0

stem_wall_height..................................... 16.0

stem_wall_top_elevation............................... 0.0

transparent_pattern................................. false

type_name.......................................... Office

use_type_for_name................................... false

volume................................. 1500.3329604323415

wall_coverings......................................... []

wall_material................................. NVPublisher

 

If you make a Room polyline it follows the drywall perimeter and has an area of 167.67

 

Therefore the only other way to get close to the interior area is to use the dimensions & that too is rounded off.

 

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share