Working in Detail Views without messing up other Views

PROBLEM:
Create a Layer that will be visible only in a given view/layout/detail view.

In Rhino there is a general problem that it’s still difficult to perform local actions (drawing things or changing their appearance in a given View - a Detail View to be exact) and not mess up any other Detail View or Model View.
I think this problem is somewhat recognized thus Layers have quite an odd new attribute “New Detail On”.

I would like to highlight similar problem, looking at it from the opposite side.

Imagine I have 50 Detail Views. Each detail view has its own set of annotation Layers visible.
I need to create the 51st Detail View with annotations (or other objects) visible only in this detail. I would create a new Layer for that. This unfortunately means that I need to modify all of the prior 50 Detail Views and set the new Layer visibility off in all of them. This is a big usability problem.
It could be solved by some command that would create a new layer and automatically make it visible only in the active Detail View. This probably could be automated even by some grasshopper script once there are official Detail View components but I don’t think this should be solved by the user.

I’m not asking for a workaround to this problem but rather showing that Rhino has a problem with separating per-view actions. I was never afraid that modifying one drawing would mess up another in Revit and I doubt it’s a problem in other BIM software.

doesn t the “detail on” setting in the layer palette exactly do what you’re after ?

create a layer and “detail on” - turn it of
create your detail
double click / activate and _showLayersIndetail

?

New Detail On

Controls the default state of the Detail On setting in new detail views.

Hmm,
The issue is that the new circle is showing in the existing views, not that other geometries are showing in the new Detial View (this can be avoided by the New Detail On)

Maybe this will show better what I mean:

Maybe if I used dimensions it would demonstrate the issue better, because here one might confuse the model element with the detail element. For example in Revit, there is a distinction between Model Lines (which would appear in all views once created) and Detail Lines (which exist only in the views where they were created).


More real-life example - new dimensions in the new Detail View (and only here):


I wanted just to add one new drawing, with some dimensions. Ended up needing to edit all previously made Detail Views…

ok that is not nice - either the documentation is wrong “default state” or I would call it a bug.

depend on what you re actually after, nested layers might offer a workaround ?

EDIT -1
just checking if this is exposed to rhinocommon / scripting.
on the programming side the info is more clear / the behaviour your video shows …“in newly created…”

https://developer.rhino3d.com/api/rhinocommon/rhino.docobjects.layer/perviewportisvisibleinnewdetails#

Gets and sets the initial per viewport visibility of this layer in newly created detail views.

EDIT - 2
in this topic there are some c# snippets that will show how to program the per detail visibiality…

I don’t know how a nested layer structure might solve this issue. At any point in time, there might be some layer restructuring. Maybe I’m missing something.

I don’t see it as a bug, I think this is how Rhino is working and it’s a really bad concept that needs to be changed.


If you think about it, it’s the most regular task that any might want to do in a CAD program.
Create a new drawing of an existing object with some dimensions.

It’s absurd that this process is “destroying” previously made drawings.

- This is the most synthesized sentence on this issue that I can think of.

I humbly seek your attention on this matter @stevebaer

To be honest, I can’t imagine a steeper learning curve than using C# to avoid that :slight_smile:


Besides that, there are a few properties in Rhino that should have a “flipped matrix” counterpart.

In this case we need to enter each Detail View to modify Detail Layer Visibility of the Layer. If we would flip it, there should be a GUI in which we could display for a given Layer all the Detail Views and modify Detail Layer Visibilty from the list without entering any Detail View.
The same goes for the Clipping Planes, Detail Color, etc.

here is a fast script without any fine tuning based on above link
it will create a new layer, that is invisible in all existing layouts and details … i did not do extensive testing, so please backup your complex file first, save as a test-version and see if that does the trick.

// #! csharp
using System;
using Rhino;
using Rhino.DocObjects;
using Rhino.Display;

RhinoDoc doc = RhinoDoc.ActiveDoc;
int indexLayer = doc.Layers.Add();
Layer lay = doc.Layers[indexLayer];
// loop layouts
foreach (RhinoPageView page_view in doc.Views.GetPageViews())
{
    // loop details
    foreach (DetailViewObject detail in page_view.GetDetailViews())
    {
        var viewport_id = detail.Viewport.Id;
        // Re-acquire the layer object, as the underlying
        // object may have been modified
        lay = doc.Layers[indexLayer];
        if (lay != null)
        {
            lay.SetPerViewportVisible(viewport_id, false);
            lay.SetPerViewportPersistentVisibility(viewport_id, false);
        }
  }     
}
doc.Views.Redraw();

save above code as .cs file and run it as script or via _rhinoCode

1 Like

Thank you,

It seems to be working fine.
Honestly, I’m not in desperate need of that right now but I will save it as an alias. Every once in a while I’m testing waters and looking for some workflow showstoppers. I’m pretty sure this should be addressed by the developers.
In my opinion, it’s a very basic usability problem that shouldn’t be left with this workaround. I can’t imagine guiding some e.g. interior designers through preparing alias with this command to achieve this basic function.
Nonetheless, you helped me a lot, and thank you again.

1 Like

Hi Jakub -

Steve put this on the list a while ago → RH-10770 Bake to PictureFrame

I suppose (or hope) that, since this was filed, the solution isn’t simply baking existing details to picture frames, but that the contents of a detail are frozen until the user makes deliberate steps to modify them.

Also note, that in the “simple” case that you sketched here, you can create your new layer with your annotations, then make a new detail and select that. Right-click on the Layout On lightbulb and pick Layer On in Selected Detail Only -> All Layouts

image

-wim

Thanks,

I didn’t know about that! Right-click on the Detail On bulb brings up different menu. :slight_smile:

It’s still easy to mess up different drawings in Rhino, but at least there is a handy shortcut to turn off visibility for many Detail Views at once.