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!
obj = owner
obj = referenced unless referenced.nil?
type = obj.type.to_s
nf = NumberFormatter.new
nf.unit = 'in'
nf.use_fractions = true
nf.show_unit = false
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
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.
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?
Do you have 10+ years in the software and wonder if you've been missing some tips and tricks? Have you been able to break the 15 hour condoc set?
Maybe you are a proficient user that wants to know everything that there is to know in Chief.
Rendering, Automation, Resources, Symbols, Quick Tools, Style Pallets, PDF Tools, Templates, and more.
We believe in lifting the community up. All of our tools and resources are available to you. With training that can be personal, team oriented, prerecorded, livestreamed, interactive. We offer training in over 15 softwares from Drafting and Detailing to Modeling, Advanced Texturing, Procedural Workflows, Node Based Design, Macro Creations, DAMs, Automation, VR Workflows, Streaming Overlays and Masks and much much more. Tell us your needs and we will connect you with the package or the right resource.
Some example learning modules:
Concentric Jump your dimension strings
Enter-input your jumps and Enter-close your DBX's
Snap jump your door widths, concentric jump your windows
Alt behavior tips, contain-selection and deselection workflows with tool restrictions.
Tons of cabinet tools and tips, including custom one-off parametrically modelled vanities and more.
Custom Toolbar Icons and Custom Library Objects.
Toolbar Switching Tricks and Library workflows
Other Offer Services Posts:
I have a total of 14 possible layout pages I use. I have my layout pages defined using the # sign. On my "0" layout page I use %page.print% for the page number and %numpages% to get the total number of pages. I don't always use all 14 pages but would rather not delete them from the client layout file in case they decide they want additional pages later. So, as it is, even if I just need six pages the number 14 displays (see attachment). Is there a way to get that macro to reflect the number of pages used in my layout schedule or the number of actual pages that I will print? Also, is there an easier way to select which pages display in the layout table than opening each layout page and editing each one's layout page information (like a list of layout pages you could pull up and select/deselect the two checkboxes on this DBX?