• Login
sketchucation logo sketchucation
  • Login
⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here

Ruby request: Redraw function for multiple selected DCs ..

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 603 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    ddcddc
    last edited by 11 Jun 2009, 07:17

    Hi all,

    Here is one little request for those ruby masters out there:

    Can someone come up with a good way to achieve the "redraw" function for multiple selected dynamic components?

    Any ideas would be greatly appreciated..

    cheers!
    ddcddc

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 11 Jun 2009, 08:18

      Looks like this sample code redraws a DC. You can modify that to iterate over multiple.
      http://forums.sketchucation.com/viewtopic.php?f=180&t=17888&p=145437&hilit=+dynamic+component+#p145120

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • D Offline
        ddcddc
        last edited by 12 Jun 2009, 02:59

        @thomthom said:

        Looks like this sample code redraws a DC. You can modify that to iterate over multiple.
        http://forums.sketchucation.com/viewtopic.php?f=180&t=17888&p=145437&hilit=+dynamic+component+#p145120

        Thanks for the info thomthom 👍

        Excuse my noobness, but it seems to me that

        $dc_observers.get_latest_class.redraw_with_undo(Sketchup.active_model.entities[0])

        is only gonna work for the first and the only first component that I chose to "redraw" by using this script.

        I am no where near a good ruby script writer, would u mind pointing me to a clearer way of doing this ?

        Cheers!

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 12 Jun 2009, 06:18

          The way I read it was that $dc_observers.get_latest_class would return the latest observer for the model.

          And that you can feed .redraw_with_undo(...) with the DC's you want.

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            3/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement