|
[Sponsors] |
July 26, 2016, 12:08 |
How to duplicate a layout?
|
#1 |
Member
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12 |
Does anyone knows how to duplicate a layout?
Either with python or gui? Thank you, Lourenço |
|
August 1, 2016, 12:03 |
|
#2 |
New Member
Clayton
Join Date: Jul 2016
Posts: 2
Rep Power: 0 |
Maybe you're talking about render view? Where you can split the layout and show your model twice?
Below the layout tab all the way to the right, you should see an icon that looks like a split box. When you however over it should say split horizontal. This allows you to have two windows within the layout that will show your model twice. Also, if you go View and Toggle Borders, you can hide the line between them so that pictures and animations look better. |
|
August 1, 2016, 12:07 |
|
#3 |
Member
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12 |
Thank you.
I am not looking for a split. I want to clone a certain layout to get two equal layouts but with different names . And then, be able to make some small changes without having to configure all the properties again. |
|
November 30, 2016, 10:42 |
|
#4 | |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
Quote:
Have you had any idea how to do that? |
||
November 30, 2016, 10:50 |
|
#5 |
Member
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12 |
The last time I checked it I got the idea that it is not about layout duplication but maybe regarding each render view.
I'm still searching. Cheers, Lourenco |
|
November 30, 2016, 16:49 |
|
#6 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi,
You can use "save state" to save the current view and filters. Then when you use "load state" you can change to another input file while keeping all the other options same. Best, Mikko |
|
December 1, 2016, 03:08 |
|
#7 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
Thank you for your reply.
I know and use that a lot, but when you just want to create a layout that is slightly different of a layout you already have a simple duplication would be better. You can save and load a state many times, but then you have the same data loaded more than once. |
|
December 6, 2016, 06:59 |
|
#8 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
Here a script that duplicates a layout as far as there is only one view in it.
It is working for me, you might want to set different properties. Code:
rv1=GetActiveView() ALL=GetSources() dispProps=list() for i in range(len(ALL.keys())): dispProps.append(GetDisplayProperties(ALL.values()[i])) viewLayout1 = GetLayout() #viewLayout1.SplitHorizontal(0, 0.5) viewLayout2 = CreateLayout() rv2=CreateView('RenderView') SetActiveView(rv2) propNameList=['Visibility', 'Color', 'LookupTable', 'DiffuseColor', 'Scale', 'Representation', 'Texture', 'Opacity','Origin','Position','ScaleFactor'] for j in range(len(ALL.keys())): SetDisplayProperties(ALL.values()[j],ColorArrayName=dispProps[j].ColorArrayName[1]) for name in propNameList: try: eval('SetDisplayProperties(ALL.values()[j], ' + name + ' =dispProps[j].' + name + ')') except: pass ResetCamera() |
|
November 19, 2019, 14:36 |
|
#9 | |
Member
Yousef
Join Date: Feb 2015
Posts: 40
Rep Power: 11 |
Quote:
|
||
August 20, 2021, 10:17 |
|
#10 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
If anyone is still interested, this worked for me:
The new view will duplicate the original. |
|
September 8, 2023, 03:00 |
Python script: RenderViewCloning.py
|
#11 |
Senior Member
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 8 |
There is a discussing regarding the duplication / cloning of a renderview:
https://discourse.paraview.org/t/fea...erview/2370/12 You can download the python script here: https://gist.github.com/baloe/a6ccd1...94566f50e26d45 How does it work? After downloading the script you start the python shell in paraview and run the script "RenderViewCloning" in which several functions are defined: Code:
def clone_to_new_layout(): ''' Create a new layout and clone the current renderView into it. This only works properly if the current layout holds nothing but one renderView. ''' def clone_properties( renderView1, renderView2 ): '''Configure everything in renderView2 like it is in renderView1. ''' def split_down(): ''' Split the current renderView vertically by inserting a new renderView at the bottom. Display properties of objects in the pipeline, camera settings, etc. are cloned to the new renderView. ''' if you want to use "clone_properties" write Code:
#select your renderview1 RV1=GetRenderView() #secelt your renderver2 RV2=GetRenderView() #Configure everything in renderView2 like it is in renderView1 clone_properties( RV1, RV2 ) |
|
Tags |
layout, paraview, python |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error, while reopening my techplot layout file | farhan4596 | Tecplot | 3 | May 23, 2023 06:46 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 10:42 |
Problem in3D model processing | mebinitap | OpenFOAM | 2 | December 12, 2014 05:40 |
apt-get update Duplicate lists of OpenFOAM | Xulia | OpenFOAM Installation | 2 | June 20, 2013 11:13 |