Outputs are not available via the iframe API

I have been using the iframe API and everything has been working except for the outputs.

When calling api.scene.getDataAsync().then((d) => console.log(d)) with the iframe API I get an empty array back. However for the same model with the non iframe API api.scene.getData() I do get the output I expect.

Is this a known issue or am I doing it wrong?

This might be a timing issue in case there is no data at the point of the request. Do you update parameters right before this call? If so you need to wait for this to be finished properly and then you can try to read the data.

I have not tested this in conjunction with other API calls. I have waited until the model loads in the browser and then tested the API via the console. I am using version 2.20.2 if that helps.

I figured out the issue. Was a mistake in my code.

1 Like