--f46d044518872bdf3904b1f76757
Content-Type: text/plain; charset=ISO-8859-1

I am trying to use WIN32OLE to automate Microstation

I have a function

I have an instantiated object
 ole.ole_typelib // #<WIN32OLE_TYPELIB:Bentley MicroStation DGN 8.9 Object
Library>
app_type  ole_type    //  #<WIN32OLE_TYPE:_Application>
method  IN32OLE_METHOD.new(app,'Point3dFromXYZ')
method.params //   [#<WIN32OLE_PARAM:Ax>, #<WIN32OLE_PARAM:Ay>,
#<WIN32OLE_PARAM:Az>]
meth.return_type_detail   // ["USERDEFINED", "Point3d"]


(rdb:1) ole.ole_type
#<WIN32OLE_TYPE:_Application>
(rdb:1) app_type  le.ole_type
#<WIN32OLE_TYPE:_Application>
(rdb:1) WIN32OLE_METHOD.new(app_type,'Point3dFromXYZ')
#<WIN32OLE_METHOD:Point3dFromXYZ>
(rdb:1) meth  IN32OLE_METHOD.new(app_type,'Point3dFromXYZ')
(rdb:1) meth.params
[#<WIN32OLE_PARAM:Ax>, #<WIN32OLE_PARAM:Ay>, #<WIN32OLE_PARAM:Az>]
(rdb:1) meth.return_type_detail
["USERDEFINED", "Point3d"]


so it takes three values and returns a Point3d object.  How can I call this?

if I do

ole.Point3dFromXYZ(3,3,2)
pt  IN32OLE::ARGV
it gives me an array


(rdb:1) ole.Point3dFromXYZ(0,1,2)
nil
(rdb:1) pt  IN32OLE::ARGV
[0, 1, 2]
(rdb:1) pt.class
Array

(rdb:1) pointClass  le.ole_typelib.ole_classes.select{|c| c.name /point3d/i}.first
#<WIN32OLE_TYPE:Point3d>
(rdb:1) point.guid
"{7B10D1D8-7A13-4AB2-8119-DFB0606C0C56}"
(rdb:1) WIN32OLE.new(point.guid)
WIN32OLERuntimeError Exception: failed to create WIN32OLE object from
`{7B10D1D8-7A13-4AB2-8119-DFB0606C0C56}'
    HRESULT error code:0x80040154
      Class not registered
(rdb:1)

Thanks,

--f46d044518872bdf3904b1f76757--