How to display rough openings at window label?


MarkDW
 Share

Recommended Posts

 

It seems if the window schedules can calculate the rough openings by adding the 1/2 inch to the unit size... or whatever I set up in the framing option to be...  there's got to be a simple way to display the R.O. at each window... but how?

 

I know nothing about Ruby stuff nor creating text Macros. Do I need to use one of these? If so, how? I have no idea what to do! And three calls to CA tells me they aren't going to help. I'm rather frustrated!

 

I've seen a couple posts and even some code on a post and thought I would be able to make changes to it to get the outcome I want - but no luck. I'm doing something wrong, I guess. 

 

Here's an example of how I'd want the rough opening displayed (under each window)... R.O. 3'2 1/16" x 6'0 7/8"

 

In addition to the R.O., I'd also want the Andersen window name/code above, or below, the rough opening. Adding their specific window name/number is my next issue. Well... that, and figuring out how to get all their sizes/windows in the system!

 

Following is the code I found. If this is the code I need to use... can someone tell me how/where to apply it?

 

number = height + rough_opening_top + rough_opening_bottom

divisor = 1/16.to_f

a = ((number/divisor).round*divisor).divmod(12)

feet = a[0]

inches = a[1].floor

if a[1].modulo(1) == 0

fraction = ""

else

fraction = " #{a[1].modulo(1).rationalize}"

end

"#{feet}'-#{inches}#{fraction}\"".reverse.chomp("-'0").chomp(" 0").reverse.chomp("-0\"")

Link to comment
Share on other sites

As I mentioned before, I’d be more than willing to help you get what you’re after.  It just wouldn’t be free.  Most of that section of code you’ve referenced was copied from code that I’ve already shared.  A man can only donate so much time and energy.  

 

Link to comment
Share on other sites

The calculation is

T(L)-X =M/N

Where T is the time you have already wasted plus some more time

L is the loss of accuracy in what people are asking you to convey on the drawing

X could be just about anything you like

M is whatever Measly sum Micheal will ask for

N is for now

  • Like 2
Link to comment
Share on other sites

You create a ruby macro ..

Definitions:

owner.automatic_label  is your automatic label e.g. "3450SH"

owner.width is width of your window .. 3x12 +4 = 40"

owner.trimmer_count is your number of trimmers

 

Create macro e.g. "My_Window_label"

 

Label = ""

Label += (owner.automatic_label +"\n")

ro_width = owner.width + 2*(owner.sill_framing_depth*owner.trimmer_count)

#now lets convert ro_width to_ft_in

Label += "R.O. " + your converted value + " x " ...

Label

 

So you can write your own conversion, or lookup mine, Alaska_son's, etc.

>In addition to the R.O., I'd also want the Andersen window name/code above, or below, the rough opening. Adding their specific window name/number is

>my next issue. Well... that, and figuring out how to get all their sizes/windows in the system!

Create an array or structure and lookup a name..


 
  • Like 1
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

    32642
    Total Members
    9156
    Most Online
    Karysa
    Newest Member
    Karysa
    Joined
  • Similar Content

    • By Allen43
      I have returned to this forum once again in seek some help with ruby and macros.
       
      I have been working on a macro to automate cabinet labels. So far I have a mostly working macro, but I feel like my hands are tied and my eyes are closed. First of all the documentation on chief implementation of ruby and its capabilities it really lacking. And second, I don't have the Ruby terminal. I think this is because I am running Interiors, but am not sure as all Chief says is that there is limited use of Ruby in this version.
       
      Anyways, right now I would love to have a list of all callable object attributes. I honestly don't even know if that is the right name for what I am looking for. I am trying to find a list of what info I can scrape from a cabinet. So, what can I put after obj. (ie. obj.width, obj.type)? I think I could find this by running the selected.names command in the terminal, but I have no way of knowing.
       
      This is my current macro. It is built from parts of a macro from @MarkMc and whatever I have been able to come up with from random trial and error. If you see something I could improve on, I am open to suggestions as long as they have a good explanation with them. Thanks in advance!
       
      Macro:
      obj = owner
      obj = referenced unless referenced.nil?
      obj.depth
       
      type = obj.type.to_s
       
      nf = NumberFormatter.new
      nf.unit = 'in'
      nf.use_fractions = true
      nf.show_unit = false
      nf.apply(obj.depth)
       
      standard_size = 24.0 if type == 'base_cabinet'
      standard_size = 12.0 if type == 'wall_cabinet'
      standard_size = 24.0 if type == 'full_height_cabinet'
       
      depth = nf.apply(obj.depth) if obj.depth.to_f != standard_size
       
      standard_size_height = 36 if type == 'base_cabinet'
      standard_size_height = 0.0 if type == 'full_height_cabinet'
       
      height = nf.apply(obj.height) if obj.height.to_f != standard_size_height
       
      width = nf.apply(obj.width)
       
      nomen = 'B' if type == 'base_cabinet'
      nomen = 'W' if type == 'wall_cabinet'
      nomen = 'T' if type == 'full_height_cabinet'
       
      hinging = owner.door_swing
      label = ""
      label << nomen << width.to_s << height.to_s << depth.to_s << hinging
       
      p label
       
    • By Allen43
      I'll new to Chief and have learned that this form might be one of the best resources I have ever used. I am trying to streamline my design process and to do that I would love to be able to change cabinet ends to finished or paneled faster and easier. I tried to make a SP to do this, but I couldn't figure it out. I also thought that there might be a way to do this with macros is a SP, but I know even less about macros than I do Chief.
       
      Any help is appreciated, and if it's not possible that's fine I'll know not to spend more time on this.
    • By Allen43
      I am new to Chief but so far I love it. Far better than my previous software. So far, the only problem that I have had is using macros to create a custom label for cabinets.
       
      All I am trying to do is get chief's labels to match my manufacture nomenclature. I know I could manually change it on every cabinet, but that seems like to much work and honestly a waste of time. So could someone give me some help. Either a bit of a guide on custom macros and some recourses and documentation (which I, for the life of myself, can't find), or maybe a working-ish or example macro.
       
      Some examples:(chief nomenclature, needed nomenclature)
      3DB24, B3D24
      U242484L, T2484L
      FHB24L, BF24L
       
      Thanks in advance for the help! And if I didn't give enough information or if there is a better way to go about this, please let me know.
       
      Oh, almost forgot. I am running Interiors x14.
    • By tlinder
      I'm trying to run a .rb file that's on my local in CA by using a marco. Right now I can only get it to read the file. Does anyone have any insight on how I might be able to to this or where I need to look?
       
      Macro: In CA
      File.read("C:/Users - Desktop/scope1.rb")
       
       
      Output: from text stored on a local drive
      rafter_length = (length.to_f.round / 12) + 1
      convert_to_int =  rafter_length.even?
      case
        when convert_to_int == true
        resut = rafter_length
        when convert_to_int == false
        result = rafter_length +1
      end
       

       
    • By wazzubrad
      Guys, I am starting to find some of the limitations that I see discussed in the forums and am wondering if this is one of those. The current plan I am working on has various footing widths and depths specified by the engineer for the foundation walls. While trying to create a wall schedule that will show each wall based on footing width and depth and when I look at the available macro's under Object Properties for a macro I don't see anything specific to the footing depth. Anyone know if this property exists for a foundation wall?