Store data in ASCII file... is possible?



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

    On 13/09/2007 at 14:58, xxxxxxxx wrote:

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

    ---------
    Hello to everybody.

    I'm searching for a solution... a simple thing for you but not for me... by the way... I run an animation in C4D and I would like to store data produced by the COFFEE_Script attached  (data visible in the c4Dconsole).
    I would like to store them in a unique list and save this "data_list" as a file ascii in a specifiable position in HardDisk.
    Pratically i need to play animation and store all the running data visible by "println(MatriceTotale);" to an unique ascii data list"
    How can I do?
     
     
    The script:
    Create a cube in c4d... add this coffee script... animate the cube rotation... look at c4d console... i need to store these data...
     
     
    main(doc,op)
    {
    var obj = doc->FindObject("Cube");
    var matrix = obj->GetMg();
    var globalRot = matrix->GetHPB();
    var stringa = stradd("x ",tostring(globalRot)," items.");
    // Rotazione HP
    var posizione = 3;
    var lunghezza = 8;
    // Rotazione HB
    var posizione1 = 12; 
    var lunghezza1 = 8;
    var MatriceTotale = stradd("H", strmid(stringa,posizione,lunghezza), " P",strmid(stringa,posizione1,lunghezza1));

    println(MatriceTotale);
    }
     
     
    Thanks in advance



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

    On 15/09/2007 at 14:13, xxxxxxxx wrote:

    Nothig is going the way I hoped...
    Please... need SOME HELP!
    It isn't a simple stupid test!
    There isn't a really easy way to explain how much important should be this help..
    Is it at least possible to do it??
    Some "Guru meditation" is needed.. ;)
    Thx



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

    On 16/09/2007 at 06:04, xxxxxxxx wrote:

    hi buzz,

    for that kind of stuff I use this set-up.
    It allows you to append parameters to a text-file per frame.

    hope this helps, frank.



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

    On 17/09/2007 at 01:55, xxxxxxxx wrote:

    Loading and saving files from within COFFEE expressions is forbidden. You have to write a script or try the setup Fank has posted, although it is not recommended to write or load files from within XPresso expressions.

    cheers,
    Matthias



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

    On 17/09/2007 at 12:38, xxxxxxxx wrote:

    Hi FrankBerg-Matthias,

    Tnx for tips ;) setup posted seem to work wery well.. is very interesting this solution..   now I fell optimistic really.. many thanks :-)
    This evening I turn my attention to a little LAST problem..  data stored aren't separated by "carriage return" so stored code look like a single data_block! :(

    Some possible solutions?

    Best regards
     
    Chris



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

    On 17/09/2007 at 14:58, xxxxxxxx wrote:

    No sooner said than done.. really easy..
     
    Thanks for everything  :)
     
    cheers
    Chris



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

    On 24/04/2009 at 07:31, xxxxxxxx wrote:

    How did you solve that problem with the single block versus single lines or a delimiter? I have the same problem now...
    Cheers
    Rainer



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

    On 24/04/2009 at 07:42, xxxxxxxx wrote:

    Quote: _although it is not recommended to write or load files from within XPresso expressions.
    >
    > * * *
    _


    this script was written in a time where I just started to write scripts so I forgive myself :-D



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

    On 24/04/2009 at 08:55, xxxxxxxx wrote:

    Lemo: Take a look at the sixth post:

    http://py4d.xpresso24.com/wordpress/sdk/?wpforumaction=viewtopic&t;=34.0#4


Log in to reply