PDA

View Full Version : can i create file with lscript



vbk!!!
01-08-2004, 10:51 AM
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

Blochi
01-10-2004, 03:23 PM
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

vbk!!!
01-11-2004, 06:14 AM
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

Blochi
01-11-2004, 06:44 AM
File Object Agent .... sorry for beeing so short...
See the LScript Reference Manual page 5, and Chapter 13.

-Blochi

vbk!!!
01-11-2004, 07:00 AM
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

mattbolton
01-11-2004, 08:22 AM
Here's the method I am using in a Script to export a RIB file:


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.

vbk!!!
01-11-2004, 04:24 PM
simply perfect

thanx a lot