KilianDrafting Posted February 16 Share Posted February 16 Are there macros that can pull information from the components panel to include data in a schedule? Link to comment Share on other sites More sharing options...
Solution Alaskan_Son Posted February 16 Solution Share Posted February 16 Depends on exactly which data you want, but the short answer is yes. For the example above, you can use some relatively simple code like: upper_layers[0].material_data.quantity.to_cu_yd.round(2) It gets much more complicated though if your wall has multiple layers. Link to comment Share on other sites More sharing options...
KilianDrafting Posted February 16 Author Share Posted February 16 43 minutes ago, Alaskan_Son said: Depends on exactly which data you want, but the short answer is yes. For the example above, you can use some relatively simple code like: upper_layers[0].material_data.quantity.to_cu_yd.round(2) It gets much more complicated though if your wall has multiple layers. Thank you! I see this would also be affected by a pony wall situation. Link to comment Share on other sites More sharing options...
Renerabbitt Posted 2 hours ago Share Posted 2 hours ago (edited) On 2/16/2026 at 8:50 AM, KilianDrafting said: Thank you! I see this would also be affected by a pony wall situation. Yes but if you had something you were trying to target, such as concrete, you could write a macro to search descriptions for the presense of the word "concrete" and total the areas being reported: # ============================================================ # Written by Rabbitt Design # www.rabbittdesign.net # 2026 # # DISCLAIMER: # This macro is provided as-is without any guarantees of accuracy, # completeness, or fitness for a particular purpose. Results are # dependent on model conditions, layer definitions, and material # assignments within Chief Architect. Users are responsible for # verifying all outputs. Rabbitt Design assumes no liability for # errors, omissions, or any decisions made based on this data. # ============================================================ def concrete_area_total # ---------------------------------- # CONTEXT HANDLING (owner / referenced) # ---------------------------------- obj = owner rescue nil obj = referenced if obj.nil? || !obj.respond_to?(:upper_layers) return nil unless obj && obj.respond_to?(:upper_layers) total = nil [obj.upper_layers, obj.lower_layers].each do |layers| next unless layers.respond_to?(:each) layers.each do |layer| begin next unless layer mat = layer.material_data next unless mat && mat.description if mat.description.downcase.include?("concrete") area = layer.area next unless area total = total ? total + area : area end rescue # silent fail end end end total end concrete_area_total Edited 2 hours ago by Renerabbitt Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now