
########################
A3DPDFDocumentUpdateData
########################

.. c:function:: A3DStatus A3DPDFDocumentUpdateData(A3DPDFDocument *pDoc, const A3DUTF8Char *pcAnnot3DUID, const A3DInt32 idxPage, const A3DInt32 idx3dAnnot, A3DAsmModelFile *pModelFile, const A3DRWParamsExportPrcData *pParamsExportData, A3DRWParamsPrcWriteHelper **ppPrcWriteHelper, const A3DPDF3DArtworkData2 *p3DArtworkData, const A3DPDF3DAnnotData *p3DAnnotData, const A3DBool bAddStandardViews, const A3DPDFViewData *pDefaultViewData, const A3DUTF8Char *pcIn3dAttribsFile, const A3DUTF8Char *pcInTextFieldDataFile)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DPDFDocumentUpdateData(:c:type:`~A3DPDFDocument`\ \* **pDoc**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcAnnot3DUID**\ , *const* :c:type:`~A3DInt32` **idxPage**\ , *const* :c:type:`~A3DInt32` **idx3dAnnot**\ , :c:type:`~A3DAsmModelFile`\ \* **pModelFile**\ , *const* :c:struct:`~A3DRWParamsExportPrcData`\ \* **pParamsExportData**\ , :c:type:`~A3DRWParamsPrcWriteHelper`\ \*\* **ppPrcWriteHelper**\ , *const* :c:struct:`~A3DPDF3DArtworkData2`\ \* **p3DArtworkData**\ , *const* :c:struct:`~A3DPDF3DAnnotData`\ \* **p3DAnnotData**\ , *const* :c:type:`~A3DBool` **bAddStandardViews**\ , *const* :c:struct:`~A3DPDFViewData`\ \* **pDefaultViewData**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcIn3dAttribsFile**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcInTextFieldDataFile**\ )
   
   Function to automatically update Publish data into a document generated by Tetra 4D Enrich.
   
   Updated data are carousels, slide tables, attributes, and text fields. During update, following operations are performed:
   
   
   - The 3D object from the specified PDF template is replaced by the CAD data stored in model file,
   - The external information defined by XML files if any (attributes, title block) are read
   - The Tetra4D Enrich widgets present in the template (Carousel of Views, Table) are updated based on the new 3D data and the read XML attributes file,
   - The generic actions (text output on part selection, change of rendering mode...), if any, are updated,
   - The text fields (title block) are updated based on the specified title block XML file if any, and on the new 3D data.
   
   **Parameters**
   
   
      **pDoc**\ : The Document object to work with. The document should be a PDF file that has been generated by Tetra 4D Enrich. It is also necessary to primarily use the function A3DPDFDocumentCreateFromPDFFile to create the document, so that all necessary information are kept (javascript and all internal data stored in the document).
   
      **pcAnnot3DUID**\ : Identifier of the 3D annot to update. If not provided, use idxPage and idx3dAnnot to identify the annotation to update.
   
      **idxPage**\ : Identifier of the 3D annot to update: index of the page in the document (starting from 0). If -1, looks in all the document for the first annot 3D found
   
      **idx3dAnnot**\ : Identifier of the 3D annot to update: index of the annotation in the page (starting from 0). If -1, looks in all pages for the first annot 3D found.
   
      **pModelFile**\ : The model file to work with.
   
      **pParamsExportData**\ : The PRC export parameters that are used to store the model file into the PDF.
   
      **ppPrcWriteHelper**\ : Used to store the model file into the PDF. ppPrcWriteHelper is filled by this function and can be later used to get PRC data such as unique identifiers of PRC nodes
   
      **p3DArtworkData**\ : The 3D Artwork parameters.
   
      **p3DAnnotData**\ : The 3D Annot parameters.
   
      **bAddStandardViews**\ : Add six standard views: Left Top Front Right Bottom Back.
   
      **pDefaultViewData**\ : If provided, the parameters of this view are used to create a new automatic view (the view associated to the 'home' icon in Adobe Reader). If not provided, the automatic view is created with HOOPS Publish strategy: it is duplicated from the existing default view if there is one in the model file definition; if not, a new 'automatic' view is created with hard coded parameters.
   
      **pcIn3dAttribsFile**\ : XML file containing part attributes. If some of the meta-data to be put in the PDF document are managed by another application (such as ERP, PLM...), so not present in the CAD files, this function enables to import them through an XML file and map them to the 3D. Please refer to the section section`Parts attributes definition XML file <publish_enrich.html#attribs3dxml>`__\ in our programming guide for more details.
   
      **pcInTextFieldDataFile**\ : XML file defining text information to populate text fields (title-block) in the PDF document. Please refer to the section section`Text fields values definition XML file <publish_enrich.html#textfieldsxml>`__\ in our programming guide for more details.
   
   
   **Returns**
   
   
      A3D_SUCCESS in case of success or an error code
   
   




