# cee::ug::DataSourceVTF

class `DataSourceVTF` : public DataSourceInterface

  Data source interface for VTF model files.

  The data source contains a collection of all states for one analysis. Each state groups together geometries and results for one time step, load case, frequency etc.

  Each unstructured grid model owns one data source.

  The DataSourceVTF is a subclass of DataSource. See DataSource on general functionality such as how to get states and metadata directory.

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

  Use open() to open a VTF file.

  Public Functions

  `DataSourceVTF`(int dataSourceId)

    Constructs a data source with specified unique id.

  bool `isOpen`() const

    Returns true if file already open.

  virtual bool `open`(const Str &fileName, Error *error = NULL)

    Opens the VTF file given by filename.

    Returns true if file was read successfully.

  virtual void `close`()

    Closes the data source.

  bool `fileProperties`(PropertySetCollection *propSetCollection, ImageResources *resources)

    Gets the property set collection and image resources for this VTF file.

  int `vendorId`() const

    Returns the vendor id from the VTF file.

  Public Static Functions

  static bool `isVTFFile`(const Str &filename)

    Returns true if the given file is a VTF file (with the correct header information)

  static bool `snapshotImage`(const Str &filename, Image *image)

    Gets the snapshot image from the VTF file.

    The method returns true if a snapshot was found.

  static bool `isExpressFile`(const Str &filename)

    Returns true if the file is a properly formatted VTF Express file (proprietary (closed) format)

  static size_t `plotDataCount`(const Str &filename)

    Returns the number of 2D plots defined in the VTF file.

  static bool `read2dPlotData`(const Str &filename, size_t plotDataIndex, std::vector<Str> *variableNames, std::vector<Str> *variableUnits, std::vector<std::vector<double>> *variableData)

    Returns the data in the given plot in the VTF file.

  static Str `fileContentsInfo`(const Str &filename)

    Returns information about the blocks in the VTF file.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, 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...