sketchucation logo sketchucation
    • Login
    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!
    FredoBend | Powerful new bending tool for SketchUp Download

    Combining 2 groups of entities?

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 132 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.
    • T Offline
      tomot
      last edited by

      I want to combine 2 groups of entities, so if the user decides to do a delete, her or she only has to do that once.

      group = entities.add_group
      r_entities=group.entities
      
      (there are 6 entities in this group)
      
      group = entities.add_group
      rr_entities=group.entities
      
      (there are 4 entities in this group)
      

      How do I make a group that combines r_entities &rr_entities ?

      TIA!

      my plugins
      tomot

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        begin
          #
          model.start_operation('Add nested group')
          ### OPERATION
          #
          editents = model.active_entities()
        
          topgrp  = editents.add_group()
          topents = topgrp.entities()
        
          group1 = topents.add_group()
          r_entities = group1.entities()
          #(add entities to group1 here)
           
          group2 = topents.add_group()
          rr_entities = group2.entities()
          #(add entities to group2 here)
          
          #
          ###
          model.commit_operation()
          #
        rescue Exception => e
          model.abort_operation()
          puts(e.message)
          puts(e.backtrace)
        end
        
        

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0

        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 Login
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement