Use 2 different scene containers in the same page

Hi,

I added to scene two differenct containers, “sdv-container” and “sdv-container1”. The scene loads in both views but it is the same scene. I also instantiated different api object for the second one.

Here is my code:

var _container = document.getElementById(‘sdv-container’);
// viewer settings
var _viewerSettings = {
// container to use
container: _container,
// when creating the viewer, we want to get back an API v2 object
api: {
version: 2.8
},
// ticket for a ShapeDiver model
ticket: ‘00000’,

modelViewUrl: ‘eu-central-1’
};

var api = new SDVApp.ParametricViewer(_viewerSettings);

var _container2 = document.getElementById(‘sdv-container2’);
// viewer settings
var _viewerSettings2 = {
// container to use
container: _container2,
// when creating the viewer, we want to get back an API v2 object
api: {
version: 2.8
},
// ticket for a ShapeDiver model
ticket: ‘00000’,

modelViewUrl: ‘eu-central-1’
};

// create the viewer, get back an API v2 object

var api2 = new SDVApp.ParametricViewer(_viewerSettings2);

Im uploading a file that loads both scene. Instead I want to upload a file for each scene separately.

I think you are using an old viewer version, the method above should work in a more recent viewer. Try to use version 2.11.