Import STL file from my own Script

Is possible to run from my own script the native function import STL file?.

What i mean is to encode file->import->STL… in my script instead of to do it manually.

Thank you.

I have tried to find python file in the .blender/script folder but i couldn’t find some file realative to import stl files.

if i test the instruction load(pathofmystlfile.stl) will it worK?

How does one import an stl or cad file into blender?

What version of blender?
You have written an STL importer that you would like to be able to use from File->Import ?
if you use blender 2.5x then have a look at my minimal importer and stick your code into the appropriate place :
http://blenderartists.org/forum/showthread.php?t=205022&p=1760862&viewfull=1#post1760862
that will give you an idea.
3) i don’t know, try it …if it gives errors show the code, and error messages if you want help.

In Blender 2.49 you can load an stl file simply with Blender.Load(‘myfile.stl’)

I will try it

forgive my stupidity, but when you say “Blender.Load(‘myfile.stl’)” does that mean, Open Blender, then file, Open, myfile.stl and the 3D picture of the stl file should open on the blender screen? if so, I’m doing something wrong, b/c its not there.

Does somebody have an answer?

I think that Blender.Load is a Python instruction that you can include in a script.