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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    save document

    SDK Help
    0
    4
    614
    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
      Helper
      last edited by

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

      On 05/02/2003 at 16:12, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Save Document doesn´t work for me somehow. 😕 It just won´t save.

          
          
          BaseDocument* doc = BaseDocument::Alloc(); if(!doc) return FALSE;  
           BaseObject*clone = (BaseObject* )leaf->GetClone(NULL,FALSE); if(!clone) return FALSE;  
           doc->InsertObject(clone,NULL,NULL,FALSE);  
           if(!SaveDocument(doc, fn, FALSE,FORMAT_C4DEXPORT)) {BaseDocument::Free(doc);return FALSE;}
      

      Everything works fine, till I want to save. I am using FileSelect save dialog so the user can set a file directory and name. I am checking then with content if filename is filled. Everythings fine...
      Is it buggy? 😞
      Thanks
      Samir

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

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

        On 06/02/2003 at 10:33, xxxxxxxx wrote:

        Could anybody reproduce/confirm that and/or has a workaround?
        Thanks
        Samir

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

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

          On 06/02/2003 at 11:30, xxxxxxxx wrote:

          Looks like a bug, the document path/file is not getting set in the API function, add:

              
              
                
              doc->SetDocumentPath(fn.GetDirectory());  
              doc->SetDocumentName(fn.GetFile());  
              
          

          Just before the SaveDocument. This will be corrected in the next API update.

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

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

            On 06/02/2003 at 11:37, xxxxxxxx wrote:

            Thanks. Works now.

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