# IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

### DXSetPart

Function

Adds a Field to an Object.

Syntax
`
#include <dx/dx.h>
`

Object DXSetPart(Object o, int n, Field field)

Functional Details

Performs a depth-first traversal of the Object `c`, and replaces the `n`th occurrence of a subObject with class `CLASS_FIELD` with the Field `field` given. If the root of the Object given is not one of `CLASS_GROUP`, `CLASS_XFORM`, `CLASS_CLIP`, or `CLASS_SCREEN`, this function has no effect.

For applying a function to every Field in a Group, `DXProcessParts` is a more efficient interface.

The parts of a Group may be indexed by calling `DXSetPart` with successive values of `n`, starting at 0 until `NULL` is returned, provided the replacement part contains the same number of subObjects of `CLASS_FIELD`. This is because the replacement part will be traversed (and counted) in subsequent calls to `DXSetPart`.

Return Value

Returns `o` or returns `NULL` and sets an error code.

See Also

`DXGetPart, DXGetPartClass, DXProcessParts`

"Parts".

[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]

[IBM Home Page | Order | Search | Contact IBM | Legal ]