Skip to main content

4.3 - Project Info

The project information is a JSON object containing details about the project structure and content.

Event nameInput / OutputPayloadReason
getProjectInfoInput eventNone.Request the Project Info for the current state.
projectInfoOutput eventSee the description below.Receive the requested project info.

Example​

// Receive the project info.
configurator.addEventListener("projectInfo", (event) => {
console.log(event.detail);
});

// Send a request to get the project info.
configurator.dispatchEvent(new CustomEvent("getProjectInfo"))

Payload description​

The Project Info is a complex JSON object. At the top level, it contains the following attributes:

Attribute nameTypeContent
anchorsArray of Anchors data. πŸ”—When a modular product is loaded, this contains the links between products.
productsArray of Product data. πŸ”—This will contain the products currently loaded.
modularContextOptional Modular context. πŸ”—When a modular product is loaded, this is the linked Modular Context.

Product​

This is the description of a product or sub product.

Attribute nameTypeContent
dbIDstringThe identifier of this product in the database. If you load the same product multiple times, the dbid will be the same.
parametersArray of Parameters. πŸ”—The parameters of this product.
subProductsArray of Products. πŸ”—The sub products of this product.
transfomatrix4The transformation matrix of the product, corresponding to its position in the 3D scene.
uuidstringA unique random identifier for this instance of the product.

Parameter​

This is the description of the parameter of a product.

Attribute nameTypeContent
idstringThe identifier of this product in the database. If you load the same product multiple times, the dbid will be the same.
typenumberA number indicating the type of the value:
1: number (Real)
2: integer
3: boolean
4: string
5: string (color)
6: string (material dbid)
7: string (product dbid)
valueSee the "type" attribute.The current value of this parameter. The type depends on the "type" attribute.

Anchors​

When a modular product is used and multiple modules are loaded, they are attached by anchors. An anchor in the project info is represented by these attributes:

Attribute nameTypeContent
furnitureUUIDstringThe unique identifier of a product.
attachmentsAn array of objectsEach object matches an anchor of the product, with the following attributes:
anchorIndex: number (the index of this anchor on this product)
attachedUUID: string (the UUID of another product attached using this anchor)

Modular Context​

When a modular product is loaded, this contains information about the product used as a Modular Context. πŸ”—

Attribute nameTypeContent
productDbIdstringThe database identifier of the product used as a modular context.