Hi Thomas, First of all thank you for the response, I really need to get around this issue.
The com object, I am dispatching, is provided by Rhinoceros CAD package. The evaluation version of Rhinoceros can be obtained from here - http://download.rhino3d.com/rhino/4.0/evaluation/download/. The evaluation is quite liberal, since you can use it as much as you like, but you are restricted to 15 saves only. I am using this object to control VB functions provided by Rhino scripting interface. You can reproduce the problem by: 1. R = CreateObject("Rhino4.Application") 2. RS = R.GetScriptObject 3. RS.AddPoint([10.0,10.0,10.0]) At this point I should obtain all functions provided by RhinoScript type library as methods, but all I get are attributes e.g. >>> RS.AddPoint([10.0,10.0,10.0]) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: 'NoneType' object is not callable , where RS.AddPoint() is the function I am calling. I presume that all functions in R.GetScriptObject are flagged as attributes instead of methods, note that R.visible =True works. In PyWin32 I used to flag each attribute as methods with _FlagAsMethod(attribute name) function. I hope I was able to describe the problem as much as I can. Thanks, Alkin On 30 March 2010 18:31, Thomas Heller <thel...@ctypes.org> wrote: > Аlkin Nasuf schrieb: > > > Hello everyone, > > > > > > I've recently switched from pywin32 to comtypes, since comtypes can > > > transform tuples to one-dimensional safearrays. > > > My problem is that when I dispatch the object using comtypes its > properties > > > are not correctly differentiated e.g some methods are flagged as > attributes, > > > but they are methods. > > > In pywin32 this is solved by "_FlagAsMethod" function, which flags > selected > > > attribute as method. > > > Does anybody know if I can do the same thing in comtypes? > > > If not how I can get around this problem i.e. how I can flag some > properties > > > in comtypes as methods? > > Can you describe the problem in more detail? > > For example, post the IDL code or the type library that contains the > description > for these methods? > > Or, even better, is the com object available somewhere so that I can > reproduce > and examine the problem? > > -- > Thanks, > Thomas > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > comtypes-users mailing list > comtypes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/comtypes-users >
<<attachment: TypeLibrary.png>>
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users