[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FEMM] some lua questions
RONALD.SALESKY@xxxxxxxxxxx wrote:
Hello,
Is there a way to access the FEMM materials library from a LUA script?
There isn't a way to access the materials library. However, you can get
the same effect by defining a file that contains just the materials that
you want and loading it at the beginning of your Lua script to get
definitions of the materials that you need.
Also, is there a way to pass variables from a LUA script running under
the FEMM editor to the FEMM viewer?
Yes, although in FEMM 3.3 and lower, this is sort of a kludge. Check
the documentation of the runpost command in the manual--it shows how to
pass a small amount of information via the call to run the
postprocessor. Otherwise, you can use a temporary file to pass
variables (i.e. write them in the preprocessor, read them in the
postprocessor). The Lua scrips on the examples page at
http://femm.foster-miller.com/examples.htm use the temporary file method.
In v4, there is only one instance of Lua that controls both the pre- and
post-processor at the same time, eliminating the problem of passing
information from the preprocessor tothe postprocessor.
Dave.