Results 1 to 7 of 7

Thread: can i create file with lscript

  1. #1

    can i create file with lscript

    hello,

    i know it 's possible to write inside a existing text file but i want to know if there is a way to create and write a text file with lscript.

    it's to save and stock some value without to have the right scene open.

    thanx for help

  2. #2
    Yes, it's just as easy as opening a file that already exists.
    Just create a File OA with a new path/filename, and write to it. Don't forget to close it before loading....

    But for storing values, it would be better to use the premade Store() and Recall() functions.

    Blochi

  3. #3
    Sorry but what is a File OA ?
    I haven't read this term before

    I have seen Store and Recall commands but it not the best way for i want to do.

    thank for your help

  4. #4
    File Object Agent .... sorry for beeing so short...
    See the LScript Reference Manual page 5, and Chapter 13.

    -Blochi

  5. #5
    arrghh !!!
    shame on me !!!!

    thanx for all Blochi

    another question if you want :

    i would like to know how to get the " objectcount" of a scene.
    i read the doc and a find nothing about it ( ther's pointcount, polycount but nothing for object.
    the goal is to check if a specific object is present in a scene.
    there a code in doc :

    // Use the firstSelect() and nextSelect()
    // methods to cycle through the objects.
    obj = scene.firstSelect();
    while(obj)
    {
    info(obj);
    obj = scene.nextSelect();
    }


    but it doesn't work in my lightwave although i would make a loop with the "CommandInput" command.

    thanx again

  6. #6
    Registered User mattbolton's Avatar
    Join Date
    Apr 2003
    Location
    KS, USA
    Posts
    208
    Here's the method I am using in a Script to export a RIB file:
    Code:
        obj = Mesh();
        while(obj) 
        { 
        info(obj); 
        obj = obj.next(); 
        }
        obj = Light();
        while(obj) 
        { 
        info(obj); 
        obj = obj.next(); 
        }
    Well, I am not using the info() function, but it serves to demonstrate that it's working.

  7. #7
    simply perfect

    thanx a lot

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •