# PetscObjectOptionsBegin
Begins a set of queries on the options database that are related and should be displayed on the same window of a GUI that allows the user to set the options interactively. 
## Synopsis
```
#include <petscoptions.h>
PetscErrorCode PetscObjectOptionsBegin(PetscObject obj)
```
Collective


## Input Parameters

- ***obj -*** object to set options for





## Notes
This is a macro that handles its own error checking, it does not return an error code.

Needs to be ended by a call the `PetscOptionsEnd()`

Can add subheadings with `PetscOptionsHeadBegin()`


## See Also
 `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
`PetscOptionsFList()`, `PetscOptionsEList()`


## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscoptions.h.html#PetscObjectOptionsBegin">include/petscoptions.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscoptions.h)


[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)  
