[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [femm] [LUA] savefemmfile



Tielman Slabbert wrote:

Hallo

I am still new to FEMM, and would like to know a little bit more about LUA:

I tried to automatically generate a filename, and save the FEMM file using the command savefemmfile("c:\\directory\\subdirectory\\filename.femm")

The directory must stay the same, and my automatically generated filename was an Integer number. (I tried various methods to mix the string with the variable, eg. ...subdirectory\\",filename,".femm")
However, it did not work, and FEMM only returned an error. It seems as if there is a trick in mixing variables with strings.


I would be very gratefull if anyone could provide me with an answer.

Thanks
Ivan Slabbert

The operator that is used to catenate various objects together into one string is two periods (i.e. ..) An example of this syntax would be:


i=1
savefemmfile("c:\\temp\\junk" .. i .. ".fem")

In this example, where the variable i is used to index the file number, and the file is saved to c:\temp\junk1.fem

Dave.
--
David Meeker
email: dmeeker@xxxxxxxx
www: http://femm.berlios.de/dmeeker