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

 

Share this post


Link to post
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. 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

That macro was specifically designed to be in a Text or Rich_Text placed in a room.

The owner of the macro is the Text.  The text's room is the object that has the internal_area.

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks for that info Joe.

I keep dipping my toes into Ruby but they are all black & blue at this time. :)

 

Share this post


Link to post
Share on other sites

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.

 

 

 

Share this post


Link to post
Share on other sites

Alan,

 

I may be misunderstanding, by instead of room.ceiling_insulation.area.round(3), why not use room.ceiling_insulation.area.round(2)?  Then your numbers should match.  

Share this post


Link to post
Share on other sites

My point was that the Internal_area is rounded off & I'm forced to use the ceiling area to get decimal accuracy.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Member Statistics

    28301
    Total Members
    6254
    Most Online
    JoeLighty
    Newest Member
    JoeLighty
    Joined
  • Similar Content

    • By ccarpenter18
      In X12 I've noticed that when using Structural Member Reporting in a material list, the price column in the list does not appear to be sensitive to whether a "per unit" or "per length" calculation is being performed by the material list.  In both cases, the material list appears to use the same Price variable in the Component Panel of each object.  Does anyone know of some Ruby scripting that could be used to correct this?  Off hand, I'm thinking of a macro inserted into the Price variable on the Component Panel of each structural member that would use the Material List row context to report a price that depends on how the row wants to use the Price.
    • By community
      Hello,
      Just throwing the question out here: Is it possible to write a custom script for X10 to make the program export a custom materials list with some calculated fields and some custom formatting, like a header with our logo?
      If so, would anyone have an idea where I could turn to have this done for me?
       
      Kind regards
    • By BrownTiger
      The Andersen 100 Series windows [Fiberex] are always popular with a builders. Primarily, they offer different interior and exterior colors, not as ugly as some other Vinyl... Sometimes designer want to know if he is using standard vs custom sizes [adds +$$].
       
      So here is a validator macro, that can be assigned as a label or just executed in the tmm
       

       
      Free Macro, enjoy
      Code demonstrate use of Ruby arrays, and "any?" method.
       
      BT
      I also have A200,400, and pella.. But this will get you started if you are not 100% familiar with Ruby.
      Andersen100Units.json
    • By Doug_N
      In doing some ruby stuff to automate information required by building department code examiners, so I wrote a bit of simple code
       
       
       

       
      to get this. 
       
      But I need that in an elevation, not in a plan view.  No joy it seems.  
       

       
      Anyone know why this is?
       

    • By GerryT
      Revit, Rhino, Vectorworks and Allplan all have Python support. Form-Zis working on Python. Sketchup does ruby.
       
      Although i do think that Python may integrate better, I still think Ruby is a easier language to learn for the novice. And ruby 3 will have some advanced features.
       
      Wonder where Chief is and what is their position is now? -- With a few improvements and a keyboard interface using Chief's hotkeys, I think Chief's Ruby API could quickly rival the above in versatility? Are Chiefer's going to be left behind? What do you think? Open up Data Access in CA.