Shapediver api usage for upload OBJ from url


(Bodibodileg) #1

I know for uploading obj files we need to upload a file to our private server and input the link to Shapediver using ShapediverTextInput for the url. Is there an example on how to use that component withing Shapediver api?


(Mathieu Huard) #2

We are currently working on the documentation section of the website, I’ll make sure this topic is documented in the next few days and post the link in this topic.

At the moment, you can already look at the API reference pages regarding the parameter interface: http://app.shapediver.com/api/module-ApiInterfaceV2-ApiParameterInterface.html


(Mathieu Huard) #3

Find here an article describing the file parameters and how to use them with the API: https://support.shapediver.com/hc/en-us/articles/360022979632-Import-files-in-the-Shapediver-viewer

As you can see, it’s not needed to upload files to a private server anymore, the ShapeDiver plugin now has components which allow to directly import geometry, image and text files to Grasshopper.

If you prefer the option to store your obj files on a different location and import them using their URL, you just need to connect a ShapeDiverTextInput component to the input parameter of the ShapeDiverGeometryImport component and just set the value of the text (the URL where the file is stored) using the API, which is simpler. Let me know if that second option is unclear and you would like more details, we will also write separate documentation about this topic.