looking for a file on the disk



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

    On 25/07/2008 at 12:05, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.5 
    Platform:      Mac OSX  ; 
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    I am trying to write a little script which checks on the disk for a file to be written, then read the values and uses in a xpresso network.
    I am starting now.
    First task is check that the file is there or not.
    First trouble, the code I am writing does not work.
    this is it:

    > main() \> { \> \> var filename = ("test.txt"); \> \> var a = FALSE; \> while ( a == FALSE){ \> println("the file is not there"); \> //something is wrong here: \> a = GeFileExist(filename, FALSE); \> //what is it? \> } \> \> println("Now the file IS there"); \> } \>

    I am sure it's a simple thing but I am not yet familiar with coffee.
    Could you help me?
    Thanks
    G>



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

    On 25/07/2008 at 12:55, xxxxxxxx wrote:

    If this is in an expression, it won't work as COFFEE Expressions cannot do any form of file system access (for security reasons). The way to go then is to create a COFFEE plugin (say, a CommandData plugin).

    Also, realize that the Filename 'filename' should be a full path. Relative paths don't work ... or may only refer to the current working directory set up by Cinema 4D - that is, the Cinema 4D install folder (you'll have to check this).



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

    On 25/07/2008 at 13:03, xxxxxxxx wrote:

    thanks, would be the plugin accessible through the xpresso interface?
    what ultimately I am looking for is:
    and external applications generates a string of values in a file.
    Cinema is open and checks for the file to be written.
    As soon as the file changes the file is read and values fired in a xpresso network, which is used to simplify parametric modelling...
    is this possible at all?

    If I write a COFEE plugin, would this be a module in the xpresso network or something else?

    Thanks again
    G.



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

    On 28/07/2008 at 01:26, xxxxxxxx wrote:

    I don't think this is possible in COFFEE.

    cheers,
    Matthias



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

    On 28/07/2008 at 10:12, xxxxxxxx wrote:

    so shall I use C++?
    or is it not possible at all?

    rui_mac wrote an expresso block which reads and writes texts... it was on a magazine in 2005... unfortunately the code is encrypt...

    would it be possible, by having such an xpresso block, to say something like:
    if the frame is [0], look for this file, if the file exist read and if not keep looking for it,   take values and do something, start again.

    please help :-)

    thanks
    G.


Log in to reply