# PetscViewerGetOptionsPrefix
Sets the prefix used for searching for all PetscViewer options in the database. 
## Synopsis
```
#include "petscviewer.h" 
PetscErrorCode PetscViewerGetOptionsPrefix(PetscViewer viewer, const char *prefix[])
```
Not Collective


## Input Parameter

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



## Output Parameter

- ***prefix -*** pointer to the prefix string used



## Fortran Note
The user should pass in a string 'prefix' of sufficient length to hold the prefix.




## See Also
 [](sec_viewers), `PetscViewer`, `PetscViewerAppendOptionsPrefix()`

## Level
advanced

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/interface/view.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)  
