Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Show volume on a DC
-
Hi. I want to show the Volume of the geometry in a DC, to later calculate quantities and costs.
I used this code:Sketchup.active_model.selection.grep(Sketchup;;ComponentInstance).each do |s| if s.volume>-1 s.set_attribute "dynamic_attributes","vol_inch", s.volume s.set_attribute "dynamic_attributes","volumen_mm", "0" s.set_attribute "dynamic_attributes", "_volumen_mm_access","VIEW" s.set_attribute "dynamic_attributes","_volumen_mm_formlabel","Volume (cubic ft) " s.set_attribute "dynamic_attributes","_volumen_mm_formula", "ROUND(vol_inch*16387.064,3)" end $dc_observers.get_latest_class.redraw_with_undo(s) endWorks. But when I modify the geometry the volume does not change.
Is there a way to get the volume in a DC constantly and dynamically as the geometry changes? -
Advertisement