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

    CloseDocument ?

    Cinema 4D SDK
    2
    2
    409
    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.
    • indexofrefractionI
      indexofrefraction
      last edited by m_adam

      Hi,

      c4d.documents.KillDocument(doc) immediately closes a document without any checks

      There is no c4d.documents.CloseDocument()

      How would you close a document with the normal check and warning for changes that might be wanted to be saved first ?

      best, Index

      1 Reply Last reply Reply Quote 0
      • CairynC
        Cairyn
        last edited by

        Just check it manually:

                if currDoc.GetChanged() :
                    c4d.gui.MessageDialog(c4d.plugins.GeLoadString(IDS_MSG_PROJECTCHANGED))
                else :
                    c4d.documents.KillDocument(currDoc) # works but ignores change status
        
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post