createh3dfile

Creates the H3D file and returns a file handle. Existing files are overwritten or appended.

Attention: Available only with Activate commercial edition.

Syntax

fid = createh3dfile(filename,option)

Inputs

filename
Filename or the path to the H3D file to be created or opened.
Type: char | string
option (optional)
Specifies if the file is opened in append mode. The supported argument is 'append'. See Comments for more details.
Type: char | string

Outputs

fileID
Integer representing the file ID of filename.
fileID is specified in other functions to operate on this file.
fileID is -1 if an error occurs opening the file.

Examples

Create a new H3D file for writing createh3dfile:
fid = createh3dfile('C:/work/test.h3d')
fid = 41
Create an H3D file to append to an existing data mode:
fid = createh3dfile('C:/test.h3d','append')
fid = 41

Comments

The creation of an H3D file requires different steps. The OML commands must be called in this order:
  1. Create a number of data types.
  2. Create a subcase.
  3. Call writeh3ddata a number of times.
There are two opening modes: new and append.
  • "new" is the default and should not be passed as an argument. "new" clears the H3D file for proper writing. The OMLH3D commands allow for writing results information in an H3D file. You will need to open both a model file and the created H3D results file together, for example, in AltairHyperView.
  • "append" adds new information, but can't modify existing formation. This means that you can't add datatypes, layers, or values to an existing subcase.
  • It is recommend that the appended H3D file contains only the model, as this will avoid any incoherence with existing data.

When creating an H3D file in append mode, the createh3dsubcase command creates subcases with IDs starting at 1. The append mode should not be considered to add new subcases to an H3D file that already contains other subcases.

It is recommended to use either a model-only H3D to append or create a new results-only H3D file.