> For the complete documentation index, see [llms.txt](https://help.vectary.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.vectary.com/api/model-api/api-reference/setprimitives.md).

# setPrimitives

#### setPrimitives

Updates the settings of a primitive object.

#### Signature

```typescript
setPrimitives(
  name: string, 
  settings: Partial<PrimitiveNodeSettings>
): Promise<void>
```

#### Parameters

<table><thead><tr><th width="108.9609375">Name</th><th width="285.45703125">Type</th><th width="91.51953125">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>Yes</td><td>Name of the primitive object</td></tr><tr><td><code>settings</code></td><td><code>Partial&#x3C;PrimitiveNodeSettings></code></td><td>Yes</td><td>Settings to update</td></tr></tbody></table>

#### Returns

`Promise<void>`

#### Usage

```javascript
// Change only box dimensions (other settings preserved)
await api.setPrimitives("Box", {
  boxDimensions: { x: 2, y: 1, z: 1.5 }
});

// Change only sphere radius
await api.setPrimitives("Sphere", {
  sphereRadius: 2.5
});

// Enable rounded corners on box
await api.setPrimitives("Box", {
  roundnessEnabled: true,
  roundnessRadius: 0.2
});

// Set multiple properties
await api.setPrimitives("Box", {
  boxDimensions: { x: 1, y: 1, z: 1 },
  boxSegments: { x: 2, y: 2, z: 2 },
  roundnessEnabled: true,
  roundnessRadius: 0.1,
  roundnessRadiusSegments: 4,
  computeNormals: true
});
```

#### Notes

* Accepts `Partial<>` — only specify properties you want to change
* Unspecified properties are preserved
* Invalid properties are silently ignored
* Values can be passed as numbers (converted to strings internally)
* The object must be a primitive created in Studio


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.vectary.com/api/model-api/api-reference/setprimitives.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
