Author Topic: Lua scripting engine in Autocad  (Read 8240 times)

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Lua scripting engine in Autocad
« Reply #15 on: July 28, 2010, 11:30:13 PM »
whoa that ...wait a minute?! If SDI =1 then the drawing that "contained" (I cant think of a better word) the lisp that launched the Luna script would die right?

This sounds cool.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

pkohut

  • Guest
Re: Lua scripting engine in Autocad
« Reply #16 on: July 28, 2010, 11:36:39 PM »
whoa that ...wait a minute?! If SDI =1 then the drawing that "contained" (I cant think of a better word) the lisp that launched the Luna script would die right?

This sounds cool.

Probably.

DocShells.h
Code: [Select]
#pragma once
#include "LuaScript.h"
namespace LuaScriptExtension
{
class LuaScript;
class CDocShells
{
public:
CDocShells(void);
virtual ~CDocShells(void);
LuaScript * GetLuaScript(void);

protected:
LuaScript m_luaScript;
};
extern AcApDataManager<CDocShells> docLuaShells; // makes CDocShells MDI aware in Autocad.
}

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8718
  • AKA Daniel
Re: Lua scripting engine in Autocad
« Reply #17 on: July 29, 2010, 06:14:21 AM »
how about instead of adding yet another scripting language, extend AutoLisp a bit?  Wouldn't it be the bomb to have goodies like defclass and defstruct, maybe borrow stuff  from CLISP

pkohut

  • Guest
Re: Lua scripting engine in Autocad
« Reply #18 on: July 29, 2010, 07:34:28 AM »
how about instead of adding yet another scripting language, extend AutoLisp a bit?  Wouldn't it be the bomb to have goodies like defclass and defstruct, maybe borrow stuff  from CLISP

Last August I did some preliminary investigation into using Lisp Plus Plus or XLisp-Plus as a replacement for VLisp, http://www.theswamp.org/index.php?topic=30070.msg356592#msg356592, with the intent of making a better IDE/debugger. While probably doable, lost interest because of some technical hurdles and lack of personal interest in Lisp.

Having a scripting language not tied to .Net CLR, com, platform, or The Desk, would have many benefits. Lua is small, extensible, fast, and LuaJit is as fast as Javascript. Beyond that, I think the goals are easily obtainable, much more so than extending or replacing VLisp. There is also a clear distinction between 'pick your non-lisp scripting language' and Auto/Visual Lisp. A cleaner, simpler, scripting language would also appeal to users that find the Lisp syntax daunting.

Most important to me, is personal interest, curiosity, and fun, cause nobody is going to open up their checkbook and be an open source sponsor for the project.

Anyways, I'd be more than happy to chat about extending or replacing Autolisp in a new thread, share what I learned last year, along with the code gathered and written.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8718
  • AKA Daniel
Re: Lua scripting engine in Autocad
« Reply #19 on: July 29, 2010, 09:38:14 AM »
I know, and It's your right to have a little fun. I guess after seeing several of these projects come and go half complete (guilty here too), I thought I might make the suggestion. Anyway Lua does look neato  :-)

pkohut

  • Guest
Re: Lua scripting engine in Autocad
« Reply #20 on: July 30, 2010, 08:44:33 AM »
Nothing there yet, but created a project "LuaAzul" on Google Code yesterday. Late next week will be the soonest any code can be posted, which will be some glue and initial foundation code.  See were it goes from there.

http://code.google.com/p/luaazul/

pkohut

  • Guest
Re: Lua scripting engine in Autocad
« Reply #21 on: August 03, 2010, 07:46:12 AM »
Had a nice, restful, long weekend, yeah, and started work on the code again Monday.

Had to get over a hurdle with the Unicode extension (read as 'It was kicking my ***'), but I think it's figured out. Still looking towards the end of the week before first code is posted.