Layout layer visibility on imported layout

I am creating a layout template to import into various models. There 8 views in this template with different layer states. For example, 4 views show the rendered model and in the remaining 4 views, I don’t want to show the rendered view. I have set the template to display like this, but when I import it, the render layer is turned on in all 8 views.

It is a pain to step through the views to manage the display options. Am I missing some way to manage this?

Are you saving and importing Layer States as well?

I’m not using layer states. I’ll try that. can they be assigned to different views?

You will need to apply to the view, a view doesn’t have a LayerState property per say. Turning off layers in the detail can be saved and doesn’t affect the other views.

So I created some layer states in the template file. In Rhino 6, ImportLayerState is an unknown command. When I import the layout, the Layer States do not come in. How do I import the layer states?

Many thanks… Clearly I haven’t spent time with Layer States. Is there any way to script this? I am trying to get this all set up under one tool bar button. I would have thought that since I imported the .3dm the layer states would come in as well.

What exactly are you trying to script [Inputs-Outputs] ?

'-LayerStateManager I “filepath\yourfile.lay”

See below for more detailed info

I’m trying to import the Layer States from an existing 3dm via script. I guess once I have the Layer States as I prefer I can import the .lay file. Can that import be scripted?

This can be used as an alias or a button.

'-LayerStateManager I “filepath\yourfile.lay”

I’ll try that… Many thanks.

I have been messing around with this and can’t seem to make it work. I’ve tried it under a button and in my main script. It fails with file “was not found”; then asks to “Choose layer state option”:. If I click the import button in the Layer States Manager and browse to the location, the file is there and imports perfectly. The file path and name are identical (except the .lay extension) to the .3dm file that imports correctly in my main script.


you will need the .lay extension to import a layer state. This wasn’t intended to import a layer state from an existing .3dm, that’s a bit more involved.

I did export the .lay file. It is there and imports properly using the button in the layer manager. This in Rhino V6.


You aren’t able to get this to work?

'-LayerStateManager I “filepath\yourfile.lay”

can you post your alias text? Thanks.

Here is what is under the TooButton →

'-LayerStateManager I “D:\OneDrive\Assets\Plugins\3DM\2D-Docs_Overview.lay”

That returns a “File” was not found. on the command line.
When I click the import button in the LayerStates Manager, I can browse to the file with that name and it imports perfectly.

In the command area? I added an Enter to clear the command line.