From: Dominic Sisneros Date: 2011-11-18T09:27:35+09:00 Subject: WIN32OLE return type USERDEFINED --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 // # app_type = .ole_type // # method = WIN32OLE_METHOD.new(app,'Point3dFromXYZ') method.params // [#, #, #] meth.return_type_detail // ["USERDEFINED", "Point3d"] (rdb:1) ole.ole_type # (rdb:1) app_type = ole.ole_type # (rdb:1) WIN32OLE_METHOD.new(app_type,'Point3dFromXYZ') # (rdb:1) meth = WIN32OLE_METHOD.new(app_type,'Point3dFromXYZ') (rdb:1) meth.params [#, #, #] (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 = WIN32OLE::ARGV it gives me an array (rdb:1) ole.Point3dFromXYZ(0,1,2) nil (rdb:1) pt = WIN32OLE::ARGV [0, 1, 2] (rdb:1) pt.class Array (rdb:1) pointClass = ole.ole_typelib.ole_classes.select{|c| c.name =~ /point3d/i}.first # (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--