API Reference

Complete list of Model API methods organized by category.

New methods and features are added to the API over time. While we aim to keep this reference up to date, some methods may not yet be documented or may lack complete details.

We welcome your questions and feedback. If something is unclear, missing, incorrect, or not working as described, please contact usarrow-up-right.

Methods

Initialization

#
Method
Description
Snippet

1

Initialize API connection with the embedded model

2

Check if the API is ready

3

Get project information


Events

#
Method
Description
Snippet

Configuration

#
Method
Description
Snippet

Objects

#
Method
Description
Snippet

9

Get objects by name or all objects

10

Remove objects from the scene

11

Get objects currently under cursor

13

Move objects in hierarchy

15

Select one or more objects by name or ID

16

Remove objects from selection, or clear entire selection

17

Get currently selected objects


Gizmo

#
Method
Description
Snippet

18

Configure transform gizmo visibility, orientation, and snapping


Transformations


Materials

#
Method
Description
Snippet

25

Get all materials in the scene

26

Get materials assigned to an object

29

Add new or edit existing material

30

Remove material from an object


Textures

#
Method
Description
Snippet


Primitives

#
Method
Description
Snippet

37

Create a box primitive and add it to the scene

38

Create a sphere primitive and add it to the scene

39

Create a cone primitive and add it to the scene

40

Create a cylinder primitive and add it to the scene

41

Create a torus primitive and add it to the scene

42

Create a tube primitive and add it to the scene

43

Create a polyhedron primitive and add it to the scene

44

Create a square plane primitive and add it to the scene


Boolean Operations

#
Method
Description
Snippet

45

Enable or disable boolean calculation on a boolean operator

46

Check if boolean calculation is active

47

Set operation type for a child of a boolean operator

48

Get operation type for a child of a boolean operator


3D Text

#
Method
Description
Snippet


Camera

#
Method
Description
Snippet

51

Get camera position and target

52

Set camera position and target

53

Fit object in camera view


Animations


Raycast

#
Method
Description
Snippet


Environment

#
Method
Description
Snippet


Import / Export

#
Method
Description
Snippet

62

Import 3D file into scene

63

Import another Vectary project

65

Take screenshot of the scene


Common Types

Types that appear in multiple methods are documented here. Types specific to a single method are described on that method's page.

Vector3

3D coordinates or RGB color values.

Euler

Rotation angles in degrees.

Object

Scene object returned by getObjects() and similar methods.

CreatePrimitiveOptions

Shared options object accepted by all create* primitive methods

ConfigurationState

State of variants and materials, returned by getConfigurationState().

CameraViewState

Camera position and orientation, used by getViewState() and setViewState().

Material

Material properties for PBR rendering.

Textures

TextureConfig

chevron-rightTextureFilterSettingshashtag
chevron-rightTextureMapSettingshashtag
chevron-rightWrapModehashtag

TextureData

Last updated