Multiple parallel sessions

Hello,
I’m working on a webpage with multiple parallel sessions:

        var api;
        var viewerInit = false;
        var parameters;
        let _container = document.getElementById('sdv-container'); 
        let settings = {container: _container, ticket: "xxx" };
        window.api = new SDVApp.ParametricViewer(settings);
                
        var api_2;
        var viewerInit_2 = false;
        var parameters_2;
        let _container_2 = document.getElementById('sdv-container_2'); 
        let settings_2 = { container: _container_2, ticket: "xxx"
        };
        window.api_2 = new SDVApp.ParametricViewer(settings_2);

Does it cost one ShapeDiver session of 10 minutes when page is loaded, or two sessions credits ?

Thanks for your reply,
Pierre-Yves

That costs you two credits.

Hello,

Thanks @pavol =)

Our original GH definition have 3 steps:
#1 Displaying default model mesh (file)
#2 Regenerating model on user inputs
#3 Post-preparation for a detailed export

This definition computing is too heavy for complex variations.
This is why we planed to create separated definitions like functions.
But call 3 ShapeDiver files via API, logically costs us 3 ‘sessions’ credits and 1 ‘export’ credit.

Any advices to manage spitted computing times of the 3 steps inside 1 ShapeDiver upload ?

Thanks for helping,
Pierre-Yves

Many of our users choose to use a single definition and a boolean toggle with a filter that blocks the part of the definition with the heavy computations necessary for detailed exports. You could go with this approach, since you are using the API:

  • Disable the heavy computation during user input phase
  • When this phase is over, switch on the toggle using the API and run the export afterwards
1 Like

Thanks @mathieu1 !