Tetra 4D Enrich Templates Module
Functions
Detailed Description
- group a3d_pdf_Tetra4D_module
(HOOPS Publish Advanced) Functions to enrich Tetra 4D documents.
This module describes the functions and structures useful to enrich PDF documents generated by Tetra4D solutions.
Function Documentation
-
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)
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.
- Version
9.1
- Parameters:
pDoc – [in] 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 – [in] Identifier of the 3D annot to update. If not provided, use idxPage and idx3dAnnot to identify the annotation to update.
idxPage – [in] 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 – [in] 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 – [in] The model file to work with.
pParamsExportData – [in] The PRC export parameters that are used to store the model file into the PDF.
ppPrcWriteHelper – [inout] 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 – [in] The 3D Artwork parameters.
p3DAnnotData – [in] The 3D Annot parameters.
bAddStandardViews – [in] Add six standard views: Left Top Front Right Bottom Back.
pDefaultViewData – [in] 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 – [in] 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 in our programming guide for more details.
pcInTextFieldDataFile – [in] 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 in our programming guide for more details.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code