Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How to use FILEOPEN_APPEND in the HyperFile Class ?

    Bugs
    2
    4
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SteveJLV
      last edited by m_adam

      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

      1 Reply Last reply Reply Quote 0
      • S
        SteveJLV
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • S
          SteveJLV
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by m_adam

            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.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • maxonM maxon moved this topic from Cinema 4D SDK on
            • First post
              Last post