sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Is there a "Save Selection" ruby script out there

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 161 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.
    • DavidBoulderD Offline
      DavidBoulder
      last edited by

      So lets say I have a script that does a search and then hides everything that doesn't meet the criteria. Then it selects these objects. This selection has objects nested down inside the model. I thought my method to save the selection was to just save a scene with "hidden Geometry" checked.

      I of course found out that scenes only save the "hidden" attribute for entities that are at the top level, so children entries keep their current "hidden" state regardless of what scene you go to. Well it isn't quite that clear cut. If I have a three objects visible in scene "A" and hidden in scene "B" and then while in scene A I group them. Those children turn to hidden when I go to scene "B" but they don't unhide again when I go back to scene "A". However if I now explode this group and click on scene "A" and "B" again, the scenes still remember which objects should be hidden and correctly display them, unless you had updated your scenes will they were grouped, then the data seems lost.

      Anyway, so my point is how else do I save multiple searches for future viewing. I thought maybe there was already a plug-in that does this. Seems easy enough to create a named selection and provide interface for the user to recall this selection. Obviously some objects may have been moved, deleted or added, so it isn't the same as re-running the search.

      --

      David Goldwasser
      OpenStudio Developer
      National Renewable Energy Laboratory

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Try my export_selection.rb sript...
        http://forums.sketchucation.com/viewtopic.php?p=183756#p183756
        🤓

        TIG

        1 Reply Last reply Reply Quote 0
        • DavidBoulderD Offline
          DavidBoulder
          last edited by

          Thanks that looks nice. I thought about that at first. I can make a component out of the selection and save out to a file or just keep the component on a layer in the current file.

          It doesn't quite work for what I want here, because I want these views to be something the user can edit while they are in. Not necessary change geometry, but we have a lot of attributes, and while they are in their search view want them to be able to select an item to change its name, material, etc. If I have them working in a copy it would be problem to get it back into the model, in particular since the selection isn't just object in a single group, but pieces from all over the model hierarchy.

          --

          David Goldwasser
          OpenStudio Developer
          National Renewable Energy Laboratory

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

          Advertisement