# PetscViewersGetViewer
Gets a `PetscViewer` from a `PetscViewer` collection 
## Synopsis
```
PetscErrorCode PetscViewersGetViewer(PetscViewers viewers, PetscInt n, PetscViewer *viewer)
```
Not Collective, but the resulting `PetscViewer` will be collective object on viewers


## Input Parameters

- ***viewers -*** object created with `PetscViewersCreate()`
- ***n -*** number of `PetscViewer `you want



## Output Parameter

- ***viewer -*** the `PetscViewer`





## See Also
 `PetscViewer`, `PetscViewersCreate()`, `PetscViewersDestroy()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/interface/viewers.c.html#PetscViewersGetViewer">src/sys/classes/viewer/interface/viewers.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/interface/viewers.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
