File Access Problems



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

    On 24/03/2006 at 15:51, xxxxxxxx wrote:

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

    ---------
    Hi there guy's

    Im quite new to playing with c.o.f.f.e.e. - hopefully you can help

    1...
    im trying to read from a file.
    nothing complex.
    Ive got a c.o.f.f.e.e. node in an xpresso tag...
    in it it includes the lines of...

    ...
    var srcfile = new(BaseFile);
    srcfile->Open(filename, GE_READ);
    var myreal = srcfile->ReadReal();
    ...

    filename contains the path\filename to a file. (hardcoded at the moment :)

    Does absolutely bugger all. Doesnt even seem to try to open the file.

    Now would I be right in saying that you cant use file operations from c.o.f.f.e.e. nodes in xpresso tags? Im sure i remember reading that somewhere - cant see it in the sdk I downloaded though!

    If that is the case, can I just stick it in a propper c.o.f.f.e.e. tag instead and it should work? (I have no idea how to create simple input/output ports that i can attatch to other stuff on a c.o.f.f.e.e. tag, like you can with an xpresso tag - so dont really know how to go down this route yet)

    2...
    Is there a coffee instruction to return the path of the current document, i can only seem to find an instruction to return the current c4d install path.
    If all that makes sense!

    Many thanks in advance

    martin!



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

    On 31/03/2006 at 11:07, xxxxxxxx wrote:

    1. It seems to work here. Perhaps the filename is wrong? I don't know how you're creating the filename, but an easy way is to use a filename port as input for the C.O.F.F.E.E. node. (I have exactly the same code as you!)
    2. BaseDocument::GetFilename()


Log in to reply