simple.proxy Module¶
- paraview.simple.proxy.Delete(proxy=None)[source]¶
Deletes the given pipeline source or the active source if no argument is specified.
- Parameters
proxy (Source proxy. Optional, defaults to deleting the active source.) – the proxy to remove
- paraview.simple.proxy.FindSource(name)[source]¶
Return a pipeline source based on the name that was used to register it with ParaView.
Example usage:
Cone(guiName='MySuperCone') Show() Render() myCone = FindSource('MySuperCone')
- Parameters
name (str) – The name that the pipeline source was registered with during creation or after renaming.
- Returns
The pipeline source if found.
- Return type
Pipeline source proxy.
- paraview.simple.proxy.FindView(name)[source]¶
Return a view proxy based on the name that was used to register it with ParaView.
Example usage:
CreateRenderView(guiName='RenderView1') myView = FindSource('RenderView1')
- Parameters
name (str) – The name that the view was registered with during creation or after renaming.
- Returns
The view if found.
- Return type
View proxy.
- paraview.simple.proxy.FindViewOrCreate(name, viewtype)[source]¶
Returns the view if a view with the given name exists and is of the the given viewtype, otherwise creates a new view of the requested type. Note, if a new view is created, it will be assigned to a layout by calling AssignViewToLayout.
- Parameters
name (str) – Name of the view to find.
viewtype (str) – Type of the view to create.
- paraview.simple.proxy.GetActiveViewOrCreate(viewtype)[source]¶
Returns the active view if the active view is of the given type, otherwise creates a new view of the requested type. Note, if a new view is created, it will be assigned to a layout by calling
AssignViewToLayout()
.- Parameters
viewtype (str) – The type of view to access if it is the active view or create if it doesn’t exist.
- Returns
The active view if it is of type viewtype.
- Return type
View proxy.
- paraview.simple.proxy.GetRepresentations()[source]¶
Returns all available representation proxies (display properties) in all views.
- Returns
dictionary of representations. Keys are tuples consisting of the registration name and integer ID of the representation proxy, and values are the representation proxies themselves.
- Return type
dict
- paraview.simple.proxy.GetSources()[source]¶
Get all available pipeline sources.
- Returns
dictionary of pipeline sources. Keys are tuples consisting of the registration name and integer ID of the proxy, and values are the pipeline sources themselves.
- Return type
dictionary
- paraview.simple.proxy.LocateView(displayProperties=None)[source]¶
Returns the view associated with the given displayProperties/representation object if it exists.
- Parameters
displayProperties (representation proxy) – a representation proxy returned by
GetRepresentation()
,GetDisplayProperties()
, orShow()
functions. Optional, defaults to the active representation.- Returns
The view associated with the representation if it exists, otherwise None
- Return type
View proxy or None
- paraview.simple.proxy.RenameProxy(proxy, group, newName)[source]¶
Renames the given proxy. This is the name used by
FindSource()
and is displayed in the Pipeline Browser.- Parameters
proxy (Proxy object) – The proxy to be renamed
group (str) – The group in which the proxy lives. Can be retrieved with proxy.GetXMLGroup()
newName (str) – The new name of the proxy.
- paraview.simple.proxy.RenameSource(newName, proxy=None)[source]¶
Renames the given source proxy. If the given proxy is not registered in the ‘sources’ group this function will have no effect.
- Parameters
newName (str) – The new name of the source proxy
proxy (Source proxy) – The source proxy to rename. It must be a member of the ‘sources’ group. Optional, defaults to renaming the active source.
- paraview.simple.proxy.RenameView(newName, proxy=None)[source]¶
Renames the given view. If the given proxy is not registered in the ‘views’ group this method will have no effect.
- Parameters
newName (str) – The new name of the view proxy
proxy (View proxy) – The view proxy to rename. It must be a member of the ‘views’ group. Optional, defaults to renaming the active view.
- paraview.simple.proxy.ResetProperty(propertyName, proxy=None, restoreFromSettings=True)[source]¶
Resets a proxy property to its default value.
- Parameters
propertyName (str) – Name of the property to reset.
proxy – The proxy whose property should be reset. Optional, defaults to the active source.
restoreFromSettings (bool) – If True, the property will be reset to the default value stored in the settings if available, otherwise it will be reset to ParaView’s application default value. Optional, defaults to True.
- paraview.simple.proxy.UpdatePipeline(time=None, proxy=None)[source]¶
Updates (executes) the given pipeline object for the given time as necessary (i.e., if it did not already execute).
- Parameters
time (float) – The time at which to update the pipeline. Optional, defaults to updating the currently loaded timestep.
proxy (Source proxy.) – Source proxy to update. Optional, defaults to updating the active source.