< Home

< Table of Contents

REFERENCE MANUAL

HPS.Publish.File Class Reference

The File class provides functions to export Model objects to 3D PDFs via Publish. More...

Static Public Member Functions

static HPS.Publish.DocumentKey CreateDocument (string in_filename)
 Creates a DocumentKey based on the given PDF file. More...
 
static HPS.Publish.DocumentKey CreateDocument ()
 Creates a DocumentKey based on the given PDF file. More...
 
static void Export (HPS.SprocketPath in_source, string in_filename, HPS.Publish.ExportOptionsKit in_options)
 Performs a synchronous Publish export of the given SprocketPath with the provided options to a given filename. More...
 
static void Export (HPS.Publish.AnnotationKit in_annotation, string in_filename, HPS.Publish.ExportOptionsKit in_options)
 Performs a synchronous Publish export of the given AnnotationKit with the provided options to a given filename. More...
 
static void Export (HPS.Publish.DocumentKit in_document, string in_filename, HPS.Publish.ExportOptionsKit in_options)
 Performs a synchronous Publish export of the given DocumentKit with the provided options to a given filename. More...
 
static void Export (HPS.Publish.DocumentKey in_document, string in_filename)
 Performs a synchronous Publish export of the given DocumentKey to a given filename. More...
 

Detailed Description

The File class provides functions to export Model objects to 3D PDFs via Publish.

Member Function Documentation

static HPS.Publish.DocumentKey HPS.Publish.File.CreateDocument ( string  in_filename)
static

Creates a DocumentKey based on the given PDF file.

The returned object will allow direct interaction with the underlying in-memory copy of that PDF document and any pages in it. If no filename is specified, an empty PDF document will be created. The in-memory PDF document can be written to disk via the File::Export function.

Parameters
in_filenameThe name of the PDF file from which to create an in-memory copy. Defaults to nullptr, which results in an empty in-memory PDF document.
Returns
A DocumentKey handle for the in-memory PDF document.
static HPS.Publish.DocumentKey HPS.Publish.File.CreateDocument ( )
static

Creates a DocumentKey based on the given PDF file.

The returned object will allow direct interaction with the underlying in-memory copy of that PDF document and any pages in it. If no filename is specified, an empty PDF document will be created. The in-memory PDF document can be written to disk via the File::Export function.

Returns
A DocumentKey handle for the in-memory PDF document.
static void HPS.Publish.File.Export ( HPS.SprocketPath  in_source,
string  in_filename,
HPS.Publish.ExportOptionsKit  in_options 
)
static

Performs a synchronous Publish export of the given SprocketPath with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_sourceThe SprocketPath containing the data to export. If the Model in the SprocketPath corresponds to a CADModel which was imported via Exchange, the underlying Exchange data for the CADModel will be embedded in the PDF, otherwise, the 3D data will be generated from the tessellation in the Visualize scene graph for the Model.
in_optionsThe options controlling the export of the 3D PDF data.
static void HPS.Publish.File.Export ( HPS.Publish.AnnotationKit  in_annotation,
string  in_filename,
HPS.Publish.ExportOptionsKit  in_options 
)
static

Performs a synchronous Publish export of the given AnnotationKit with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_annotationThe <ref refid="class_h_p_s_1_1_publish_1_1_annotation_kit" kindref="compound">AnnotationKit</ref> containing the data to export. If the Model in the source SprocketPath for the <ref refid="class_h_p_s_1_1_publish_1_1_annotation_kit" kindref="compound">AnnotationKit</ref> corresponds to a CADModel which was imported via Exchange, the underlying Exchange data for the CADModel will be embedded in the PDF, otherwise, the 3D data will be generated from the tessellation in the Visualize scene graph for the Model.
in_optionsThe options controlling the export of the 3D PDF data.
static void HPS.Publish.File.Export ( HPS.Publish.DocumentKit  in_document,
string  in_filename,
HPS.Publish.ExportOptionsKit  in_options 
)
static

Performs a synchronous Publish export of the given DocumentKit with the provided options to a given filename.

This will create a PDF document based on the DocumentKit. An exception will be thrown if a problem is encountered during export.

Parameters
in_documentThe <ref refid="class_h_p_s_1_1_publish_1_1_document_kit" kindref="compound">DocumentKit</ref> containing the data to export. If any Model in the source SprocketPath for any <ref refid="class_h_p_s_1_1_publish_1_1_annotation_kit" kindref="compound">AnnotationKit</ref> in the <ref refid="class_h_p_s_1_1_publish_1_1_document_kit" kindref="compound">DocumentKit</ref> corresponds to a CADModel which was imported via Exchange, the underlying Exchange data for the CADModel will be embedded in the PDF, otherwise, the 3D data will be generated from the tessellation in the Visualize scene graph for the Model.
in_optionsThe options controlling the export of the 3D PDF data.
static void HPS.Publish.File.Export ( HPS.Publish.DocumentKey  in_document,
string  in_filename 
)
static

Performs a synchronous Publish export of the given DocumentKey to a given filename.

This will not close the PDF document underlying the DocumentKey, rather it will just create a copy of it on disk. The DocumentKey can still be used after this call to interact with the in-memory PDF document.

Parameters
in_documentThe <ref refid="class_h_p_s_1_1_publish_1_1_document_key" kindref="compound">DocumentKey</ref> from which to create a PDF file on disk.
in_filenameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.

The documentation for this class was generated from the following file: