# A3DPDF3DArtworkAddResourceFromFile

A3DStatus `A3DPDF3DArtworkAddResourceFromFile`(A3DPDF3DArtwork *p3DArtwork, const A3DUTF8Char *pcFullFileName, const A3DUTF8Char *pcResourceName)
  `A3DStatus` A3DPDF3DArtworkAddResourceFromFile(`A3DPDF3DArtwork`* p3DArtwork, const `A3DUTF8Char`* pcFullFileName, const `A3DUTF8Char`* pcResourceName)

  Adds a resource to the 3D Artwork, to be consumed by 3D javascript.

  The function has to be called after the 3D annot has been created with `A3DPDF3DAnnotCreate()`. The resource added in the 3D annotation is to be consumed by javascript stored on 3D context. For example, the following code inserts the geometry in the u3d file into the scene. A new node is created in the model tree that can be moved to an apropriate position.

      varaxesResource=newResource("pdf://TS3D_Axes.u3d");
      scene.addModel(axesResource);
      g_axes=scene.nodes.getByName("Axes");

  Parameters

  > p3DArtwork: The 3D Artwork object to work with

  > pcFullFileName: The file name of the resource file. The file format is deducted from file extension. Only 3D formats, U3D and PRC are supported.

  > pcResourceName: The name of the resource. This name is used in javascript to access to the resource.

  Returns

  > A3D_SUCCESS in case of success or an error code

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Exchange in your own language, or choose a sample question below to start a conversation:

What is HOOPS Exchange?
What are the latest release notes for HOOPS Exchange?
How do I start evaluating HOOPS Exchange?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...