Exception: no converter found for 'net.maxon.interface.url-C[A]'



  • Hello
    I have installed R23 demo.
    I am trying to get the documents List with :
    c4d.documents.GetRecentDocumentsList(isBodyPaint=False)
    but instead of getting the list, I got an exception error printed in the console :
    Exception: no converter found for 'net.maxon.interface.url-C[A]'
    Is it a bug ?
    Thanks

    P.S.: others c4d.documents methods are working well :

     if doc.GetDocumentName()== "PyRubik":       
           pass
        else:      
            li_docs = c4d.documents.GetRecentDocumentsList(isBodyPaint=False)  **# <-- pb here** 
            li_noms = [d.GetDocumentName() for d in li_docs]
            if "PyRubik"  not in li_noms: # create a new doc
                projet = c4d.documents.BaseDocument()# new doc
                projet.SetDocumentName("PyRubik")
                c4d.documents.InsertBaseDocument(projet)
                c4d.documents.SetActiveDocument(projet)# PyRubik active
            else:
                projet = li_docs[li_noms.index("PyRubik")] # to obtain PyRubik object
                c4d.documents.SetActiveDocument(projet) # to make "PyRubik" active
    


  • Hello
    I saw that : c4d.documents.GetRecentDocumentsList(isBodyPaint=False) is for the recent document list but not to get the current document list (opened projects).
    I am not able to find in SDK documentation any method to get the list of opened documents.
    Need help please.
    Thanks
    Patrice



  • Hi Patrice, thanks for reaching out to us.

    With regard to your question, on obtaining the list of opened documents, the solution is pretty easy and consists in getting the first document and iterating over the others.

        activeDoc = c4d.documents.GetFirstDocument()
        
        while activeDoc is not None:
            print (activeDoc.GetDocumentName())
            activeDoc = activeDoc.GetNext()
    

    Instead with regard to the first issue, you have to include in your script the proper include statement

    import c4d, maxon
    
    # Main function
    def main():
        li_docs = c4d.documents.GetRecentDocumentsList(isBodyPaint=False)
        for i in range (li_docs.GetCount()):
            print (li_docs[i])
    

    Cheers, R