# PetscBagViewFromOptions
Processes command line options to determine if/how a PetscBag is to be viewed. 
## Synopsis
```
#include "petscbag.h"   
PetscErrorCode PetscBagViewFromOptions(PetscBag bag, PetscObject bobj, const char optionname[])
```
Collective


## Input Parameters

- ***obj   -*** the object
- ***bobj  -*** optional other object that provides prefix (if NULL then the prefix in obj is used)
- ***optionname -*** option to activate viewing





## See Also
 `PetscBagCreate()`, `PetscBag`, `PetscViewer`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/bag/bag.c.html#PetscBagViewFromOptions">src/sys/classes/bag/bag.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex69.c.html">src/snes/tutorials/ex69.c.html</A><BR>


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