I am trying to connect to Bricscad using sys.COM. I can create the instance, but when I try and use a creation method I am getting an error regarding a parameter I am passing. The parameter is a three value array representing x,y and z values. If I create the array as a Lua table and pass I receive an error saying:
bad argument #1 to 'AddLine' (COM instance expected, got table)
If doing the save in VBA, the three value arrays need to be typed as Variants. My code snip is below:
bricsApp = sys.COM("BricscadApp.AcadApplication",false)
bricsApp.visible = true
cadDoc = bricsApp.ActiveDocument
modSpace = cadDoc.ModelSpace
startPoint = {0,0,0}
endPoint = {1,1,1}
lineObj = cadDoc.ModelSpace:AddLine(startPoint, endPoint)
Is there some method I need to be using to convert the Lua tables to COM variants? Any help would be really appreciated!