# createh3dfile

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

## 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