
##################################
A3DPDF3DArtworkAddResourceFromFile
##################################

.. c:function:: A3DStatus A3DPDF3DArtworkAddResourceFromFile(A3DPDF3DArtwork *p3DArtwork, const A3DUTF8Char *pcFullFileName, const A3DUTF8Char *pcResourceName)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DPDF3DArtworkAddResourceFromFile(:c:type:`~A3DPDF3DArtwork`\ \* **p3DArtwork**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcFullFileName**\ , *const* :c:type:`~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 :c:func:`~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
   
   




