lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Dean <sessile <at> sbcglobal.net> writes:

> 
> I suspect that the table of coordinate pairs I'm passing is not
> being coerced into the "SafeArrayOfPoints" (of type 'Single') that
> AddPolyline requires. Can this be done with stock LuaCOM?
> 

Found a potential solution.

http://lists.luaforge.net/pipermail/luacom-developers/2009-September/000009.html

Applied the patch, adjusted my test program:

- local line = xlSheet.Shapes:AddPolyline({{25, 100}, {100, 150}})
+ local t = {Type="array|float",
+            Value={{25,100},{100,150},{150, 50},{25,100}}}
+ local line = xlSheet.Shapes:AddPolyline(t)

And successfully created a triangle!

Regards,
Dean.