I have a question: is it possible to activate the ShapeDiverExportShapeWays component through the shapediver-api? Unfortunately i do not know how to program for the web, so this might be a strange question. the aim would be to activate it though a webshop, after a sale.(not the shapeways webshop)
It seems possible to make inputs for other parameters through the api, but is it also possible to activate ShapeDiverExportShapeWays ? In contrast to other grasshopper components there is no “boolean input” in this component, the grasshopper just shows up after uploading the file in the viewer.
Is there some documentation about this question (but not the one for normal export of an stl file)?
Yes it is possible to trigger ShapeWays exports using the API of the ShapeDiver viewer! As an example, if you open a model containing a ShapeWays export in the browser (e.g. this one), then open the browser console, and give it a try:
- As a first step you can list the existing exports
- Once you know the id of the export, you can trigger it like this (the
silent property tells the viewer not to show a modal dialog while running the export):
Once the resulting Promise has resolved, the resulting ExportResult object contains details about the model uploaded to ShapeWays.
The documentation of the viewer API contains a separate section about exports.
Please be aware that the API of ShapeWays sometimes may not be very responsive, which may result in timeouts. This case needs to be handled by the application built on top of the ShapeDiver Viewer.
thanks for your answer!
Is it there a possibilty to get a feedback on the upload time before the resolve?
Is it ok if the user closes the brouwser window before we get the promise resolved?
Or do u know what causes the delays?
Unfortunately this is technically not possible. The process of exporting to ShapeWays involves uploading of the model (which is typically fast), as well as checking of the model by ShapeWays, for which no progress information is made available via their API.
If the browser tab is closed before the export process finishes, it will not be observed anymore, and you have no possibility to find out about its status. In case at this time the upload to ShapeWays had been triggered already, the model should still show up in your ShapeWays account once the checking process has completed.
I didn’t understand this question, please explain.