---
name: "icetSetContext"
section: "3"
platform: "linux"
package: "paraview"
version: "5.13.2+dfsg-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/icetSetContext"
---

# icetSetContext(3)

## NAME

**icetSetContext -- changes the current context.**

## Synopsis

\#include \<IceT.h\>

| | | |
| --- | --- | --- |
| void **icetSetContext**( | **IceTContext** | *context* ); |

## Description

The **icetSetContext** function sets the **IceT** state machine to work with the context defined by *context* and the state associated with it. Further calls to **IceT** functions will operate based on the state encapsulated in *context*. Changing the state of the context is a fast operation.

## Errors

- **ICET\_INVALID\_VALUE**

   *context* is not valid.

## Warnings

None.

## Bugs

None known.

## Notes

The behavior of **icetSetContext** is somewhat indeterminate if *context* is not valid. Usually, an **ICET\_INVALID\_VALUE** error will be raised, but it is possible that the context will be set to some other context.

## Copyright

Copyright (C)2003 Sandia Corporation

Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This source code is released under the New BSD License.

## See Also

[*icetGetContext*(3)](/icetGetContext/3.md), [*icetCreateContext*(3)](/icetCreateContext/3.md), [*icetCopyState*(3)](/icetCopyState/3.md)
