Hidden layer discovery...?

There still seems to be no way to display a list of layers that have hidden objects? I say this because i have a command called “LayersWithHidden” which does this, but it turns out it is a script that someone (possibly Pascal?) wrote years ago.
In V6 it wont run, returning a type mismatch error…

In the continuing absence of a native command to discover & display layers with hidden objects, might anyone be a: able to make the existing script run in V6, and b: ideally beef it up a little, since a list of 30 layers (in the file I am currently viewing) is a pain to manually work through and unhide the objects.
Perhaps the script could automatically run a layer filter that displayed only those layers, so that they could be accessed and dealt with as appropriate, or something similar…?

thanks
rabbit

Hi Tony - if I wrote it, drag and drop onto Rhino 6 to load it up- if the type mismatch is on line 1 then it’s not loading, I’d guess. Anyway post it back here and I’ll take a look.

-Pascal

Thanks pascal - here it is (you did write it, in 2010!)

cheers
rabbitLayersWithHidden.rvb (693 Bytes)

Hi Tony - the script does what little it does OK here in V6 - try drag-and-drop of the rvb file onto an open Rhino then try the command.

So ideally you’d want to unhide all of the hidden objects on some but not all of these layers, correct? That sounds not too hard…

@rabbit - see how this one works - is that what you had in mind?
LayersWithHidden.rvb (1.2 KB)

-Pascal

Ok - the command was already in v6, but dragging and dropping it again seems to have fixed it.
So, yes, that is correct. I would expect that the list of layers with hidden objects would optionally be passed on for action somehow, so the user could choose just to unhide the lot, or select a set of the layers in the normal Windows fashion with shift and cntrl for example. I can’t believe, since rhino allows saving the hidden object state with the file, that there isn’t an inbuilt way to investigate this.
Consider for a moment coming back to a complex file a year or two later to try to extract some stuff for further revision or to re-use in a new project - how are you supposed to remember or know that you hid something on some layer at some point, and it now appears the geometry is missing or maybe you deleted it, or its in some other file or whatever…? Supposing it is a file created by someone else…?
I think rhino should flag the fact that there are hidden objects in a file in some way - for example, I used to work in a 2D program that did this years ago - when you opened a file that contained hidden objects, it said something like “Warning: this file contains hidden objects”.
As I am typing this, I recall I have posted about this before, probably back in 2010 which maybe prompted you to write the script in the first place.
However, it is I think still a very valid request for a potentially very annoying situation.

Thanks Pascal

rabbit

—sent from mobile device & email—

1 Like

Hi Tony- I can’t tell if the last version I posted with the checklist to show selected layers’ objects is useful or not - did you give that a spin?(replace the older version with the one posted above and restart Rhino or drag and drop again)

-Pascal

Yes - sorry I didn’t notice the new script at first look since I was looking at it on my phone- yeah, that’s fine.
It could be mucked about with more but it’s all that’s needed as a basic tool - thanks so much!
Cheers
rabbit

—Sent from mobile device & email—