Question refered to your new api v2/2.3.0

unhandled

(Carlos Travaini) #1

Hi, I would like to ask a question refered to your new version of api v2/2.3.0. In the old version the Iframe code generated was “sd-iframe-xxx” and in the new version the code is “sdv-iframe” without any number. Could you kindly info me about in which way I can call now the shipediver model?
For example, before my call was in the following format “iframe = document.getElementById(‘sd-iframe-7248’);” How can I make this now?

Many thanks


(Alexander Schiftner) #2

Hi @modfil,
we recently updated our platform and viewer to a new version. The embed code that you have been using so far will continue working, using the previous version of our viewer.

To take advantage of our new viewer, which offers a much more powerful API, please update your embed code to the one you can see when viewing your model on app.shapediver.com

As an example, it looks like this:

The new embed code is still using an iframe. In order to use the API, activate the JavaScript included in the embed code. You can find the complete API reference here: https://www.shapediver.com/developers/

A comment about direct embedding: This kind of embedding is currently available to our Enterprise clients. We will enable it for PRO clients in the near future.


(Carlos Travaini) #3

Many thanks Alexander for your kind reply, surely I will try to adapt my website with your new api. In any case, at the moment, I need to continue using the old version, since one of the products that I sell needs urgently a modification. Therefore I need to know if and how I can create a new Shapediver and see it with the old version, that is obtain the sd-iframe-xxx?

Thanks


(Alexander Schiftner) #4

If you want to continue using the old embed code with a model newly uploaded to app.shapediver.com, you can do that by modifying the old embed code like so:

Replace the model name in the src attribute of the iframe. Example:

You can find the new model name by viewing your model on app.shapediver.com, by looking at the URL, example:
https://www.shapediver.com/m/your-new-model-name

There is no need for you to change the id of the iframe, simply leave it untouched.


(Carlos Travaini) #5

many thanks indeed! your solution works perfectly