# PetscViewerSetType

Builds PetscViewer for a particular implementation.

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscViewerSetType(PetscViewer viewer,PetscViewerType type)

Collective on PetscViewer

### Input Parameter

| viewer | - the PetscViewer context
| type | - for example, "ASCII"

### Options Database Command

-draw_type <type> -Sets the type; use -help for a list of available methods (for instance, ascii)

### Notes

See "include/petscviewer.h" for available methods (for instance, PETSC_VIEWER_SOCKET)

### See Also

PetscViewerCreate(), PetscViewerGetType()

Level:advanced
Location: src/sys/viewer/interface/viewreg.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex33.c.html