sketchucation logo sketchucation
    • Login
    1. Home
    2. ymagrini
    3. Topics
    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!
    πŸ”Œ Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download
    Y
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Groups 1

    Topics

    • Y

      Access specifies entity

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      475 Views
      Dan RathbunD
      # Search top and 1st nested level for a named group; grps = Sketchup.active_model.active_entities.grep(Sketchup;;Group) if !grps.empty? found = grps.find {|grp| grp.name = "Target Name" } else found = nil end if !found # found will be nil, if group was not found nested = Sketchup.active_model.entities.find_all {|ent| ent.is_a?(Sketchup;;Group) || ent.is_a?(Sketchup;;ComponentInstance) } nested.each {|ent| ents = ent.is_a?(Sketchup;;Group) ? ent.entities ; ent.definition.entities grps = ents.grep(Sketchup;;Group) found = grps.find {|grp| grp.name = "Target Name" } if !grps.empty? } end # found will be the group reference, if it was found # found will be nil, if group was not found
    • Y

      Change color entity group

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      572 Views
      Y
      Excelente! Thanks very much!
    • 1 / 1