Ruby Question


Doug_N
 Share

Recommended Posts

In doing some ruby stuff to automate information required by building department code examiners, so I wrote a bit of simple code

 388193403_realcode.thumb.jpg.8c037037aa8535d23c209cfcea230f16.jpg

 

 

678376773_Coderef.thumb.jpg.00b1b8c394def27d040ce0d723c38213.jpg

 

to get this. 1601429432_PlanView.thumb.jpg.b1306d1a39136e90f8d9ca3d7af2504e.jpg

 

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

 

1242400075_Darnitdoesntwork.thumb.jpg.8de66e9df68e94b2170254d585a3dee3.jpg

 

Anyone know why this is?

 

real code.jpg

Link to comment
Share on other sites

Basically because in Elevation the arrow is selecting the "Exterior Room", not the "Window".

 

The only way I know of to get that in an Elevation View is by putting the macro in the Window Label and making the macro "Owner Object".  It's more complicated though because then the macro would also be displayed in the Plan View.  That means you have to have the macro display a different result in Plan View than in Elevation View and the macro has to have a way of knowing what the Current View is.

 

I can do it but it's a bit complicated.

Link to comment
Share on other sites

  • 2 weeks later...

Hey Doug, Here's a fairly simple method:

In elevation view, draw a polyline the size of the window directly over the window. Turn on "polyline labels" and use your newly created macro as the label. Depending on your settings, you may need to create a new text style for that label and of course I'd suggest giving this polyline it's own layer, or placing it on the 'window' layer.

I use this all the time to help me with my glazed opening calculations. I have macros that will display the area in metric and / or imperial.

Link to comment
Share on other sites

1 hour ago, robdyck said:

Hey Doug, Here's a fairly simple method:

In elevation view, draw a polyline the size of the window directly over the window. Turn on "polyline labels" and use your newly created macro as the label. Depending on your settings, you may need to create a new text style for that label and of course I'd suggest giving this polyline it's own layer, or placing it on the 'window' layer.

I use this all the time to help me with my glazed opening calculations. I have macros that will display the area in metric and / or imperial.

Hey Rob, 

 

thanks for the suggestion.  That is a pretty good way to tackle the problem.  Using an independent layer will allow this to be shown in some views, and not others but still see the window label.  

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

    30404
    Total Members
    9156
    Most Online
    willmick
    Newest Member
    willmick
    Joined
  • Similar Content

    • By stevenyhof
      See video below.
      My Fixtures, Interior is set on to show these details in my foundations where I am planning a slab foundation. I like to show and dimension these fixtures so that all the plumbing is installed in the right plan per the main floor plan view overlaying the foundation.
      https://www.loom.com/share/5a19955b67a64998af3640626365bc86
      A sink by itself is set to Fixtures, Interior, but once in a cabinet it changes to CAD, Default
      Thank you,
      Steve
       
    • By HCremodel
      I am trying to create a custom texture detail schedule that references an object's texture and displays the assigned texture image. Problem is, I am fairly inexperienced with Ruby/macro in general although I have a very basic understanding. Has anyone created something similar to this, or have suggestions on how to get started with creating this type of custom macro? I am using Interiors 12X
    • By SPSEngineering
      My firm has structural standards that are normally done in AutoCAD. I want to be able to achieve them in chief architect.
       
      This is our section annotation. I was able to create the top but I need help on the triangle on the tail.

       
      Also, is there a way to change the appearance or display the structural framing members as a polyline in plan view and have them as original in 3D? 
      We currently use polylines for our joists, headers, girders, beams, rafters, etc. with a 1" to 3"  Global Line Width and either phantom, continuous, or dashed/hidden line types in AutoCAD.

       
      I want to be able to produce our structural drawings like in chief architect instead of going back in forth because I like the auto framing features in chief. 
       
      Let me know if additional files are needed for clarity. Or if this is the wrong forum for this topic.
    • 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 mgannage
      I am wondering if there is a way so use Saved Plan View Sets from one plan in another plan without completely redoing my template. Thanks!