We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Difference between revisions of "LibreCAD 3 - Lua Scripting"

From LibreCAD wiki
Jump to: navigation, search
(Created page with " == LibreCAD Scripting with lua == One of the scripting languages LibreCAD support's is //www.lua.org:Lua. Lua is the default scripting language and will be available for...")
(No difference)

Revision as of 03:15, 12 April 2014

LibreCAD Scripting with lua

One of the scripting languages LibreCAD support's is [[1]]. Lua is the default scripting language and will be available for most simple scripting needs.


Example:

.. draw a line from coordinate 0,0 to coordinate 100,00
 l=Line(Coord(0,0), Coord(100,100));
d=app.currentDocument()
ce = CreateEntities(d, "0");
ce:append(l)
ce:execute()