SOLVED How to use FILEOPEN_APPEND in the HyperFile Class ?

if I replace the mode = c4d.FILEOPEN_WRITE with c4d.FILEOPEN_APPEND in the example as given in the SDK documentation I get a "cannot open file to write"- error.
What am I doing wrong? It works fine with the "mode = c4d.FILEOPEN_WRITE "

ca9e39d0-2c42-483c-97f3-41dd6413d92e-image.png

and after running this I get:
3c8cc966-d671-49a1-af6e-6e2f8c5d1dd0-image.png

Apparantly the file gets saved as a read-only file.

I saved to a different directory and made shure that nothing was write protected, but still the "APPEND" mode throws an error.

Hi @SteveJLV, the APPEND mode is not supported by the HyperFile.

The FILEOPEN enum is also used in BaseFile, which is the underlying class used by the HyperFile. BaseFile properly support Append mode, but extra code in the HyperFile prevent it to work correctly.
So far I don't see any workaround possible for you in Python, the only way would to first read the HyperFile and rewrite everything + the things that you want to Append (pretty inefficient).

I opened a bug report, to support APPEND within HyperFile.
I set this post to solved, and I added the tag ToFix t your topic, but don't worry we will keep you in touch when a fix will be available but we can't say when it will be available neither if it will be fixed.
Cheers,
Maxime.