Our getting started tutorial shows you how to get your files to our servers, translate them and display their 3d visuals in your webpage. I followed the same in the SharePoint sample and will do the same here.
I started off with creating a new Traditional Web app:
Then added an empty Web Screen where we'll list the files stored in our APS bucket and display the selected model in the Viewer:
Added another Web Screen that already had the Upload widget in it to enable upload of new models and just deleted everything from it that was not needed:
Then defined all the API endpoints this app will use from Autodesk Platform Services. Just had to set the headers and add a sample response so that outsystems can generate the data types for the response:
In the main web screen added a flow that will use all the REST endpoints we added. Request an access token, get the list of objects in the bucket, include both the css and js file of the Viewer and then call the "initializeViewer()" function that is part of the ViewerBlock's code. Also added local parameters: one to store the cursor as we iterate through the contents of the bucket called StartAtUrlParam, and one to store information about the list of files we retrieved called ObjectsInBucket. The latter will be referenced by the Record List I added next.
So I added the Record List that will be using the ObjectInBuckets local variable as a source, plus a Separator and an instance o the ViewerBlock
Also had to create a flow for the second Web Screen that will be called when the user clicks the Upload button. It requests an access token, then a signed URL for the file that we want to upload, then uploads the content using that URL, triggers the SVF translation job for the file, and finally pops up a notification about the successful upload
Here is the finished website in action: https://youtu.be/wQho4a4JguE
And here is the saved application that you should be able to test in your environment. Please check out the readme for info on what needs to be modified in the app in order to run it with your credentials: https://github.com/adamenagy/outsystems-integration
There is actually a component for our Viewer that you can use provided by OutSystems: https://www.outsystems.com/forge/component-overview/1337/autodesk-forge-connector