api.scene.getData - Method does not return all parameters always

Hi!
We currently use the Shapediver API V2.

We are using the api.scene.getData() method to get the outputs, calculate the price and display it to the user.

We have the following problem: sometimes, when using the api.scene.getData() method it is not returning all parameters, it only returns some parameters.

Example with all parameters:

Example with missing parameters:

We observed that, when parameters are missing in the return, it always happens after some modifications the user has made to the model.

We call the api.scene.getData() method on the event api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, so that always when the user modifies the model, the price is recalculated.

Has it ever happened to any of you not to return some parameters in this method? What can I do to prevent this from happening?

Model: https://app.shapediver.com/m/pag-produto-preco-v081-1

Test page: https://moveu.venuswp.com.br/moveu/estante/

Thanks!

1 Like

Hi @mariana.camargo, could you let us know a precise configuration of parameters for which this is happening?
A hint: If there is no data resulting from the computation for the data output, then this data output will not show up in api.scene.getData(). Maybe this explains the issue, let’s see. Looking forward to your reply.

An example for what I mentioned:
https://app.shapediver.com/m/dataoutputtestzeroandempty

data_output_no_data does not show up: