# HIOUtilityPublish

## Functions

| `HIOUtilityPublish`
| `~HIOUtilityPublish`
void | `RegisterInputHandlerTypes`
char const * | `GetOutputName`
char const * | `GetInputName`
char const * | `GetInputTypesString`
`HInputHandlerStyle` | `GetInputStyle`
HFileInputResult | `FileInputByKey`
HFileInputResult | `FileInputByKey`
HFileInputResult | `FileInputByKey`
HFileOutputResult | `FileOutputByKey`
HFileOutputResult | `FileOutputByKey`
HFileOutputResult | `FileOutputByKey`
void | `RegisterOutputHandlerTypes`
void * | `BuildPRCModel`
char const * | `GetOutputTypesString`
`HOutputHandlerStyle` | `GetOutputStyle`
`HFileIOResult` | `WriteSimplePDF`
`HFileIOResult` | `WritePDFFromTemplate`
char * | `GenerateJavascript`
void | `ReleaseJavascript`

## Detailed Description

class `HIOUtilityPublish` : public HInputHandler, public HOutputHandler

  The HIOUtilityPublish class is used for exporting either the HOOPS scene graph or an existing prc model as a 3D PDF. It requires an installation of HOOPS Publish.

  Public Functions

  `HIOUtilityPublish`()

    Constructs an HIOUtility object.

  inline virtual `~HIOUtilityPublish`()
  virtual void `RegisterInputHandlerTypes`()

    This method registers the appropriate extensions to this handler as an input handler.

  inline virtual char const *`GetOutputName`()

    Returns: | A character pointer denoting the name of the handler.

  inline virtual char const *`GetInputName`()

    Returns: | A character pointer denoting the name of the input handler.

  inline virtual char const *`GetInputTypesString`()

    Returns: | The input extension type that is handled by HIOUtilityPublish.

  inline virtual HInputHandlerStyle `GetInputStyle`()

    Returns: | The type of input style which is HInputHandlerStyleModel.

  HFileInputResult `FileInputByKey`(wchar_t const *FileName, HC_KEY key, HInputHandlerOptions *options)

    This method reads the modeller file ‘filename’ into the segment tree underneath key.

    Parameters: | filename – The name of the file to load. key – The HOOPS segment key to load model data into. options – An options class containing any needed extra information for operation.
    Returns: | The #HFileInputResult result of the input operation.

  inline virtual HFileInputResult `FileInputByKey`(char const *FileName, HC_KEY key, HInputHandlerOptions *options)

    This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.

    Parameters: | filename – The name of the file to load. key – The HOOPS segment key to load model data into. options – An options class containing any needed extra information for the operation.
    Returns: | The #HFileInputResult result of the input operation.

  inline virtual HFileInputResult `FileInputByKey`(unsigned short const *FileName, HC_KEY key, HInputHandlerOptions *options)

    This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.

    Parameters: | filename – The UNICODE name of the file to load. key – The HOOPS segment key to load model data into. options – An options class containing any needed extra information for the operation.
    Returns: | The #HFileInputResult result of the input operation.

  HFileOutputResult `FileOutputByKey`(wchar_t const *filename, HC_KEY key, HOutputHandlerOptions *options)
  inline virtual HFileOutputResult `FileOutputByKey`(unsigned short const *filename, HC_KEY key, HOutputHandlerOptions *options)

    This method writes model data from a given HOOPS key to a given output file. Note that this must be implemented in a subclassed HOutputHandler instance handling models.

    Parameters: | filename – The wide character name of the file to output. key – The HOOPS segment key to get output model data from. options – The options class containing any needed extra information for the operation.
    Returns: | The #HFileOutputResult result of the output operation.

  inline virtual HFileOutputResult `FileOutputByKey`(char const *filename, HC_KEY key, HOutputHandlerOptions *options)

    This method writes model data from a given HOOPS key to a given output file. Note that this must be implemented in a subclassed HOutputHandler instance handling models.

    Parameters: | filename – The name of the file to output. key – The HOOPS segment key to output model data from. options – The options class containing any needed extra information for the operation.
    Returns: | The #HFileOutputResult result of the output operation.

  virtual void `RegisterOutputHandlerTypes`()

    This abstract function must register extension types to be handled by subclassed HOutputHandler instance.

    For example, the following lines of code can be used to specify a class that will handle files with “tiff” and “tif” extensions:

  virtual void *`BuildPRCModel`(HOutputHandlerOptions *options, HC_KEY key)

    !This method creates a A3DAsmModelFile object from a HOOPS segment tree

    Parameters: | options – Output Handler Options. The m_pHBaseView must be set key – Start Segment Key
    Returns: | A3DAsmModelFile pointer

  inline virtual char const *`GetOutputTypesString`()

    This must be implemented in a subclassed HOutputHandler For example: the following line of code can be use to specify the stl extension:

    The following line of code can be used to specify that jpg, bmp and gif extension are handled:

    Returns: | The extension type or types that can be handled by this HOutputHandler.

  inline virtual HOutputHandlerStyle `GetOutputStyle`()

    For example: the following code can be used for an HOutputHandler that outputs model:

    Returns: | The HOutputHandlerStyle that this instance will use. It can be HOutputHandlerStyleModel for geometry data, HOutputHandlerStyleImage for images, HOutputHandlerStyleHardcopy for hardcopy or HOutputHandlerStyleHTML for MVO style html page.

  virtual HFileIOResult `WriteSimplePDF`(wchar_t const *file_name, void *PRCModel, HOutputHandlerOptions *options, wchar_t const *javascript_file, HPEViewsArray const &hoopsviews)

    This method creates a PDF file from a prc model

    Parameters: | file_name – Name of output file PRCModel – A3DAsmModelFile pointer options – PDF Options javascript_file – JavaScript to attach to the 3d object array – of additional views

  virtual HFileIOResult `WritePDFFromTemplate`(wchar_t const *file_name, void *PRCModel, HOutputHandlerOptions *options, HPDFLayoutManager *layoutmanager, wchar_t const *javascript_file)

    This method creates a PDF file from an existing template

    Parameters: | file_name – Name of output file PRCModel – A3DAsmModelFile pointer layoutmanager – Pointer to HPDFLayoutManager object which allows for modification of PDF fields javascript_file – JavaScript to attach to the 3d object

  char *`GenerateJavascript`(HBaseView *view)

         This method creates javascript code from an animation stored in the HBhvBehaviorManager of the HBaseView object. Make

    sure to call ReleaseJavascript to free memory

    param PRCModel A3DAsmModelFile pointer

    Parameters: | file_name – layoutmanager – Pointer to HPDFLayoutManager object which allows for modification of PDF fields javascript_file – JavaScript to attach to the 3d object

  void `ReleaseJavascript`()

    This method frees the buffer allocated by a previous call to GenerateJavascript

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize 3DF or choose a sample question below to start a conversation:

What is HOOPS Visualize 3DF?
What are the latest release notes for HOOPS Visualize 3DF?
How do I start evaluating HOOPS Visualize 3DF?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...