Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Another omission in the COFFEE docs

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 203 Views
    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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 10/03/2005 at 08:06, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      The methods for the Basefile class, on the COFFEE docs are as follow:
      <CODE>
      [bool] Open ([Filename] fn, [ [int] mode = GE_READ],
                   [ [int] err_dlg = FILE_IGNOREOPEN], [ [int] order = GE_MOTOROLA],
                   [ [int] type = 'C4DC'], [ [int] creator = 'C4D1']);
      [int] GetPosition ();
      [int] GetLength ();
      [int] GetError ();
      [bool] ReadBytes ([bytes] mem, [int] n);
      [bool] WriteBytes ([bytes] mem, [int] n);
      [string] ReadString ([int] n, [ [int] mode = GE_XBIT]);
      [bool] WriteString ([string] str, [ [int] mode = GE_XBIT]);
      [int] ReadChar ();
      [int] ReadUChar ();
      [int] ReadWord ();
      [int] ReadUWord ();
      [int] ReadLong ();
      [int] ReadULong ();
      [float] ReadReal ();
      [float] ReadLReal ();
      [bool] WriteChar ([int] c);
      [bool] WriteUChar ([int] c);
      [bool] WriteWord ([int] w);
      [bool] WriteUWord ([int] w);
      [bool] WriteLong ([int] l);
      [bool] WriteULong ([int] l);
      [bool] WriteReal ([float] f);
      [bool] WriteLReal ([float] f);
      [bool] Seek ([int] position, [bool] relative);
      </CODE>

      There isn't even a mention for the Close() method. I was writing a string to a file and the file was never getting it. Luckily I know that data streams must be closed to be updated.
      There should be a mention to this method.

      Rui Batista

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 10/03/2005 at 08:39, xxxxxxxx wrote:

        Files are also closed when the BaseFile object is destructed by the garbage collection. But Close() is indeed missing from the docs. Thanks for reporting.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post