CallCommand in C.O.F.F.E.E tag



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

    On 08/02/2006 at 21:30, xxxxxxxx wrote:

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

    ---------
    At first,excuse me that I can't use English well.
    I have two question.
     
    [FIRST QUESTION]
    I have some problems in order to using CallCommand function in C.O.F.F.E.E tag(Expression Editer).
    How can I use it in Expression Editer?
     
    [SECOND QUESTION]
    I'd like to get RENDERING TIME  in order to make some record that  when rendering finished into text files.
    Fortunately, I could read and rewrite text-file to referring to C.O.F.F.E.E. SDK documentation Example.
    But I find some problem  in that Example.

     
    
    
    // Creates a filename that points to "foo.txt" in the plugin's directory
    var filename = GeGetRootFilename();
    filename->RemoveLast();
    filename->Add("foo.txt");
    
    // Creates the file and writes a string to it
    var file = new(BaseFile);
    file->Open(filename, GE_WRITE);
    file->WriteString("Hello World!");
    
    // Opens the same file and reads it
    var file = new(BaseFile);
    file->Open(filename, GE_READ);
    var myString = file->ReadString(file->GetLength());
    

    }

     
    
    
     
    
    
    If you test that code, you get coffee error.
    
    
    Because There is no function to close the file you opened.
    
    
    To success to run the script,you should add the sentence below.
    
    
     
    
    
      file->Close();  
    
    
    
    Before you open same file in different purpose.
    
    
     
    
    
     
    
    
    I wish this help you. :)
    
    
    and someone teach that how can I get RENDERING TIME in the pictures window.
    

Log in to reply