# PetscObjectView
Views any `PetscObject`, regardless of the type. 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscObjectView(PetscObject obj, PetscViewer viewer)
```
Collective on obj


## Input Parameters

- ***obj -*** any PETSc object, for example a `Vec`, `Mat` or `KSP`.
This must be cast with a (`PetscObject`), for example,
`PetscObjectView`((`PetscObject`)mat,viewer);
- ***viewer -*** any PETSc viewer





## See Also
 `PetscObject`, `PetscObjectViewFromOptions()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/destroy.c.html#PetscObjectView">src/sys/objects/destroy.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/destroy.c)


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