I'm just learning Ruby. I'd like to be able to control AutoCAD but
I get a "method_missing" error. I did a search on this group and on the
web but couldn't find a solution. Does anyone know of a solution or a
workaround?

#------------------------- ERROR -------------------------------

bash-2.05b$ ruby ./act.rb
../act.rb:16:in `method_missing': AddLine (WIN32OLERuntimeError)
OLE error code:80070057 in <Unknown>
<No Description>
HRESULT error code:0x80020009
Exception occurred.       from ./act.rb:16
bash-2.05b$

#------------------------- CODE --------------------------------

require 'win32ole'

acad = WIN32OLE.new("autocad.application.16")
acad.Visible = true
thisDrawing = acad.Application.Documents.Add("acad.dwt")
thisDrawing.Application.ZoomAll

thisDrawing.Layers.Add("GEOMETRY_BOTTOM")
thisDrawing.Layers.Add("GEOMETRY_SIDE")
thisDrawing.Layers.Add("CENTERLINE_BOTTOM")

p1 = [0.0, 0.0, 0.0]
p2 = [10.0, 10.0, 0.0]
# Error occurs here...
thisDrawing.PaperSpace.AddLine(p1, p2)