Room Perimeter Macro


Fotis1960
 Share

Recommended Posts

Does any one have a macro for Room Perimeter? I'm not a professional CA user. I use it for small home projects and for fun so I haven't learned how to create my own macros yet. Any assistance would be appreciated.

 

Thank you

Link to comment
Share on other sites

12 minutes ago, Fotis1960 said:

Does any one have a macro for Room Perimeter? I'm not a professional CA user. I use it for small home projects and for fun so I haven't learned how to create my own macros yet. Any assistance would be appreciated.

 

Thank you

 

What Info are you looking for?  as CA has built in Marcos for the basics like Area and Perimeter etc

 

M.

Link to comment
Share on other sites

I wanted a fast way to get the total feet of base molding needed for a room. I realized that I could get it from the materials list after I posted the question but would still like to have a room perimeter macro. I couldn't find one for perimeter in the CA provided ones.

Link to comment
Share on other sites

 

- If you click on the Room, you can make a Room Polyline (edit toolbar) and it has a total length etc in the DBX.....

 

- you can also Place a Room Finish Schedule in a CAD Detail (best) and use the available Columns to document thinks like Moldings.

 

M.

Link to comment
Share on other sites

The room object has the following properties (attributes ). So technically if you want to get the perimeter, see the example, make sure evaluate is checked ... 

 

"Perimeter: " + owner.perimeter.round(0).to_s

 

I am not an architect and this is my hobby.

BT

 

=========================================================

ObjectId: NVPublisher

ceiling_elevation................................. 201.125

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

ceiling_finish_name.......................... Color - Bone

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

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

ceiling_thermal_envelope_area............. 390.89083774113

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

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

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

dimensions................................ 18'-3" x 21'-6"

drawing_group.......................................... 35

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

fill_color_from_layer................................ true

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

finished_ceiling_elevation........................ 200.625

finished_floor_elevation............................ 92.75

floor_elevation...................................... 92.0

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

floor_finish_name........................... Secret Garden

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

floor_number............................................ 2

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

floor_thermal_envelope_area........................... 0.0

function.......................................... Bedroom

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

has_floor............................................ true

has_floor_supplied_by_room_below.................... false

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

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

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

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

layer_line_style........................................ 0

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

layer_set..................................... Default Set

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

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

name.......................................... MASTER BDRM

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

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

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

perimeter............................... 952.2245367022674

schedule_number....................................... R29

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

simple_schedule_number................................. 29

standard_area....................................... 416.0

stem_wall_height........................ 47.99999999999999

stem_wall_top_elevation.............................. 92.0

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

type_name..................................... Master Bdrm

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

volume................................... 3679.56623286403

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

 

Link to comment
Share on other sites

14 hours ago, solver said:

ct1.thumb.png.aece139e264621a287a3f640f4ce0439.png

 

If you make a Room Molding Polyline that takes over the default base molding, you can assign macros to its label.

 

Here I'm showing Visible Length and Perimeter.

 

Note how Perimeter minus the width of the door equals Visible Length.

How did you get the Visible Length?

Link to comment
Share on other sites

3 hours ago, Kbird1 said:

 

It's one of the pre-made Macros you can insert into the Label under Object Specific.

 

image.thumb.png.b55ede255e5d8f8ec2e629a6d4f6eeb1.png

 

 

Thanks. I don't know how I missed that. I also tried typing it in but forgot to add the _ . I'm learning.

Link to comment
Share on other sites

Note, if you want to actually perform calculations using those values - you need to have a custom evaluated macro.  example:

 

Macro Named "MyCustomMacro" or whatever and your object's visible_length = 498 inches

  • obj = owner
  • x = obj.visible_length/12
  • x = x.to_s + " ft."

The result would be 41.5 ft.

That last line make x a string instead of a floating point number.  The key here is that Chief's built-in macros display a value but you can't use it for anything else.  By creating a macro that accesses the underlying attribute you the capability to manipulate the data and use it for more complex labeling.

 

Link to comment
Share on other sites

36 minutes ago, Joe_Carrick said:

Note, if you want to actually perform calculations using those values - you need to have a custom evaluated macro.  example:

 

Macro Named "MyCustomMacro" or whatever and your object's visible_length = 498 inches

  • obj = owner
  • x = obj.visible_length/12
  • x = x.to_s + " ft." 

The result would be 41.5 ft.

That last line make x a string instead of a floating point number.  The key here is that Chief's built-in macros display a value but you can't use it for anything else.  By creating a macro that accesses the underlying attribute you the capability to manipulate the data and use it for more complex labeling.

 

 

 

Thanks for the Tips Joe , I was able to make it work , but also rounded it up (.ceil) so it didn't show 9 decimal places ! , so here it is if someone else wants to try it....

 

 

Perimeter-Baseboard_add to Room Molding Polyline label.json

 

image.thumb.png.369e3ba4deb2a1d02f780d4e22e610a6.png

Link to comment
Share on other sites

On 3/27/2019 at 7:53 PM, Joe_Carrick said:

Hi Mick,

 

Another possibility is to use  .round(3) to get just 3 decimal places max.

 

 

 

Thanks Joe, I do appreciate you posting these Macro Tips for those of us who aren't Macro Gurus.... 

 

Because it was For Moldings in this case I wanted to round up to the Next Ft , and actually added 1 ft extra too , to make sure I allow for some Waste , 1-2ft extra per Room is nothing really , couple of length per house as I see it , but the Marco is pretty easy to change to Suit each person's needs, or just round it like you suggested, or even to .round(0) and just add your own 10% (?) waste at Final Takeoff instead.

 

M.

Link to comment
Share on other sites

On 3/27/2019 at 8:20 PM, Kbird1 said:

...or just round it like you suggested, or even to .round(0) and just add your own 10% (?) waste at Final Takeoff instead.

 

 

Or just skip the polyline steps and automate the whole thing using the actual molding information provided by the room...

188352632_Moldingtest.thumb.jpg.5b35d5e13e11779441a6b61a8726b51f.jpg

Molding test.plan

 

Simply drop a copy of the text box into any room you wish to get the molding quantities for that room...and this is just a pretty quick and simple example of the type of information we can automatically pull from the actual model now. 

  • Upvote 1
Link to comment
Share on other sites

19 hours ago, Alaskan_Son said:

 

Or just skip the polyline steps and automate the whole thing using the actual molding information provided by the room...

188352632_Moldingtest.thumb.jpg.5b35d5e13e11779441a6b61a8726b51f.jpg

Molding test.plan

 

Simply drop a copy of the text box into any room you wish to get the molding quantities for that room...and this is just a pretty quick and simple example of the type of information we can automatically pull from the actual model now. 

 

Hey thanks Michael, that works nicely , but I have to say, I think you are probably one of nine guys on this forum who could write that Macro...and understand how it works :)

 

I made it into a Library "Block" with the Label for Others to use, you just have to remember to "explode" the Block after you insert it , so the macro "reads" the Room it is in , and not just show the Data from the Room I made the Block in. (see pic below)

 

Macro :   AlaskanSon_Room Moldings.json

 

CAD Block : MHD_Room Molding CAD Block.calibz

 

 

image.thumb.png.ba4132ee99d16f876543909bfce51134.png

 

 

Link to comment
Share on other sites

59 minutes ago, Joe_Carrick said:

Mick,

 

If you make it a "Note" instead and save that to the Library you can skip the Block.  Just put the macro in the "Text above the Line" field of the Note

 

Thanks Joe , I had forgotten that we can now add Notes to the Library , so will give that a try too.....

 

*** there is too much text for the "Text Above Line", for the Callout, so it's better to put the macro in the Text of the Note and have it report in the Schedule, which maybe better anyway as it keeps the drawing "cleaner".

 

image.thumb.png.f4e17a0609c03de284873b0113454e19.png

 

M.

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