Thomas Heller wrote: > Andrew MacIntyre schrieb: > > Nick Collier wrote:
> > I've not used comtypes as it currently exists, but from the snippet: > > > >> (<class 'ctypes.HRESULT'>, '_get_FeatureClass', (<class > >> 'ctypes.LP_POINTER(IFeatureClass)'>,), ((10, 'fclass'),), > ('propget', > >> u"The layer's feature class."), u" The layer's feature class.") > >> > >> (<class 'ctypes.HRESULT'>, 'FeatureClass', (<class > 'comtypes.POINTER > >> (IFeatureClass)'>,), ((1, 'fclass'),), ('propputref', > u"The layer's > >> feature class."), u"The layer's feature class.") > > > > ... the FeatureClass method is the property put, so you must use > > _get_FeatureClass() to retrieve the IFeatureClass you seek. > > Well, apart from the propputref bug, comtypes exposes COM properties > as Python properties. So, when the bug is fixed, > 'feature.FeatureClass' should work. My comment was only intended to apply to Nick's specific case as a work around, as I knew that COM properties are normally reflected as properties in comtypes. > > I'm still using the COM support in ctypes 0.6.3 (positively > ancient!) > > and have built a wrapper layer making it more VB like on > top. However > > it's a hand built wrapping which I extend every time I need a new > > coclass or interface. At some point I'll get my boss to agree to > > updating... but for the time being it works well. > > I have skimmed the conversation that we had 2.5 years ago on the > ctypes-users list, and it seems that nearly all of your suggestions > are now implemented ;-). > Some in a slighlty different way, though. But - you should definitely > upgrade. Is it really that long ago? I've been itching to try comtypes out, but so far my boss has considered it a low priority issue. I'm expecting to upgrade to ArcGIS 9.2 in the new year so might be able to slip it through then, as I'm still currently using Python 2.2.3 and want to upgrade to 2.5.x or 2.6. Many thanks for both ctypes & comtypes! Regards, Andrew. -------------------------> "These thoughts are mine alone!" <--------- Andrew MacIntyre National Licensing and Allocations Branch tel: +61 2 6219 5356 Inputs to Industry Division fax: +61 2 6253 3277 Australian Communications & Media Authority email: [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users