Is there a "Save Selection" ruby script out there
-
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.
-
Try my
export_selection.rb
sript...
http://forums.sketchucation.com/viewtopic.php?p=183756#p183756
-
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.
Advertisement