A3DPDFAdvancedPublishSDK.h

Header file for the Publish module.

Author

Tech Soft 3D

Version

23.0

Date

January 2023

Copyright (c) 2010 - 2023 by Tech Soft 3D, Inc. All rights reserved.

Content

Data Structures

A3DPDF3DNodesReferencesData

Structure that defines a set of 3D nodes. Usually used to be referred in a slide table row. Each element can contain several instances. We can get the uuids for each instance.

A3DPDFBomElementInfoData

Structure that defines an element in a BOM.

A3DPDFNodeAttributeData

Structure that defines an attribute of a PDF node in a modelfile.

A3DPDFNodeData

Structure that defines information for a PDF node in a modelfile.

A3DPDFModelFileNodesData

Structure that defines information on PDF nodes computed from a modelfile.

A3DPDFCheckBoxData

Structure to define a check box field.

A3DPDFRadioButtonData

Structure to define a radio button field.

A3DPDFListBoxData

Structure to define a list box field.

A3DPDFDropDownListData

Structure to define a drop down list field (combo box)

A3DPDF3DViewCarouselData

Structure to define a view carousel widget.

A3DPDFScrollTableData

Structure to define a ScrollTable widget.

A3DPDFDataTableData

Structure to define a DataTable.

A3DPDFTable3DViewsData

Structure to define a DataTable for 3D Views.

A3DPDFMapIndexData

Structure to define a Relationship map.

A3DPDFDataRelationshipData

Structure to define a Data Relationship.

A3DPDFLayerData

Structure to define a layer.

Functions

A3DPDFPageFieldListAddItem()

Function to add an item to a form field of type list.

A3DPDFDocumentAddJavascriptFromString()

Adds JavaScript to a document. This JavaScript is launched when the file is opened.

A3DPDFPageFieldSetActionJavascriptFromString()

Function to attach JavaScript to a form field. The JavaScript is defined as a string.

A3DPDFPageFieldSetActionJavascript()

Function to attach JavaScript to a form field. The JavaScript is defined as a string.

A3DPDFDocumentSetActionJavascript()

Function to define a javaScript action to an event triggered on the document. The JavaScript is defined as a string.

A3DPDFPageSetActionJavascript()

Function to define a javaScript action to an event triggered on the page. The JavaScript is defined as a string.

A3DPDF3DAnnotSetActionJavascript()

Function to define a javaScript action to an event triggered on an annotation. The JavaScript is defined as a string.

A3DPDFDocumentAddImageAsIcon()

Function to store an image in the document in a way it can be used as an icon for interactive widgets.

A3DPDFDocumentAddImageAsIcon2()

Function to store an image in the document in a way it can be used as an icon for interactive widgets.

A3DPDFGetBOMInfo()

Function to automatically compute a bill of material (BOM) from a modelfile.

A3DPDFFreeBOMInfo()

Function to free the memory allocated for the information of the BOM.

A3DPDFGetModelFileNodes()

Function to get information on PDF nodes computed from a modelfile.

A3DPDFCheckBoxCreate()

Function to create a CheckBox.

A3DPDFPageInsertCheckBox()

Function to insert a CheckBox in a page.

A3DPDFRadioButtonCreate()

Function to create a RadioButton.

A3DPDFPageInsertRadioButton()

Function to insert a RadioButton in a page.

A3DPDFListBoxCreate()

Function to create a ListBox.

A3DPDFPageInsertListBox()

Function to insert a ListBox in a page.

A3DPDFDropDownListCreate()

Function to create a DropDownList (combo box)

A3DPDFPageInsertDropDownList()

Function to insert a DropDownList (combo box) in a page.

A3DPDFDefineViewCarousel()

Function to create a ‘standard’ view carousel and position it in the PDF document.

A3DPDF3DViewCarouselCreate()

Function to create a view carousel widget.

A3DPDFPageInsert3DViewCarousel()

Function to insert a view carousel widget in a page.

A3DPDFDefineSlideTable()

Function to create a slide table. This is a table with a fixed size, and two buttons to scroll the rows of the table.

A3DPDFDefineSlideTable2()

Function to create a slide table. This is a table with a fixed size, and a scroll bar to scroll the rows of the table.

A3DPDFSlideTableLinkTo3DNodes()

Function to link 3D nodes to a slide table.

A3DPDFScrollTableCreate()

Function to create a ScrollTable widget.

A3DPDFPageInsertScrollTable()

Function to insert a ScrollTable widget in a page.

A3DPDFDataTableCreate()

Function to create a DataTable.

A3DPDFDataTable3DViewsCreate()

Function to create a table for 3D views.

A3DPDFObjectDataTableCreate()

Function to create a Object DataTable.

A3DPDFDataTableSetInitIndex()

Function to set the property iInitIndex on DataTable object.

A3DPDFDataRelationshipCreate()

Function to create a Relationship object.

A3DPDFPageGetDataFilterFromDropDownListField()

Function to get a widget filter object from an existing drop down field.

A3DPDF3DAnnotGet3DNodeScene()

Function to get a widget object for the list of 3D nodes from an existing 3D annot.

A3DPDF3DAnnotGet3DViewList()

Function to get a widget object for the list of 3D views from an existing 3D annot list views UI.

A3DPDFTextFieldBindToTable()

Function to bind a widget text field to a table.

A3DPDFScrollTableBindToTable()

Function to bind a widget scroll table to a table.

A3DPDFListBoxBindToTable()

Function to bind a widget list box to a table.

A3DPDFDropDownListBindToTable()

Function to bind a widget dropdown list to a table.

A3DPDF3DNodeSceneBindToTable()

Function to bind a widget object for the list of 3D nodes, to a table.

A3DPDF3DViewListBindToTable()

Function to bind a widget object for the list of 3D views, to a table.

A3DPDF3DViewCarouselBindToTable()

Function to bind a widget view carousel to a table.

A3DPDFDataFilterWidgetBindToTable()

Function to bind a filter widget to a table.

A3DPDFButtonBindToTable()

Function to bind a widget button to a table.

A3DPDFWidgetSetTargetBehaviour()

Function to define an interaction between two widgets.

A3DPDF3DAnnotActivatePMICrossHighlightAndSelect()

Function to activate the PMI cross highlight and select behaviour. With this, some JavaScript code is generated so that when the user clicks on a markup, the associated surface is highlighted, and then the solid node containing the surface is selected. Only works with Acrobat 11 and later. Warning: If this behaviour is activated, when the node is selected, the PMI originally selected is unselected. If datamodel connection is linked to a PMI node, the connection will be resetted as if the PMI node is unselected.

A3DPDF3DViewListEnableViewTransitions()

Function to define if the transition between views must be animated or not. This is applicable to widgets implied with datamodel, and only with activation by datamodel. Implied widgets are A3DPDF3DViewList, and A3DPDF3DViewCarousel as the carousel widget must be in relationship with the view list widget to perform the view activation.

A3DPDFCheckBoxSetForFitSelectedMode()

This function makes the check box field be the selector for the ‘fitselected’ mode of the annot 3D. If the user checks the check box, the ‘fitselected’ mode is on ; else it is off.

A3DPDFCheckBoxSetForCheckAllColumn()

This function associates the specified CheckBox with a Scroll Table column of type kA3DPDFCheckBoxContent , in order to create a ‘check/uncheck all’ CheckBox.

A3DPDFDocumentUpdateData()

Function to automatically update Publish data into a document generated by Tetra 4D Enrich.

A3DPDFLayerCreate()

Creates a layer in a document.

A3DPDFLayerGet()

Populates the A3DPDFLayerData structure with data from an A3DPDFLayer entity.

A3DPDFDocumentGetNumberLayers()

Function to get the number of layers in the document.

A3DPDFDocumentGetLayer()

Get a layer object by its index in the document.

A3DPDFDocumentGetLayerByName()

Get a layer object by its name in the document.

A3DPDFDocumentSetLayersRBGroup()

Define a “radio button” behaviour for a group of layers. That is, the state of at most one layer in the group can be activated at a time.

A3DPDFFieldSetLayer()

Adds a field into a layer.

A3DPDFImageSetLayer()

Adds an image into a layer.

A3DPDFPageInsertTableAndSetLayer()

Function to insert a table in a page within a layer.

A3DPDFPageInsertTextAndSetLayer()

Function to insert a text line in a page within a layer. Warning: This function must be used instead of A3DPDFPageInsertText if the text is to be placed in a layer.

A3DPDFPageInsertScrollTableAndSetLayer()

Function to insert a ScrollTable widget in a page.

A3DPDFGetStreams()

Function to retrieve all 3D streams embedded in a PDF document, this function export native and PDF views (defined using Acrobat and not in the origin native CAD file). It also manages secured PDF.

Functions

A3DStatus A3DPDFPageFieldListAddItem(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DUTF8Char *pcItemValue, const A3DUTF8Char *pcItemExportValue)

Function to add an item to a form field of type list.

Version

4.3

Parameters
  • pPage[inout] The Page object to work with.

  • pcFieldName[in] The name of the form field. Only Acroform fields are supported.

  • pcItemValue[in] The item string which will be visible to the user in the list field.

  • pcItemExportValue[in] The export value for the item. This value acts as a ‘symbolic value’ for the item.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentAddJavascriptFromString(A3DPDFDocument *pDoc, const A3DUTF8Char *pcScriptName, const A3DUTF8Char *pcJavascriptString)

Adds JavaScript to a document. This JavaScript is launched when the file is opened.

Version

4.3

Parameters
  • pDoc[inout] The Document object to work with.

  • pcScriptName[in] The name of the script. It is not used by Acrobat but needs to be unique.

  • pcJavascriptString[in] The string which contains the JavaScript.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageFieldSetActionJavascriptFromString(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DUTF8Char *pcJavascriptString)

Function to attach JavaScript to a form field. The JavaScript is defined as a string.

The goal of this function is to define a JavaScript action to be launched on an event. The action event is different depending on the type of the field. For fields of type:

  • dropdown list: the action is the selection of a list item.

  • listbox list: the action is the selection of a list item.

  • button: the action is the button pushed.

Version

4.1

Parameters
  • pPage[inout] The Page object to work with.

  • pcFieldName[in] The name of the form field. Only Acroform fields are supported.

  • pcJavascriptString[in] The string which contains the JavaScript.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageFieldSetActionJavascript(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char *pcJavascriptString)

Function to attach JavaScript to a form field. The JavaScript is defined as a string.

The goal of this function is to define a JavaScript action to be launched on an event. The action event is different depending on the type of the field. For fields of type:

  • dropdown list: the action is the selection of a list item.

  • listbox list: the action is the selection of a list item.

  • button: the action is the button pushed.

Version

9.0

Parameters
  • pPage[inout] The Page object to work with.

  • pcFieldName[in] The name of the form field. Only Acroform fields are supported.

  • eEventActionType[in] The action type. Only kA3DPDFEventPageOpened and kA3DPDFEventPageClosed are relevant at page level.

  • pcJavascriptString[in] The string which contains the JavaScript.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentSetActionJavascript(A3DPDFDocument *pDoc, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char *pcJavascriptString)

Function to define a javaScript action to an event triggered on the document. The JavaScript is defined as a string.

The goal of this function is to define a JavaScript action to be launched on an event triggered on the document level.

Version

9.0

Parameters
Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageSetActionJavascript(A3DPDFPage *pPage, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char *pcJavascriptString)

Function to define a javaScript action to an event triggered on the page. The JavaScript is defined as a string.

The goal of this function is to define a JavaScript action to be launched on an event triggered on the page level.

Version

9.0

Parameters
  • pPage[in] The Page object to work with.

  • eEventActionType[in] The action type. Only kA3DPDFEventPageOpened and kA3DPDFEventPageClosed are relevant at page level.

  • pcJavascriptString[in] The string which contains the JavaScript.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DAnnotSetActionJavascript(A3DPDFPage *pPage, A3DPDF3DAnnot *p3DAnnot, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char *pcJavascriptString)

Function to define a javaScript action to an event triggered on an annotation. The JavaScript is defined as a string.

The goal of this function is to define a JavaScript action to be launched on an event triggered on an annotation.

Version

9.0

Parameters
  • pPage[in] The Page object to work with.

  • p3DAnnot[in] The 3D annot object to work with.

  • eEventActionType[in] The action type.

  • pcJavascriptString[in] The string which contains the JavaScript.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentAddImageAsIcon(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)

Function to store an image in the document in a way it can be used as an icon for interactive widgets.

Deprecated:

This function is deprecated. Please use A3DPDFDocumentAddImageAsIcon2 instead.

Stored in that way, the image can be dynamically retrieved by the Acrobat JavaScript document function ‘getIcon’. For example, if the function is called with A3DPDFDocumentAddImageAsIcon(pimage, “myicon”), then the following JavaScript code might be used on the document to dynamically set the icon on a button : var but = this.getField("buttonfieldtopopulate"); var icon = this.getIcon("myicon"); but.buttonSetIcon(icon);

Version

6.1

Parameters
  • pDoc[inout] The Document object to work with.

  • pcIconName[in] The icon name that will be used to identify the image.

  • pImage[in] The image.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentAddImageAsIcon2(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcInIconId, A3DUTF8Char **ppcOutIconId)

Function to store an image in the document in a way it can be used as an icon for interactive widgets.

Stored in that way, the image can be dynamically retrieved by the Acrobat JavaScript document function ‘getIcon’. For example, if the function is called with A3DPDFDocumentAddImageAsIcon2(pimage, “myicon”,NULL), then the following JavaScript code might be used on the document to dynamically set the icon on a button : var but = this.getField("buttonfieldtopopulate"); var icon = this.getIcon("myicon"); but.buttonSetIcon(icon);

Also, the icon can be used in widgets automatically handled with data model. For this, the icon must be stored in the document with A3DPDFDocumentAddImageAsIcon2, and the icon id must be used into data table.

When A3DPDFDocumentAddImageAsIcon2 returns A3D_SUCCESS, ppcOutIconId can be freed by calling A3DPDFDocumentAddImageAsIcon2 with pImage & pDoc set to nullptr

Memory Management

Version

10.2

Parameters
  • pDoc[inout] The Document object to work with.

  • pImage[in] The image to store as icon in the Document.

  • pcInIconId[in] The icon identifier. If provided, this is the internal id used into PDF document to name the icon. Warning, the name should be unique into the document! If NULL is specified, a unique id is automatically generated. The unique id is returned in ppcOutIconId argument.

  • ppcOutIconId[out] The identifier as a string. NULL is accepted if this info is not useful.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFGetBOMInfo(A3DAsmModelFile *pModelFile, A3DRWParamsPrcWriteHelper *pPrcWriteHelper, A3DBool bHierarchical, A3DInt32 *piNbElements, A3DPDFBomElementInfoData **ppBomElementInfo, A3DPDF3DNodesReferencesData **pp3DNodesReferences)

Function to automatically compute a bill of material (BOM) from a modelfile.

The function returns an array of elements in the BOM. Each element is the set of components in the assembly associated with the part.

Version

8.1

Parameters
  • pModelFile[in] The model file to work with.

  • pPrcWriteHelper[in] Used to get PRC data such as unique identifiers for PRC nodes.

  • bHierarchical[in] True if the BOM is hierarchical, false if it is flattened.

  • piNbElements[out] The number of elements in the BOM. In a bom table, it would be the number of lines.

  • ppBomElementInfo[out] Array of details of the elements in the BOM.

  • pp3DNodesReferences[out] Array of details of the node references for elements in the BOM.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFFreeBOMInfo(A3DInt32 iNbElements, A3DPDFBomElementInfoData **ppBomElementInfo, A3DPDF3DNodesReferencesData **pp3DNodesReferences)

Function to free the memory allocated for the information of the BOM.

Version

8.1

Parameters
  • iNbElements[in] The number of elements to free.

  • ppBomElementInfo[inout] Array of details of the elements in the BOM.

  • pp3DNodesReferences[inout] Array of details of the node references for elements in the BOM.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFGetModelFileNodes(A3DAsmModelFile *pModelFile, A3DRWParamsPrcWriteHelper *pPrcWriteHelper, A3DPDFModelFileNodesData **ppModelFileNodesInfo)

Function to get information on PDF nodes computed from a modelfile.

Version

10.0

Parameters
  • pModelFile[in] The model file to work with.

  • pPrcWriteHelper[in] Used to get PRC data such as unique identifiers for PRC nodes.

  • ppModelFileNodesInfo[out] a struct that contains all infos about model file nodes.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFCheckBoxCreate(A3DPDFDocument *pDoc, const A3DPDFCheckBoxData *pCheckBoxData, A3DPDFCheckBox **ppCheckBox)

Function to create a CheckBox.

The CheckBox is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertCheckBox.

Version

8.0

Parameters
  • pDoc[inout] The Document object to work with.

  • pCheckBoxData[in] The CheckBox parameters. The name is mandatory.

  • ppCheckBox[out] The CheckBox created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertCheckBox(A3DPDFPage *pPage, A3DPDFCheckBox *pCheckBox, const A3DPDFRectData *pRectData)

Function to insert a CheckBox in a page.

Version

8.0

Parameters
  • pPage[inout] The Page object to work with.

  • pCheckBox[in] The CheckBox object to insert on the page.

  • pRectData[in] The rectangle to specify the position on the page.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFRadioButtonCreate(A3DPDFDocument *pDoc, const A3DPDFRadioButtonData *pRadioButtonData, A3DPDFRadioButton **ppRadioButton)

Function to create a RadioButton.

The RadioButton is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertRadioButton.

Version

8.0

Parameters
  • pDoc[inout] The Document object to work with.

  • pRadioButtonData[in] The RadioButton parameters. The name is mandatory.

  • ppRadioButton[out] The RadioButton created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertRadioButton(A3DPDFPage *pPage, A3DPDFRadioButton *pRadioButton, const A3DPDFRectData *pRectData)

Function to insert a RadioButton in a page.

Version

8.0

Parameters
  • pPage[inout] The Page object to work with.

  • pRadioButton[in] The RadioButton object to insert on the page.

  • pRectData[in] The rectangle to specify the position on the page.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFListBoxCreate(A3DPDFDocument *pDoc, const A3DPDFListBoxData *pListBoxData, A3DPDFListBox **ppListBox)

Function to create a ListBox.

The ListBox is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertListBox. List items can be added using the function A3DPDFPageFieldListAddItem, after the call to A3DPDFPageInsertListBox.

Version

8.0

Parameters
  • pDoc[inout] The Document object to work with.

  • pListBoxData[in] The ListBox parameters. The name is mandatory.

  • ppListBox[out] The ListBox created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertListBox(A3DPDFPage *pPage, A3DPDFListBox *pListBox, const A3DPDFRectData *pRectData)

Function to insert a ListBox in a page.

Version

8.0

Parameters
  • pPage[inout] The Page object to work with.

  • pListBox[in] The ListBox object to insert on the page.

  • pRectData[in] The rectangle to specify the position on the page.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDropDownListCreate(A3DPDFDocument *pDoc, const A3DPDFDropDownListData *pDropDownListData, A3DPDFDropDownList **ppDropDownList)

Function to create a DropDownList (combo box)

The DropDownList is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertDropDownList. List items can be added using the function A3DPDFPageFieldListAddItem, after the call to A3DPDFPageInsertDropDownList.

Version

8.0

Parameters
  • pDoc[inout] The Document object to work with.

  • pDropDownListData[in] The DropDownList parameters. The name is mandatory.

  • ppDropDownList[out] The DropDownList created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertDropDownList(A3DPDFPage *pPage, A3DPDFDropDownList *pDropDownList, const A3DPDFRectData *pRectData)

Function to insert a DropDownList (combo box) in a page.

Version

8.0

Parameters
  • pPage[inout] The Page object to work with.

  • pDropDownList[in] The DropDownList object to insert on the page.

  • pRectData[in] The rectangle to specify the position on the page.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDefineViewCarousel(A3DPDFDocument *pDoc, A3DPDFPage *pPage, A3DPDF3DAnnot *pAnnot, A3DAsmModelFile *pModelFile, A3DInt32 iNbButtons, A3DUTF8Char **ppButtonsNames, A3DUTF8Char *pPreviousButtonName, A3DUTF8Char *pNextButtonName, A3DInt32 iNbViews, A3DPDFView **ppViews, A3DPDFImage **ppImages, A3DInt32 iScrollStep)

Function to create a ‘standard’ view carousel and position it in the PDF document.

Deprecated:

This function is deprecated. Please use the A3DPDF3DViewCarousel widget and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

The PDF document must contain the buttons for the views and the buttons to go to the next and the previous view.

HOOPS Publish uses the graphics driver of the user’s PC. By default, HOOPS Publish attempts to select the graphics driver in this order: DX11->DX9->OpenGL2->OpenGL. To override the default driver selection, set the A3DPOSTERDRV environment variable to one of the following values: DX11, DX9, OGL2, OGL1

If not NULL, ppImages must contain the images that will be used for the views. In that case, the size of the array should be the same as the size of ppViews parameter.

Version

8.0

Parameters
  • pDoc[inout] The document which will contain the carousel.

  • pPage[in] The page where the carousel will be put.

  • pAnnot[in] The annotation which contains the views of the carousel.

  • pModelFile[in] The model file corresponding with the annotation.

  • iNbButtons[in] The number of buttons in the ppButtonsNames array.

  • ppButtonsNames[in] The names of the view buttons in the pdf file. The size of this array should be iNbButtonsRows*iNbButtonsCols.

  • pPreviousButtonName[in] The name of the button to press to scroll the carousel to previous views.

  • pNextButtonName[in] The name of the button to press to scroll the carousel to next views.

  • iNbViews[in] If equal to 0, all the views of the model file will be used, in the order they are found in the model file. If superior than 0, the number of the views of the next parameter.

  • ppViews[in] If NULL, all the views of the model file will be used. If not NULL, ppViews must contain the views that will be used for the carousel.

  • ppImages[in] If NULL, the images are automatically created from the views and the following applies:

  • iScrollStep[in] This is the number of buttons icons scrolled. If = iNbButtons, the carousel scrolls the icons by page (all the icons are replaced in the carousel). If = the number of rows, the icons are scrolled by rows. If = the number of columns, the icons are scrolled by columns. If = 1, the carousel scrolls the icons one by one (all the icons are shifted of 1 increment in the carousel).

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DViewCarouselCreate(A3DPDFDocument *pDoc, const A3DPDF3DViewCarouselData *p3DViewCarouselData, A3DPDF3DViewCarousel **pp3DViewCarousel)

Function to create a view carousel widget.

The view carousel widget is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsert3DViewCarousel. Ultimately, the widget should be linked to a data table with A3DPDF3DViewCarouselBindToTable.

Version

10.0

Parameters
  • pDoc[inout] The Document object to work with.

  • p3DViewCarouselData[in] The view carousel parameters. The name is mandatory.

  • pp3DViewCarousel[out] The view carousel created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsert3DViewCarousel(A3DPDFPage *pPage, A3DPDF3DViewCarousel *pCarousel)

Function to insert a view carousel widget in a page.

The page must be the same as the page of the underlying buttons.

Version

10.0

Parameters
  • pPage[inout] The Page object to work with.

  • pCarousel[in] The button object to insert on the page.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDefineSlideTable(A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, const A3DUTF8Char *pcHtmlFrameTable, const A3DUTF8Char *pcHtmlFrameStyle, const A3DUTF8Char *pPreviousButtonName, const A3DUTF8Char *pNextButtonName, const A3DInt32 iNbTextRows, const A3DInt32 iNbTextCols, const A3DPDFTextField *const *const *ppTexts, const A3DBool bHasHeader)

Function to create a slide table. This is a table with a fixed size, and two buttons to scroll the rows of the table.

Deprecated:

This function is deprecated. Please use the A3DPDFScrollTable widget and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row.

Please note that the table implementation uses an add-on to HOOPS Publish (TableToPDF) which is provided for free by Tech Soft 3D. The add-on is using components that are licensed under GNU LGPL terms. Consequently, the usage of tables using HOOPS Publish add-on requires our customer’s application to comply with LGPL requirements. TableToPDF can be downloaded at http://developer.techsoft3d.com/add-ons/tabletopdf/ The deployment process is simple and just requires to copy the provided DLLs in HOOPS Publish binaries folder.

The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format.

Version

7.2

Parameters
  • pDoc[inout] The document which will contain the slide table.

  • pPage[inout] The page where the slide table will be put.

  • iPosLeft[in] The x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pcHtmlFrameTable[in] String for definition of the frame table in a HTML format. See example definition in Table Module.

  • pcHtmlFrameStyle[in] String for definition of the frame table style in a CSS format. See example definition in Table Module.

  • pPreviousButtonName[in] The name of the button to press to go to the previous page.

  • pNextButtonName[in] The name of the button to press to go to the next page.

  • iNbTextRows[in] the number of rows in the matrix of text data specified in ppTextData.

  • iNbTextCols[in] the number of columns in the matrix of text data specified in ppTextData. It should be the same number as of the number of columns specified in the table frame.

  • ppTexts[in] must contain the text data that will be used to dynamically populate the table. It is a matrix of iNbTextRows*iNbTextCols elements of type (A3DPDFTextField*). These elements should be created with A3DPDFTextFieldCreate. The first row might contain the header for the table. In that case, specify bHasHeader to TRUE, then the first row will not be scrolled and the formatting specific to this row will be applied. The following members of A3DPDFTextFieldData structure are used:

    • the text content is specified in member m_pcDefaultValue

    • the font name is specified in member m_pcFontName

    • the font size is specified in member m_iFontSize

    • the text color is specified in member m_sTextColor

    • the background color is specified in member m_sFillColor if member m_bHasFillColor is TRUE

    • the text alignment is specified in member m_eTextAlignment

    • the text orientation is specified in member m_eTextOrientation

    • the readonly attribute is specified in member m_bReadOnly

    • the multiline attribute is specified in member m_bMultiLine

    • the donotscroll attribute is specified in member m_bDoNotScroll

    • the formfield attribute is specified in member m_eFormField

    Only first row is used to get attributes.

  • bHasHeader[in] If true, the table header is described at first row of ppTexts. This row will remain visible and won’t be scrolled when pushing the prev/next buttons. If false, the table is considered without header, then the whole rows will be scrolled when pushing the prev/next buttons.

Return values
  • A3D_SUCCESS

  • A3DPDF_SLIDETABLE_NBCOLUMNS_ERROR – if iNbTextCols differs from the number of columns in table frame.

  • A3DPDF_SLIDETABLE_TEXTDATA_ERROR – if ppTexts has wrong data (typically null pointer).

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDefineSlideTable2(A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, const A3DUTF8Char *pcHtmlFrameTable, const A3DUTF8Char *pcHtmlFrameStyle, const A3DInt32 iSliderWidth, const A3DInt32 iNbTextRows, const A3DInt32 iNbTextCols, const A3DPDFTextField *const *const *ppTexts, const A3DBool bHasHeader, A3DUTF8Char **ppcSTName)

Function to create a slide table. This is a table with a fixed size, and a scroll bar to scroll the rows of the table.

Deprecated:

This function is deprecated. Please use the A3DPDFScrollTable widget and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

This function differs from A3DPDFDefineSlideTable in that it uses a scroll bar to scroll the rows instead of previous and next buttons. The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row.

Please note that the table implementation uses an add-on to HOOPS Publish (TableToPDF) which is provided for free by Tech Soft 3D. The add-on is using components that are licensed under GNU LGPL terms. Consequently, the usage of tables using HOOPS Publish add-on requires our customer’s application to comply with LGPL requirements. TableToPDF can be downloaded at http://developer.techsoft3d.com/add-ons/tabletopdf/ The deployment process is simple and just requires to copy the provided DLLs in HOOPS Publish binaries folder.

The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format.

Version

8.1

Parameters
  • pDoc[inout] The document which will contain the slide table.

  • pPage[inout] The page where the slide table will be put.

  • iPosLeft[in] The x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pcHtmlFrameTable[in] String for definition of the frame table in a HTML format. See example definition in Table Module.

  • pcHtmlFrameStyle[in] String for definition of the frame table style in a CSS format. See example definition in Table Module.

  • iSliderWidth[in] The width of the scroll bar (in points). Important: The scrollbar is positioned on the right of the table, outside of the frame.

  • iNbTextRows[in] the number of rows in the matrix of text data specified in ppTextData.

  • iNbTextCols[in] the number of columns in the matrix of text data specified in ppTextData. It should be the same number as of the number of columns specified in the table frame.

  • ppTexts[in] must contain the text data that will be used to dynamically populate the table. It is a matrix of iNbTextRows*iNbTextCols elements of type (A3DPDFTextField*). These elements should be created with A3DPDFTextFieldCreate. The first row might contain the header for the table. In that case, specify bHasHeader to TRUE, then the first row will not be scrolled and the formatting specific to this row will be applied. The following members of A3DPDFTextFieldData structure are used:

    • the text content is specified in member m_pcDefaultValue

    • the font name is specified in member m_pcFontName

    • the font size is specified in member m_iFontSize

    • the text color is specified in member m_sTextColor

    • the background color is specified in member m_sFillColor if member m_bHasFillColor is TRUE

    • the text alignment is specified in member m_eTextAlignment

    • the text orientation is specified in member m_eTextOrientation

    • the readonly attribute is specified in member m_bReadOnly

    • the multiline attribute is specified in member m_bMultiLine

    • the donotscroll attribute is specified in member m_bDoNotScroll

    • the formfield attribute is specified in member m_eFormField

    Only first row is used to get attributes.

  • bHasHeader[in] If true, the table header is described at first row of ppTexts. This row will remain visible and won’t be scrolled when using the scroll bar. If false, the table is considered without header, then the whole rows will be scrolled when using the scroll bar.

  • ppcSTName[out] The identifier of the slide table as a string. It can be useful to add Javascript instructions to work on this specific slide table.

Return values
  • A3D_SUCCESS

  • A3DPDF_SLIDETABLE_NBCOLUMNS_ERROR – if iNbTextCols differs from the number of columns in table frame.

  • A3DPDF_SLIDETABLE_TEXTDATA_ERROR – if ppTexts has wrong data (typically null pointer).

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFSlideTableLinkTo3DNodes(A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DUTF8Char *pcSTName, const A3DPDF3DAnnot *p3DAnnot, const A3DPDFRgbColorData sHighlightRowColor, const A3DInt32 iNbRows, const A3DPDF3DNodesReferencesData *const p3DNodesReferences)

Function to link 3D nodes to a slide table.

Deprecated:

This function is deprecated. Please use the A3DPDFScrollTable and A3DPDF3DNodeScene widgets and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

Each row of the slide table are linked to a set of 3D nodes. Thus, when the user clicks on a row, the 3D nodes are automatically highlighted; and vice versa: when a 3D node is clicked in the 3D, the row is automatically selected.

Version

9.1

Parameters
  • pDoc[inout] The document which contains the slide table

  • pPage[inout] The page where the slide table is

  • pcSTName[in] The identifier of the slide table as a string

  • p3DAnnot[in] The 3D annotation

  • sHighlightRowColor[in] The color for the highlighted row

  • iNbRows[in] The size of the following array

  • p3DNodesReferences[in] The set of nodes for each row

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFScrollTableCreate(A3DPDFDocument *pDoc, const A3DPDFScrollTableData *pScrollTableData, A3DPDFScrollTable **ppScrollTable)

Function to create a ScrollTable widget.

The ScrollTable is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertScrollTable. Ultimately, the widget should be linked to a data table with A3DPDFScrollTableBindToTable.

Version

10.0

Parameters
  • pDoc[inout] The Document object to work with.

  • pScrollTableData[in] The ScrollTable parameters. The name is mandatory.

  • ppScrollTable[out] The ScrollTable created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertScrollTable(A3DPDFPage *pPage, A3DPDFScrollTable *pScrollTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop)

Function to insert a ScrollTable widget in a page.

Version

10.0

Parameters
  • pPage[inout] The Page object to work with.

  • pScrollTable[in] The ScrollTable object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

Return values
  • A3D_SUCCESS

  • A3DPDF_CANNOT_INITIALIZE_RESOURCES – if the resources directory is not properly defined.

  • A3DPDF_CANNOT_LOAD_TABLETOPDF_DLL – if the tabletopdf dll cannot be loaded.

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDataTableCreate(A3DPDFDocument *pDoc, const A3DPDFDataTableData *pDataTableData, A3DPDFDataTable **ppDataTable)

Function to create a DataTable.

Version

10.0

Parameters
  • pDoc[in] The Document object to work with.

  • pDataTableData[in] The DataTable parameters.

  • ppDataTable[out] The DataTable object created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDataTable3DViewsCreate(A3DPDFDocument *pDoc, A3DPDF3DArtwork *p3DArtwork, A3DAsmModelFile *pModelFile, const int iModeFlags, const A3DPDFTable3DViewsData *pTable3DViewsData, A3DPDFDataTable3DViews **ppDataTable)

Function to create a table for 3D views.

The table generated is derived from the list obtained with A3DPDF3DArtworkGetViews: it has the same size, and each row has the following columns:

  • column 0 is for the index in 3D annot internal views (internally assigned).

  • column 1 is the internal name of the view (internally assigned).

  • column 2 is the label of the view to be displayed in carousel buttons (assigned using A3DPDFTable3DViewsData.m_ppcViewLabels parameter).

  • column 3 is the icon name for the view (internally assigned from icons generation for carousel and A3DPDFTable3DViewsData.m_ppImages parameter)

  • additional columns are defined in pTable3DViewsData in m_pDataTableData member.

Important: If iModeFlags is set to kA3DPDFTableFor3DViewsComputePosters, the following applies: HOOPS Publish uses the graphics driver of the user’s PC. By default, HOOPS Publish attempts to select the graphics driver in this order: DX11->DX9->OpenGL2->OpenGL. To override the default driver selection, set the A3DPOSTERDRV environment variable to one of the following values: DX11, DX9, OGL2, OGL1

Version

10.0

Parameters
  • pDoc[in] The Document object to work with.

  • p3DArtwork[in] Artwork object, used to get view definitions to compute posters.

  • pModelFile[in] Used to compute posters - must be the modelfile as stored into p3DArtwork.

  • iModeFlags[in] indicate how views are specified. see Field to indicate the options for creating table for 3D views.. For information about graphics driver selection for poster generation, please the details section above.

  • pTable3DViewsData[in] This allows specification of custom data in addition to internal data. Only used if kA3DPDFTableFor3DViewsCustom is specified in iModeFlags.

  • ppDataTable[out] The DataTable3DViews object created.

Return values
  • A3D_SUCCESS

  • A3DPDF_INVALID_VIEW_INDEX – if an index specified in pTable3DViewsData.m_piViewIndexes is out of view array defined in p3DArtwork

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFObjectDataTableCreate(A3DPDFDocument *pDoc, const A3DPDFDataTableData *pDataTableData, A3DPDFObjectDataTable **ppDataTable)

Function to create a Object DataTable.

An Ojbect DataTable is a specific data table that contain objects instead of just text. An Object define a set of properties and related values ; it is formatted as follows : { property1: valueproperty1, property2: valueproperty2, … }

Supported properties are:

  • caption : the text of the field

  • icon : the icon id to store on the field when the field is defined as image holder (button)

  • actionurl : an url to be launched when the user clicks on the cell

  • actionjs : a javascript code to be launched when the user clicks on the cell

  • actionjscallback : the name of a javascript function stored on the document. This callback function is called when the user clicks on the cell, with the arguments : tablerowindex, tablecolindex, userdata (see actionjscallbackdata)

  • actionjscallbackdata : the third argument provided to the callback function actionjscallback

Properties actionurl, actionjs, or actionjscallback can be used to define an action on a table cell. If an action is defined on a cell: when the user clicks on the cell, the row selected is unhighlighted and the action is launched. If no action is defined on the cell: when the user clicks on the cell, the row selected is highlighted and the datamodel action linked to the row is launched (typically invoking other widgets on the page bound on linked tables).

Version

11.2

Parameters
  • pDoc[in] The Document object to work with.

  • pDataTableData[in] The DataTable parameters.

  • ppDataTable[out] The DataTable object created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDataTableSetInitIndex(A3DPDFDataTable *pDataTable, A3DInt32 iInitIndex)

Function to set the property iInitIndex on DataTable object.

By default, a -1 value is defined. If it is defined here, the table row at index iInitIndex is ‘selected’ at init time (when the document is opened), or when the table is reset. A table is typically reset when a bound widget is unselected. A widget bound to this table have to be defined with a NULL source and kA3DPDFDataSelect behaviour to be automatically selected at init time (see A3DPDFWidgetSetTargetBehaviour).

Version

10.0

Parameters
  • pDataTable[in] The DataTable object.

  • iInitIndex[in] The index to set.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDataRelationshipCreate(A3DPDFDocument *pDoc, const A3DPDFDataRelationshipData *pRelationshipData)

Function to create a Relationship object.

Version

10.0

Parameters
  • pDoc[in] The Document object to work with.

  • pRelationshipData[in] The Relationship parameters.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageGetDataFilterFromDropDownListField(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldId, A3DPDFDataFilter **ppDataFilter)

Function to get a widget filter object from an existing drop down field.

Filter widgets are specific. A filter widget enables the user to apply a filter to a table related to the table bound to this widget. Hence, the table bound to the filter widget should have a relationship with another table on which apply the filter. Each entry of the filter widget isolate a set fo data onto the related table. There’s a specific entry which might be defined as first row to disable all filtering (hence, displaying all data).

Version

10.0

Parameters
  • pPage[in] The Page object on which is the field.

  • pcFieldId[in] Unique name for the drop down field.

  • ppDataFilter[out] The A3DPDFDataFilter object created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DAnnotGet3DNodeScene(A3DPDF3DAnnot *p3DAnnot, A3DPDF3DNodeScene **pp3DAnnotUIListNodes)

Function to get a widget object for the list of 3D nodes from an existing 3D annot.

Version

10.0

Parameters
  • p3DAnnot[in] The Annot 3D previously created with A3DPDF3DAnnotCreate.

  • pp3DAnnotUIListNodes[out] The widget object created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DAnnotGet3DViewList(A3DPDF3DAnnot *p3DAnnot, A3DPDF3DViewList **pp3DAnnotUIListViews)

Function to get a widget object for the list of 3D views from an existing 3D annot list views UI.

Version

10.0

Parameters
  • p3DAnnot[in] The Annot 3D previously created with A3DPDF3DAnnotCreate.

  • pp3DAnnotUIListViews[out] The widget object created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFTextFieldBindToTable(A3DPDFTextField *pTextField, A3DPDFDataTable *pDataTable, const A3DInt32 iMappedColumn)

Function to bind a widget text field to a table.

Version

10.0

Parameters
  • pTextField[in] The Widget text field to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iMappedColumn[in] index (starting from 0) of column mapped to this widget.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFScrollTableBindToTable(A3DPDFScrollTable *pScrollTable, A3DPDFDataTable *pDataTable, const A3DInt32 iSizeMap, const A3DInt32 *piMapColumns)

Function to bind a widget scroll table to a table.

Version

10.0

Parameters
  • pScrollTable[in] The scroll table object to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iSizeMap[in] Size of the following array.

  • piMapColumns[in] Array of indexes (starting from 0) of column mapped to this widget.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFListBoxBindToTable(A3DPDFListBox *pListBox, A3DPDFDataTable *pDataTable, const A3DInt32 iMappedColumn)

Function to bind a widget list box to a table.

Version

10.0

Parameters
  • pListBox[in] The widget list box to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iMappedColumn[in] index (starting from 0) of column mapped to this widget.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDropDownListBindToTable(A3DPDFDropDownList *pDropDownList, A3DPDFDataTable *pDataTable, const A3DInt32 iMappedColumn)

Function to bind a widget dropdown list to a table.

Version

10.0

Parameters
  • pDropDownList[in] The widget dropdown list to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iMappedColumn[in] index (starting from 0) of column mapped to this widget.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DNodeSceneBindToTable(A3DPDF3DNodeScene *p3DAnnotUIListNodes, A3DPDFDataTable *pDataTable, const A3DInt32 iMappedColumn)

Function to bind a widget object for the list of 3D nodes, to a table.

Version

10.0

Parameters
  • p3DAnnotUIListNodes[in] The Widget object to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iMappedColumn[in] index (starting from 0) of column mapped to this widget.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DViewListBindToTable(A3DPDF3DViewList *p3DAnnotUIListViews, A3DPDFDataTable3DViews *pDataTable)

Function to bind a widget object for the list of 3D views, to a table.

Version

10.0

Parameters
  • p3DAnnotUIListViews[in] The Widget object to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DViewCarouselBindToTable(A3DPDF3DViewCarousel *p3DViewCarousel, A3DPDFDataTable3DViews *pDataTable)

Function to bind a widget view carousel to a table.

Version

10.0

Parameters
  • p3DViewCarousel[in] The view carousel object to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDataFilterWidgetBindToTable(A3DPDFDataFilter *pDataFilter, A3DPDFDataTable *pDataTable, const A3DInt32 iSizeMap, const A3DInt32 *piMapColumns, const A3DUTF8Char *pcValueNoFilterApplied)

Function to bind a filter widget to a table.

Version

10.0

Parameters
  • pDataFilter[in] The filter widget object to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iSizeMap[in] Size of the following array

  • piMapColumns[in] Array of indexes (starting from 0) of column mapped to this widget.

  • pcValueNoFilterApplied[in] If the filter widget is a drop down list, pcNoFilterApplied is the value to add as first row of the widget. If pcValueNoFilterApplied is specified, selecting the first row of the widget disables the filters. If pcValueNoFilterApplied is not specified, a filter is always applied (there is no ‘nofilter’ state ; default is first row).

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFButtonBindToTable(A3DPDFButton *pButton, A3DPDFDataTable *pDataTable, const A3DInt32 iSizeMap, const A3DInt32 *piMapColumns)

Function to bind a widget button to a table.

The button can be bound to two columns types: index 0 is for the icon id for button. index 1 is optional and is for the label of the button.

Version

10.2

Parameters
  • pButton[in] The Widget text field to bind to a table.

  • pDataTable[in] The Data Table object to bind the widget to.

  • iSizeMap[in] Size of the following array.

  • piMapColumns[in] Array of indexes (starting from 0) of column mapped to this widget.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFWidgetSetTargetBehaviour(A3DPDFWidget *pWidgetSource, A3DPDFWidget *pWidgetTarget, A3DPDFEWidgetTargetBehaviour eBehaviourOnTarget)

Function to define an interaction between two widgets.

An interaction acts as follows: if the user clicks on the widget source, then a table joint is calculated using the relationship between the table associated from pWidgetSource to the table associated to pWidgetTarget. The result of the joint is a set of indexes in the table related to pWidgetTarget. The widget target is ultimately filled from this result set, depending on the eBehaviourOnTarget value:

  • kA3DPDFDataIsolate: only the rows in result set are displayed in the widget.

  • kA3DPDFDataHighlight: the widget displays all the rows from its binded table, but only the rows in result set are highlighted.

  • kA3DPDFDataSelect: for this, the result set must contain only one value. Then in this case, the target widget acts as if the user selected the row indexed by this value.

  • kA3DPDFDataIsolateAndSelect: the widget is populated as with kA3DPDFDataIsolate. Then, it acts as if the user selected the first item. This behaviour is valid only for list widgets.

A widget can be specifed as target without a source, to be automatically populated whenever the table bound is selected, whatever source widget triggered this selection. For this, use A3DPDFWidgetSetTargetBehaviour(NULL, WidgetTarget);

A widget that has to be populated at init time (when the file is opened) should have a NULL source specified, and the table bound should be set for init time with

A3DPDFDataTableSetInitIndex

.

A widget not connected to any other widget have automatically the source specified to NULL, and then is automatically populated with all rows of the data table when the file is opened.

A widget connected to a source widget with kA3DPDFDataIsolate behaviour always remains empty at init time.

Version

10.0

Parameters
  • pWidgetSource[in] Widget source of interaction. Can be NULL to automatically populate the target widget at init time

  • pWidgetTarget[in] Widget to be refreshed.

  • eBehaviourOnTarget[in] Values allowed for this kind of widget target: see A3DPDFEWidgetTargetBehaviour

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DAnnotActivatePMICrossHighlightAndSelect(A3DPDF3DAnnot *p3DAnnot, A3DBool bActivatePMICrossHighlightAndSelect)

Function to activate the PMI cross highlight and select behaviour. With this, some JavaScript code is generated so that when the user clicks on a markup, the associated surface is highlighted, and then the solid node containing the surface is selected. Only works with Acrobat 11 and later. Warning: If this behaviour is activated, when the node is selected, the PMI originally selected is unselected. If datamodel connection is linked to a PMI node, the connection will be resetted as if the PMI node is unselected.

Version

10.1

Parameters
  • p3DAnnot[in] The Annot 3D to work on.

  • bActivatePMICrossHighlightAndSelect[in] If true, activate the PMI cross highlight and select behaviour.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDF3DViewListEnableViewTransitions(A3DPDF3DViewList *p3DAnnotUIListViews, A3DBool bTransitionActive)

Function to define if the transition between views must be animated or not. This is applicable to widgets implied with datamodel, and only with activation by datamodel. Implied widgets are A3DPDF3DViewList, and A3DPDF3DViewCarousel as the carousel widget must be in relationship with the view list widget to perform the view activation.

Version

13.1

Parameters
  • p3DAnnotUIListViews[in] The widget to interact with 3D views.

  • bTransitionActive[in] Defines if the transition between views must be animated or not. If true, an animation is played to transition to the view. The animation is automatically calculated by Acrobat depending on camera settings. If false, the view is activated without animation. By default, i.e. if this function is not called, the value is TRUE: all view transitions are animated.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFCheckBoxSetForFitSelectedMode(A3DPDFCheckBox *pCheckBox, A3DPDF3DAnnot *p3DAnnot)

This function makes the check box field be the selector for the ‘fitselected’ mode of the annot 3D. If the user checks the check box, the ‘fitselected’ mode is on ; else it is off.

This function provides a way for the final user to control the fitselected mode for an annot 3D. With it, a check box field can be associated to an annot 3D. If the user checks the box, all selections made on the 3D annot are followed by a fitselected action, i.e. the camera is zoomed to the selected node. This mode is only available when interactivity is defined using datamodel. An exemple is a scenario where you have a scroll table associated to an annot 3D, with the target behaviour kA3DPDFDataSelect. When the user selects a row in the scroll table, the corresponding node is selected in the 3D annot. Then, if the check box for ‘fitselected’ mode is checked, the camera zooms to the node. If the check box is not checked, there is no camera zoom.

Version

13.1

Parameters
  • pCheckBox[in] The CheckBox object to work on.

  • p3DAnnot[in] The Annot 3D to work on.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFCheckBoxSetForCheckAllColumn(A3DPDFCheckBox *pCheckBox, const A3DPDFScrollTable *pScrollTable, const A3DInt32 iColumnIndexInST)

This function associates the specified CheckBox with a Scroll Table column of type kA3DPDFCheckBoxContent, in order to create a ‘check/uncheck all’ CheckBox.

This function provides a way for the final user to check (or uncheck) all the CheckBoxes in a specific Scroll Table column. With it, a CheckBox field can be associated to a Scroll Table. If the user checks (respectively unchecks) the box, all the CheckBoxes of the specified Scroll Table column will also be checked (respectively unchecked).

Version

13.2

Parameters
  • pCheckBox[in] The CheckBox to convert into a ‘check/uncheck all’ CheckBox.

  • pScrollTable[in] The Scroll Table to work on, containing a column of type kA3DPDFCheckBoxContent.

  • iColumnIndexInST[in] The index of the kA3DPDFCheckBoxContent column in the Scroll Table.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

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

A3DStatus A3DPDFLayerCreate(A3DPDFDocument *pDoc, const A3DPDFLayerData *pData, A3DPDFLayer **ppLayer)

Creates a layer in a document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • pData[in] The layer data parameters.

  • ppLayer[out] The newly-created layer.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFLayerGet(const A3DPDFLayer *pLayer, A3DPDFLayerData *pData)

Populates the A3DPDFLayerData structure with data from an A3DPDFLayer entity.

Version

10.1

Parameters
  • pLayer[in] The layer to determine data from.

  • pData[out] The layer data parameters.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentGetNumberLayers(const A3DPDFDocument *pDoc, A3DInt32 *piNbLayers)

Function to get the number of layers in the document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • piNbLayers[out] The number of layers in the document.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentGetLayer(const A3DPDFDocument *pDoc, const A3DInt32 iNumLayer, A3DPDFLayer **ppLayer)

Get a layer object by its index in the document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • iNumLayer[in] The index of the layer. The first index is 0.

  • ppLayer[out] The Layer object.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentGetLayerByName(const A3DPDFDocument *pDoc, const A3DUTF8Char *pcName, A3DPDFLayer **ppLayer)

Get a layer object by its name in the document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • pcName[in] The name of the layer to look for.

  • ppLayer[out] The Layer object.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentSetLayersRBGroup(const A3DPDFDocument *pDoc, A3DUns32 iNbLayers, A3DPDFLayer **ppLayers)

Define a “radio button” behaviour for a group of layers. That is, the state of at most one layer in the group can be activated at a time.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • iNbLayers[in] The size of the following array of layers.

  • ppLayers[in] The array of pointer on layers objects.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFFieldSetLayer(A3DPDFField *pField, A3DPDFLayer *pLayer)

Adds a field into a layer.

Version

10.1

Parameters
  • pField[in] the field to be added

  • pLayer[in] The layer in which the field must be added.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFImageSetLayer(A3DPDFImage *pImage, A3DPDFLayer *pLayer)

Adds an image into a layer.

Version

10.1

Parameters
  • pImage[in] the image to be added

  • pLayer[in] The layer in which the image must be added.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertTableAndSetLayer(A3DPDFPage *pPage, A3DPDFTable *pTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, A3DPDFLayer *pLayer)

Function to insert a table in a page within a layer.

Warning1: The positioning is not defined as in the other insertion functions (for texts or images). Here, the position is specified from the top of the page. Warning2: This function must be used instead of A3DPDFPageInsertTable if the table is to be placed in a layer.

Version

10.1

Parameters
  • pPage[inout] The Page object to work with.

  • pTable[in] The Table object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pLayer[in] The layer in which the table must be placed.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertTextAndSetLayer(A3DPDFPage *pPage, A3DPDFText *pText, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom, A3DPDFLayer *pLayer)

Function to insert a text line in a page within a layer. Warning: This function must be used instead of A3DPDFPageInsertText if the text is to be placed in a layer.

Version

10.1

Parameters
  • pPage[inout] The Page object to work with.

  • pText[in] The Text object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosBottom[in] The y coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pLayer[in] The layer in which the text must be placed

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertScrollTableAndSetLayer(A3DPDFPage *pPage, A3DPDFScrollTable *pScrollTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, A3DPDFLayer *pLayer)

Function to insert a ScrollTable widget in a page.

Version

10.1

Parameters
  • pPage[inout] The Page object to work with.

  • pScrollTable[in] The ScrollTable object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pLayer[in] The layer in which the ScrollTable must be placed

Return values
  • A3D_SUCCESS

  • A3DPDF_CANNOT_INITIALIZE_RESOURCES – if the resources directory is not properly defined.

  • A3DPDF_CANNOT_LOAD_TABLETOPDF_DLL – if the tabletopdf dll cannot be loaded.

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFGetStreams(const A3DUTF8Char *pcFileName, A3DUns32 iFlags, A3DStream3DPDFData **ppStreamData, A3DInt32 *piNumStreams)

Function to retrieve all 3D streams embedded in a PDF document, this function export native and PDF views (defined using Acrobat and not in the origin native CAD file). It also manages secured PDF.

The stream is the raw binary data stored as a char* stream. A PRC stream can be interpreted with the function A3DAsmModelFileLoadFromPrcStream. A U3D stream needs to be written as a physical file before being read with classical A3DAsmModelFileLoadFromFile function.

If pcFileName is NULL, *ppStreamData will be freed if *piNumStreams is non-null. A3DPDFGetStreams(NULL, NULL, ppStreamData, piNumStreams) to release *ppStreamData.

Version

12.0

Parameters
Return values
  • A3D_SUCCESS

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

Returns

A3D_SUCCESS in case of success or an error code