# cee::exp::ExportDataSourceVTFx

class `ExportDataSourceVTFx`

  Export the entire contents of a DataSource to a VTFx file.

  The VTFx file format is Envision’s own format tailored specifically to carry structural mechanics and fluid dynamics data in a very compact form.

  By utilizing XML and zip compression, the VTFx format expands the functionality and usefulness of the well established VTF format by adding features for security and adaptability without compromising on the file size.

  Example:

      cee::ug:DataSource* source =  model->dataSource()
      cee::exp::ExportDataSourceVTFx exporter;
      exporter.write(source, "myfile.vtfx");

  See also

  VTFxFileBrowser and ExportVTFx

  Public Functions

  `ExportDataSourceVTFx`(cee::ug::DataSource *dataSource)

    Creates an export object prepared to export the given data sources.

  void `setVendorNameAndApplication`(const Str &vendorName, const Str &vendorApplication)

    Sets the name of the vendor and application from which it is exported from.

  void `setCompressionLevel`(unsigned int compressionLevel)

    Sets the level of compression of the VTFx file.

    Values range from 0 to 9.

    A value of 0 means no compression, values greater than 0 indicate increasing compression performance and hence larger processing time. The default is 6.

  void `setPassword`(const Str &password)

    Sets the password used for file encryption. An empty password means no encryption, which is the default.

  void `setCreateSignature`(bool on)

    When this flag is on, a digital signature is added to the VTFx file. The default is off.

  void `setWriteAsciiDataFiles`(bool on)

    When this flag is on, the files in the database are written in Ascii format. The default is off.

  void `setExportSurfaceOnly`(bool on)

    When this flag is on, only the boundary surface of the model will be stored.

  void `setRelativeDisplacements`(bool on)

    When this flag is on, displacements will be considered as relative.

  void `setExportDerivedResultAsSelfContained`(bool on)

    When this flag is on, scalars derived from tensor or vector data will be exported as independent scalar.

  bool `write`(std::vector<int> stateIds, const cee::ug::DataStateSpec &spec, const Str &fileName)

    Writes the given states with given specification from the content of the data source in the given file using the current export settings.

  bool `write`(const Str &fileName)

    Writes the content of the data source in the given file using the current export settings.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Desktop or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
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...