Recommended Posts

3 hours ago, ChiefuserMathews said:

Thank you for your reply, but for some reason it is not giving me the result

 

It works the way you requested.  Are you doing it a different way ?

Link to comment
Share on other sites

Following along, I'm wondering why the Chief supplied macros don't work with multiplication.

 

Room.area.internal is Chief's macro, which doesn't work with multiplication.  Yet Room.internal_area does.

 

It seems like the program supplied macros should be editable.  Obviously macros aren't my forte!

Glazing macro.PNG

Link to comment
Share on other sites

On 4/11/2021 at 7:10 AM, MoeGia said:

I'm wondering why the Chief supplied macros don't work with multiplication.

"Global" text macros, such as "room.area.internal", are not parsed by Ruby. They are simply replaced with text.

  • Like 1
Link to comment
Share on other sites

2 minutes ago, ChiefPlagman said:
On 4/11/2021 at 10:10 AM, MoeGia said:

I'm wondering why the Chief supplied macros don't work with multiplication.

"Global" text macros, such as "room.area.internal", are not parsed by Ruby. They are simply replaced with text.

 

Thank you for the clarification.  This particular situation although confusing has a ruby equivalent.  Are you working towards providing other "ruby equivalents" or a way that other global text macro's as you call them can integrate with ruby and be parsed ?

Link to comment
Share on other sites

Thank you.  I'd love to see global macros 'shortcuts'.  It would be a huge help to those of us that need info out but don't understand the Ruby world.  With my limited understanding, I can do a lot of damage pretty quick!

Link to comment
Share on other sites

I think it would be great if Chief's Global Macros could be modified to report data such as percent glazing.  In my post above, I started with the global room area and tried to multiply it by .08, which you can't do.  I didn't understand that those macros don't work with ruby.  I accept that they don't, but I don't have a enough of a grasp of Ruby to understand the nuances.

 

I'm glad to see others have requested it in the past and it's on the list.

Link to comment
Share on other sites

Michael,

 

I'm not sure, but I think she's interested in knowing what the macros are that correspond to those and can be used in calculations.  If so, then the only way I know of getting such a list if by use of an "_Object_Properties"  macro.  I have 3 of those depending on the amount of information needed.  (full, short, short wo defaults).

 

Rather complex macro to write but well worth it if doing any serious macro development.

Link to comment
Share on other sites

Hi Mo,

 

I've attached my macro that lists all of the attributes of an object.  It is sorted alphabetically and skips the attributes that are simply indication of if it's using the defaults for that object.  If you import this into your plans you can select any object, open TMM and select this macro.  It will show you all the available information and the names of the attributes that can be used in custom macros - or even directly in labels.  

 

If you need any help in using such attributes, let me know.

_Object Properties wo _is_default.json

  • Like 1
  • Upvote 2
Link to comment
Share on other sites

8 minutes ago, Joe_Carrick said:

I've attached my macro that lists all of the attributes of an object.

 

Hi Joe,

 

That takes care of the ruby attributes that can be substituted for Cheif's Global macro's in an indirect sort of way.  Thank You.

 

Do you know if any one has taken the time to create a list of the ones that are not available for Natalie @ChiefPlagman so this can all be a little less confusing for everyone.

Link to comment
Share on other sites

17 minutes ago, Chopsaw said:

Do you know if any one has taken the time to create a list of the ones that are not available

Sorry, I don't - but all Chief's "Object Specific" that contain a "." and not a "_" are unavailable for calculations.  In most cases this is just the "Room Data".  You will note that my macro shows the corresponding macros that do work.  example:

  • internal.area .... doesn't work
  • internal_area .... works

I'm pretty sure that the "Object Specific" for "Rooms" are the main ones that don't work.  I think CA has converted almost everything else except their "Global" macros.

  • Upvote 1
Link to comment
Share on other sites

2 minutes ago, Joe_Carrick said:
19 minutes ago, Chopsaw said:

Do you know if any one has taken the time to create a list of the ones that are not available

Sorry, I don't

 

Ok.  I just was not sure if it is a matter of someone at Chief spending a few hours adding the ones that are not available or if each one would take a whole day of programming so we would be better off requesting specific ones and balance that out with new "ruby" feature requests and fixing stuff that is currently broken.

Link to comment
Share on other sites

2 hours ago, MoeGia said:

I think it would be great if Chief's Global Macros could be modified to report data such as percent glazing.  In my post above, I started with the global room area and tried to multiply it by .08, which you can't do.  I didn't understand that those macros don't work with ruby.  I accept that they don't, but I don't have a enough of a grasp of Ruby to understand the nuances.

 

I'm glad to see others have requested it in the past and it's on the list.

 

I understand all that.  What I don't understand is how this relates to your request for 'shortcuts'.  I don't see the connection.

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

  • Member Statistics

    30206
    Total Members
    9156
    Most Online
    Chief_Matt
    Newest Member
    Chief_Matt
    Joined
  • Similar Content

    • By justin-c
      I'm trying to figure out if there is a way to display room occupancy load, using a text color tag.
      For example if a room was 100 ft.² and the fire occupancy load is 7 ft.² per person able to take the (room area divided by 7)
      the formula would also need to round up or down to the nearest whole number
       
      Here is the "Callout Specification" dialog window
       
           
       
       
      Here is the "callout tag" with the formula, but I would like it to be modified so instead it  show the red text or something similar
       
       

    • By ChiefuserMathews
      Is there a macro ruby command that I can add to my window schedule to calculate the glazing area of a window
    • By ACADuser
      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
       
    • By William
      I recently discovered that Chief's room area calculations are not correct if, at any time in your plan, you changed any room's "Include in Living Area" selection from it's default setting.
       
      For instance, if you change an Open Below area's DEFAULT "Do not include in living area" to "Include it in the Living Area", some of the room area calculations in your plan will no longer be correct.  Changing that room selection back to the default will not fix the calculations.  
       
      This appears to hold true for X7 & X6 (I haven't checked it in any other versions) and may only affect the Garage area calculations.
       
      Chief is aware of this, but in the meantime, does anyone know of a way to get a polyline's area to automatically display? 
       
       
      Chief room area calculations incorrect.plan 
    • By sjalheim
      I've searched and searched but to no avail. 
       
      I've been using X2 for a few years but never dabbled into doing much automating of information, but now with X6 I'm determined to make my life easier! 
       
      My question is this: I have a block of text in each room that shows the total square feet of that room:
       
      TOTAL SF - %room.area.internal%
      DLO REQ'D -
      ACTUAL
      VENT REQ'D -
      ACTUAL -
       
      I'd LIKE to have the daylight and vent requirements calculated for me by multiplying the %room.area.internal% by 0.08 and the vent by 0.04.  Is this possible? I've tried messing with Ruby but we're not on speaking terms anymore.
       
      (As a side note, I have the DLO and Vent as added columns in my window components, which I add the sq. ft. to manually. Ideally I'd like that info, which populates the schedule, to populate that little text box and do all the math for me.)