How to use Tetra4D Automate

Running Tetra4D Automate

Tetra4D Automate can be triggered using a command line. Along with the Tetra4D Automate application path, the following arguments can be specified:

#

Identifier

Type of file

Required

-pdfin

Tetra 4D Enrich PDF template

Yes if (2) isn’t specified

-htmlin

HTML template used to export 3D to HTML

Yes if (1) isn’t specified

-libdir

Installation folder (where the A3DLIBS.dll is located)

No

-3dfilein

Source 3D file

Yes if (12) isn’t a xml file and (1) is specified

-3doptions

XML file: Conversion settings

Yes

-xmlattribsin

XML file: Import of meta-data

No

-xmldatafield sin

XML file: Values to populate text fields

No

-xmlimport

XML file: Definition of a table

No

-attachfile or -attachlist

File to be attached in the PDF, or Text file containing a list of files to be attached

No

-outfpwdopen

Specification of a password that will be required to open the PDF document

No

-outfpwdright

Specification of a password that will be required to change the document permission settings

No

-outfname

Output file name and format

Yes

-outlog

Log files

No

Important

  1. Tetra4D Automate supports the same CAD formats as Tetra4D Converter The CAD formats that are available for with one installation of the product are specified by the license provided with the Serial Number.

  2. Tetra4D Automate exports 3D PDF and HTML files. The ability to export to other CAD formats like STEP, IGES… is available optionally. The availability of the optional export to a neutral format is specified by the license provided with the Serial Number.

Example of command line:

"C:\Automate.exe"^
-pdfin "C:\Template_Automate_PartList.pdf"^
-3dfilein "C:\_micro engine.CATProduct"^
-xmldatafieldsin "C:\MicroEngine_Import_TITLEBLOCK.xml"^
-xmlattribsin "C:\MicroEngine_Import_ATTRIB.xml"^
-3doptions "C:\automate_settings_manual.xml"^
-outfname "C:\Tetra4D_Micro_Engine_PartList.pdf"^
-outlog "C:\Tetra4D_Micro_Engine_PartList.log"

Conversion process

During the conversion of the CAD files into a PDF document by Tetra4D Automate, the following operations are performed:

  • The CAD data are read according to the specified conversion settings XML file,

  • The 3D object from the specified PDF template is replaced by the read CAD data,

  • 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.

Method to trigger a conversion

Along with the source CAD files to be converted into PDF, it is required to prepare the following files to trigger a conversion.

PDF Template file (required)

Important

Tetra4D Automate requires a template created by Tetra4D Enrich.

The PDF document used as a template must be created using Tetra4D Enrich, and must contain at least a 3D annotation.

Conversion Settings XML file (required)

XML file containing various settings for converting 3D file to PDF such as background color, importing element, etc.

Parts attributes definition XML file (optional)

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, Tetra 4D Automate enables to import them through an XML file and map them to the 3D. Please refer Parts attributes definition XML file in details.

Text fields values definition XML file (optional)

XML file defining text information to populate text fields (title-block) in the PDF document. Please refer XML file to define values to populate text fields in details.

Table definition XML file (optional)

XML file defining a table (having multiple rows, columns, and a title row). If the contents of the table to be shown in the PDF document is managed by another application (such as ERP, PLM…), Tetra 4D Automate enables to import it using an XML file, and to map the rows of the table with the 3D. Please refer to XML file to define a table in details.

Conversion settings

Four samples of conversion settings files are provided with the setup of tetra4D Automate. Please refer to the Presentation of samples for detailed explanations about these samples.

Conversion setting file structure

The structure of the settings is based on three main sections:

  • CAD files Import parameters,

  • Export parameters,

  • PDF parameters.

The different settings and options are presented below.

CAD files import Parameters

This section provides all the CAD data reading parameters and options that are meant to define what CAD entities are considered during the CAD data reading phase.

General

Specifies what information are considered during the reading phase.

Attribute

Description

Value

ReadSolids

Import solids

true: Import, false: Not imported

ReadSurfaces

Import surfaces

Same as above

ReadWireframes

Import wireframes

Same as above

ReadFeature

Import feature

Same as above

ReadPmis

Import PMI and views

Same as above

ReadAttributes

Import Attributes

Same as above

ReadHiddenObjects

Import hidden objects

Same as above

ReadConstructionAndReferences

Import construction and references

Same as above

ReadActiveFilter

Import active filter

Same as above

ReadDrawings

Import drawings

Same as above

ReadGeomTessMode

Import geometry (B-rep) and/or polygon (tessellation)

0: Geometry only
1: Both geometry and tessellation
2: Tessellation only

DefaultUnit

Default Unit

0: Point
1: Inch
2: Millimeter
3: Centimeter
4: Picas
5: Foot
6: Yard
7: Meter
8: Kilometer
9: Mile
10: Unknown

LoadStructureOnly

Load only the assembly structure

true: Not supported, false: Import the full assembly

VIEW filtering

Specifies if the native CAD views have to be filtered.

Remarks:

  • The views filtering feature applies to the following CAD formats only:

    • Inventor

    • CATIA V5

Attribute

Description

Value

IgnoreSubAsmViews

Specifies if the views that are defined in the sub-levels and the components of an assembly are retained in the PDF document or if they are ignored

true: All views from sub-levels are ignored, false: All views are read

FilterViewsByName

Enables to define a rule to filter the views according to their name. Mode: Defines the filtering mode. Criteria: Defines the string of character that will be used to identify the views

Mode: 0 = No Filtering
1 = Views matching with criteria are kept
2 = Views matching with criteria are ignored. Criteria: String of characters

PMI

Specifies how the PMIs will be displayed in the PDF document.

Attribute

Description

Value

AlwaysSubstituteFont

Specifies if the PMI font defined in the CAD is used or substituted by another one

true: Substitutes the font, false: Use the CAD font

SubstitutionFontValue

Substitution font

Name of font

NumberOfDigitsAfterDot

Number of decimal places to use for numeric values if no decimal information is specified in the CAD file

0 ~ 5

DefaultUnit

Units of measure of the PMI to use if no unit information is specified in the CAD file

0: Point
1: Inch
2: Millimeter
3: Centimeter
4: Picas
5: Foot
6: Yard
7: Meter
8: Kilometer
9: Mile
10: Unknown

AlwaysUseDefaultColor

“true” to substitute the color of PMI defined in the CAD file by the new color specified in <DefaultColor>

true: Yes, false: No

ProprietaryFontDirectories

The fonts are usually retrieved from system folders. These paths enable to specify additional locations for fonts.

DefaultColor

If AlwaysUseDefaultColor is set to “true”, the DefaultColor key defines the color of the PMIs. The color is defined with RGB values:

  • Black: Red=”0” Green=”0” Blue=”0”

  • White: Red=”1” Green=”1” Blue=”1”

Tessellation

Specifies the quality of the tessellation.

Remarks:

  • The tessellation attributes are defined in the “Import Parameters” section because tessellation is calculated during the reading of the CAD data.

  • Note that depending on the CAD format, the tessellation might be read directly from the native CAD data.

Attribute

Description

Value

TessellationLevelOfDetail

Quality of tessellation

0: Extra low
1: Low
2: Medium
3: High
4: Extra high
5: User defined
6: Controlled precision

ChordHeightRatio

Chord height ratio

50 ~ 10000

AngleToleranceDeg

Angle tolerance degrees

10 ~ 40

MinimalTriangleAngleDeg

Minimal triangle degrees

0.01 ~ 2147483648.00

MaxChordHeight

Max chord height

1 ~ 30

Accurate

Accurate Tesselation or not

true: Yes, false: No

KeepUVPoint

Specifies if we want to keep the UV points

true: Not supported, false: No

UseHeightInsteadOfRatio

Use Height instead of Ratio

true: Yes, false: No

MaximalTriangleEdgeLength

Maximal edges’ length of the triangle in tesselation

Remarks:

  • If TesselationLevelOfDetail is set in between 0 to 4 (included), all the other values are ignored.

  • If TesselationLevelOfDetail is set to 5 or 6, then the other attributes must be defined.

Assembly

Defines the CAD files reading strategy and enable to specify additional folders to look for child parts if they are not found in the main assembly folder or sub-folders.

Attribute

Description

Value

UseRootDirectory

Use the root directory to look for sub-assemblies and child parts

true: Yes, false: No

RootDirRecursive

Look for sub-assemblies and child parts into the root directory sub-folders recursively

true: Yes, false: No

SearchDirectories

Enables to specify additional search directories.

PathDefinitions

Enables to specify additional search directories by selecting a text file.

Multiple Entries

Enables to specify the configuration to be read if the file contains different configurations.

Incremental loading

The only supported value is “false”.

Specific

Enables to define some format specific parameters.

Export Parameters

This section provides settings that define the format of the document to be created:

  • Choice of the export format,

  • Export settings

The A3DExportSettings value specifies the export format. Note that the 3D PDF (value 0) is the default format and that all the other formats are optionally accessible.

Format

Attribute

Value

RemoveExtension

Removes the extension

true: Yes, false: No

PDF (PRC)

0

STEP

1

IGES

2

JT

3

3MF

4

STL

5

VRML

6

PARASOLID

7

HTML

1000

Export to PDF (PRC)

Defines the compression options for the export to 3D PDF format.

Attribute

Description

Value

CompressBrep

Activates the compression of the Brep or not

true: Yes, false: No

CompressTesselation

Activates the compression of the tesselation or not

true: Yes, false: No

CompressBrepTol

Specifies the tolerance for the Brep compression

0.01 to 0.1

Export to other CAD formats (Step, Iges…)

Defines the export options for the selected export format.

Export to HTML Format

Convert a 3D PDF file in interactive HTML files. To visualize the HTML output file in your browser, see “Description of the script: 50_start_ConvertToHTML.bat”.

Security settings

Defines the export options for the selected export format.

Attribute

Description

Value

Printing

Enables print feature and defines printing quality

true: High quality print, Low: low quality print, false: No printing

Edit

Enables the Edit feature

true: Yes, false: No

Comments

Enables the Comment feature

true: Yes, false: No

DocAssembly

Enables edit the document (page insertion, merging)

true: Yes, false: No

Fill and sign

Enables to fill fields and to use the Sign feature

true: Yes, false: No

Copy

Enables to copy the contents of the document

true: Yes, false: No

Secure

Enables to modify the security settings of the document

true: Yes, false: No

SaveAs

Enables to “save as” the document

true: Yes, false: No

Templates

Enables to use the document as a template

true: Yes, false: No

Remarks:

  • Some of these options may prevent the document’s JavaScript to run.

PDF Parameters

This section provides parameters that apply only for the export to 3D PDF.

Colors

This section enables to define an index of colors that can be referenced by other settings.

Remark:

The colors are defined by RGB values. The colors can be selected in the index based on the order. First color is 0.

Example:

<ColorData Red="1" Green="1" Blue="1" />   : White

<ColorData Red="0" Green="0" Blue="0" />   : Black

<ColorData Red="0" Green="1" Blue="0" />   : Green

<ColorData Red="0.5" Green="0.5" Blue="0.5" /> 

RectData

Will be documented in a future version of the document

Artwork Data

These settings are related to display of PMIs and the orientation of the default view.

Attribute

Description

Value

JavaSriptFileName

Not used

AnimationStyle

Not used

ActivatePMICrossHiglight

Activate PMIs Cross Highlight

true: yes
false: no

AddPMISemanticInformation

Add information about PMIs semantic

true: yes
false: no

ChangePMIColor

Specifies if we want to change the PMI’s color

true: yes
set to PMIColorIndex
false: no

PMIColorIndex

Color of the markup of the artwork if ChangePMIColor=true

Index in list color

AddStandardViews

Enable the creation of 6 standard views: Left, Top, Front Right, Bottom, Back in Orthographic projection mode

true: yes
false: no

DefaultViewOrientation

Specifies which type of default view’s orientation we want to use

0: Default Acrobat
1: Default CatiaV5
2: Default Creo
3: Default Inventor Inch
4: Default Inventor Flat
5: Default Inventor mm
6: Default Nx
7: Default SolidEdge
8: Default SolidWorks
9: User defined

DefaultViewVerticalAxis

Definition of the vertical axis to be used in the default view if DefaultViewOrientation=9

0: X Axis
1: Y Axis
2: Z Axis

DefaultViewVerticalRotation

Rotation angle of the model on vertical axis

0-360

DefaultViewHorizontalRotation

Rotation angle of the model on horizontal axis

0-360

AnnotData

These settings are related to the 3D annotation:

  • Background color and lighting

  • Rendering mode

  • Data tree and 3D toolbar visualization

Attribute

Description

Value

OpenModelTree

Specifies if we want the model tree to be open when the 3D annot is activated

true: yes
false: no

ShowToolbar

Specifies if we want the 3d toolbar to be show

true: yes
false: no

Lighting

Default light

0: Current light
1: No light
2: White light
3: Day light
4: Bright light
5: Primary color light
6: Night light
7: Blue light
8: Red light
9: Cube light
10: CAD optimized light
11: Headlamp light

RenderingStyle

Default rendering style

0: Transparent bounding box
1: Solid
2: Transparent
3: Solid wireframe
4: Illustration
5: Solid outline
6: Shaded illustration
7: Bounding box
8: Transparent bounding box outline
9: Wireframe
10: Shaded wireframe
11: Transparent wireframe
12: Hidden wireframe
13: Vertices
14: Shaded vertices

BackgroundColorIndex

Default background color (Index of color specified in Colors, Top is 0)

0 ~

TransparentBackground

Specifies if the 3D annotation has a transparent background (False recommended)

true: yes
false: no

ActivateWhen

Specifies when the 3d annotation will be activated

0: remain inactive until explicitly activated by a script or user action
1: be activated as soon as the page containing the 3D Annot is opened
2: be activated as soon as any part of the page containing the 3D Annot becomes visible

DesactiveWhen

Specifies when the 3d annotation will be deactivated

0: remain active until explicitly activated by a script or user action
1: be deactivated as soon as the page containing the 3D Annot is opened
2: be deactivated as soon as any part of the page containing the 3D Annot becomes invisible

AppearanceBorderWidth

Border width in points

0 ~

PosterImageIndex

Not documented

ArtWorkIndex

Not documented