LibreCAD / LibreCAD_3

LibreCAD 3 is a next generation 2D CAD application written to be modular, with a core independent from GUI toolkits. Scripting is possible with Lua.
http://librecad.org
Other
305 stars 102 forks source link

Way to access document from LuaScript UI #232

Closed rupakbajgain closed 5 years ago

rupakbajgain commented 5 years ago

Is there any way to access document via. in luascript widget? I think it is needed becz. it may be helpful for debugging and other purposes. I mean to write code like

lineBuilder = lc.builder:LineBuilder() modify :- lineBuilder add line to document,

feragon commented 5 years ago

Document can be accessed with the document global variable. It is defined here: https://github.com/LibreCAD/LibreCAD_3/blob/master/lcadluascript/lclua.cpp#L72