ParaView/Python/Loading and saving state: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Loading state ==
== Loading state ==


<source lang="python">
{{ParaView/Template/DeprecatedUsersGuide}}
>>> from paraview.simple import *
 
# Load the state
>>> servermanager.LoadState("/Users/berk/myteststate.pvsm")
# Make sure that the view in the state is the active one
>>> SetActiveView(GetRenderView())
# Now render
>>> Render()
# Get the list of sources
>>> GetSources()
{('Sphere1', '5'): <paraview.servermanager.Sphere object at 0xaf80e30>,
('Shrink1', '11'): <paraview.servermanager.Shrink object at 0xaf80df0>,
('Cone1', '8'): <paraview.servermanager.Cone object at 0xaf80cf0>}
# Change the resolution of the cone and render again
>>> FindSource("Cone1").Resolution = 32
>>> Render()
</source>


== Saving state ==
== Saving state ==


<source lang="python">
{{ParaView/Template/DeprecatedUsersGuide}}
>>> from paraview.simple import *
 
>>> sph = Sphere()
{{ParaView/Template/Footer}}
>>> Render()
>>> servermanager.SaveState("/Users/berk/pythonstate.pvsm")
</source>

Latest revision as of 18:47, 24 June 2024

Loading state

PAGE DELETED
The Paraview's User Guide and Reference Manual have been moved from the Wiki to The ParaView Guide. Please use the history if you want to access the old version of this document.


Saving state

PAGE DELETED
The Paraview's User Guide and Reference Manual have been moved from the Wiki to The ParaView Guide. Please use the history if you want to access the old version of this document.



ParaView: [Welcome | Site Map]