CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] How to duplicate a layout?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By TobM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2016, 11:08
Default How to duplicate a layout?
  #1
Member
 
Lourenšo SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 30
Rep Power: 8
lourencosm is on a distinguished road
Does anyone knows how to duplicate a layout?
Either with python or gui?

Thank you,
Lourenšo
lourencosm is offline   Reply With Quote

Old   August 1, 2016, 11:03
Default
  #2
New Member
 
Clayton
Join Date: Jul 2016
Posts: 2
Rep Power: 0
MrChips is on a distinguished road
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.
MrChips is offline   Reply With Quote

Old   August 1, 2016, 11:07
Default
  #3
Member
 
Lourenšo SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 30
Rep Power: 8
lourencosm is on a distinguished road
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.
lourencosm is offline   Reply With Quote

Old   November 30, 2016, 09:42
Default
  #4
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 7
TobM is on a distinguished road
Quote:
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.
I am interested in that, too.
Have you had any idea how to do that?
TobM is offline   Reply With Quote

Old   November 30, 2016, 09:50
Default
  #5
Member
 
Lourenšo SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 30
Rep Power: 8
lourencosm is on a distinguished road
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
lourencosm is offline   Reply With Quote

Old   November 30, 2016, 15:49
Default
  #6
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 233
Rep Power: 9
Flowkersma is on a distinguished road
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
Flowkersma is offline   Reply With Quote

Old   December 1, 2016, 02:08
Default
  #7
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 7
TobM is on a distinguished road
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.
TobM is offline   Reply With Quote

Old   December 6, 2016, 05:59
Default
  #8
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 7
TobM is on a distinguished road
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()
lourencosm and ykanani like this.
TobM is offline   Reply With Quote

Old   November 19, 2019, 13:36
Default
  #9
Member
 
Yousef
Join Date: Feb 2015
Posts: 40
Rep Power: 7
ykanani is on a distinguished road
Quote:
Originally Posted by TobM View Post
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()
Nice! Worked well.
ykanani is offline   Reply With Quote

Reply

Tags
layout, paraview, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 1 May 19, 2017 10:13
Error, while reopening my techplot layout file farhan4596 Tecplot 2 January 12, 2017 10:12
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 04:40
apt-get update Duplicate lists of OpenFOAM Xulia OpenFOAM Installation 2 June 20, 2013 10:13


All times are GMT -4. The time now is 03:52.