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? -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement