sketchucation logo sketchucation
    • Login
    1. Home
    2. ReynaldoECG
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 4
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Number of copies and distances established from another DC

      @pcmoor said:

      A guess form information posted:

      have 3 attributes pick up distancey1 to 3, say dy1..dy3, then use choose(smallest(round(copy+1),4),0,dy1,dy2,dy3)
      the smallest keeps it within the choose criteria

      it maybe best to upload your project

      @pcmoor, thank you very much for your help and for your time.

      I'm a newbie, and I learned a lot about the "CHOOSE" function from your example. The result is close to what I want, however, I wonder: What happens when I want to increase the number of copies from the DC controller (and also their positions on the Y axis)?

      Is this possible with DC or should I learn ruby?

      Once again, I thank you very much for helping me.


      dc_practice.skp

      posted in Dynamic Components
      R
      ReynaldoECG
    • Number of copies and distances established from another DC

      Hi friends.
      I have a DC called "cube", which I want to control by another DC called "data_entered_by_user".
      The "cube" must be copied as many times as the user enters in "data_entered_by_user". And the copies must be positioned on the Y axis, according to the distances set by the user in "data_entered_by_user".
      I thought the "CONCATENATE" function would do it, but it doesn't work. Is there any way to achieve this?


      component_with_data_entered_by_user.PNG


      cube.png

      posted in Dynamic Components sketchup
      R
      ReynaldoECG
    • Redraw Groups with Dynamic Attributes

      Hi friends.
      I have many walls of different thicknesses, heights and lengths, for which I use them as Groups; but I add some Dynamic Attributes to them.
      Question: Is it possible to Redraw them all at once? Maybe with some ruby ​​code?

      posted in Dynamic Components sketchup
      R
      ReynaldoECG
    • 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)
       end
      

      Works. 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?

      posted in Dynamic Components sketchup
      R
      ReynaldoECG
    • 1 / 1