I’m starting the migration from API V2 to V3. I have read the documentation and I cant access this examples: Viewers - The “simple example”. Can you help me, please?
And…
We already have the V2 API fully working. Example: Estante movêu
To implement the V3 API do we have to do all the calling methods again to get the parameters, change the way each element is changed, etc? Is this really the way?
In V2, we use the “api.scene.getData()” method to get the OUTPUTS sent by the model. How can we use this method in this new version? Is it by “window.sdv.api.sessions.mySession.outputs”?
The link to the simple example is fixed in the documentation, let me know if you can see it.
About the viewer 3, it is not backwards compatible with the viewer 2 API, so you will indeed need to update your code to make it work with it. The new API should make things easier, and the documentation contains an example comparing the same code in viewer 2 and 3 to get started.
Regarding the outputs: there is no easy way to do this call at the moment, thanks for pointing it out. We are working on adding some helper functions that will make the data output values more accessible.
About the outputs, is there an example of how I can get them currently, or do you recommend that we wait? Because, in the current version, we use them to calculate the price…
This function will give you back an array with only one element if you only have one output called “Price”. Within this object, you will find a content array that contains the value of the output. Again, the content is an array that will only have one element if you only send a single number to it (the price). So in your case, the call would look something like this:
@seltzdesign the new help page does not yet include a section about using the geometry backend without the viewer, but this section is going to be there soon. However you can already find the core information about it here: @shapediver/sdk.geometry-api-sdk-v2 - npm
The augmented reality isn’t loading… from what I could debug it gives an error as if the object had some problem. Can you help us with what we need to check? The method I’m using is:
I have communicated the issue to the team and will get back to you when we have investigated it. As a follow up question, did you check that the AR view works when you use it directly on the new shapediver beta platform (shapediver.com/app)?
We have identified several issues and our developer have already fixed some. The last remaining issue concerns the text tags, which seem to cause an issue when exporting the scene to AR. We are still investigating this issue and expect to fix it this week. I will get back to you when we make progress.
However, there is still an issue regarding the 3d text tags that is on the side of the android quick look feature. Therefore if you want to already test AR with your model, you would need to create a version without the text tags. You could add a toggle to the grasshopper file and using the API, you can switch off the tags and then call the AR function of the API. Let me know if you have issues with such a version using the latest version of our viewer.