Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Forma Developer Forum
Welcome to Autodesk Forma Developer Forum. Share your knowledge, ask questions, and explore popular Forma API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Downloading or exporting 3D model

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
kristian6PNQM
231 Views, 2 Replies

Downloading or exporting 3D model

Hello, 
I am working on extension and trying to find a way to get the 3D model or export the selection.  The 3D model is either the model placed from Library for proposal or the created geometry. 
Is there way to find the storage path based on key or urn?
Thanks in advance!

2 REPLIES 2
Message 2 of 3

Hi again Kristian! 
Found your question - will chase someone to get this answered! And thank you again for showing us your progress on the POC!
Marthe

Message 3 of 3

Hi @kristian6PNQM
It seems from your question that you're using the Forma SDK. Given that you have the URN, there are two steps to downloading the geometry data:
1. Get the element using:

const { element } = await Forma.elements.get({
  urn: <insert-urn-here>,
})


2. From the representation you want on that element, you will need to get the Blob of that element's representation:

// The blob is unknown data. For volumeMesh, you will get binary GLB.
const blobResponse = await Forma.elements.blobs.get({
  blobId: element.representations.volumeMesh.blobId,
})
const arrayBuffer: ArrayBuffer = blobResponse.data

See the Blob API for more information: https://app.autodeskforma.com/forma-embedded-view-sdk/docs/classes/elements.BlobsApi.html

Here are the different representations and what data they will include: https://app.autodeskforma.com/forma-embedded-view-sdk/docs/modules/elements.Representation.html

As for selection, you can use the Selection API to subscribe to when the selection in the scene changes. See https://app.autodeskforma.com/forma-embedded-view-sdk/docs/classes/scene_selection.SelectionApi.html...

Please let me know if this helps you 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report