C3DFile.Attach |
nFile = C3DFile.Attach( BYVAL fid AS HANDLE ) AS INTEGER
nFile = C3DFile.Attach( BYVAL environment_var AS STRING ) AS INTEGER
Attaches an opened C3D File ID (fid) to a C3DFile so the higher level functions of C3DFile can be used instead of the lower level C3D functions. The second version will use an environment variable to get a C3D File ID handle.
Example:
DIM fid AS HANDLE DIM fileno AS INTEGER
fid = C3D.Open( "e:\kalle.c3d" )
IF fid <> NULL THEN fileno = C3DFile.Attach( fid ) ENDIF
' Do some stuff with the file....
' Close the file C3DFile.Close( fileno ) C3D.Close( fid )
' Using the alternate version fileno = C3DFile.Attach( "MAXA$OPEN_FILE_1.FID" ) ' ' C3DFile.Close( fileno )
END
|