---
name: "SoWriteAction"
section: "3iv"
platform: "linux"
package: "inventor-doc"
version: "2.1.6+ds-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SoWriteAction/3iv"
---

# SoWriteAction(3iv)

Writes a scene graph to a file

## NAME

SoWriteAction — Writes a scene graph to a file

## INHERITS FROM

SoAction \> SoWriteAction

## SYNOPSIS

**#include \<Inventor/actions/SoWriteAction.h\>**

Methods from class SoWriteAction:

	**SoWriteAction()**\
 	**SoWriteAction(SoOutput \*out)**\
 **SoOutput \***	**getOutput() const**

Methods from class SoAction:

**virtual void**	**apply(SoNode \*node)**\
 **virtual void**	**apply(SoPath \*path)**\
 **virtual void**	**apply(const SoPathList &pathList, SbBool obeysRules = FALSE)**\
 **static SoType**	**getClassTypeId()**\
 **virtual SoType**	**getTypeId()**\
 **virtual SbBool**	**isOfType(SoType type)**\
 **virtual void**	**invalidateState()**

## DESCRIPTION

**This class is used for writing scene graphs to files. It contains an SoOutput** instance that by default writes to the standard output. Methods on the **SoOutput** can be called to specify what file or memory buffer to write to.

## METHODS

	**SoWriteAction()**\
 Constructor.

	**SoWriteAction(SoOutput \*out)**\
 Constructor that takes an **SoOutput** to use for output.

**SoOutput \***	**getOutput() const**\
 Returns pointer to **SoOutput** instance in action.

## SEE ALSO

**SoOutput**
