Hi, if you can post the version of comtypes you are using and the how you got the line entity reference I can try and figure out what to do with it ;)
It might be useful to know what version of AutoCAD you are using too. Ed Blake --- On Wed, 6/25/08, Kelie <[EMAIL PROTECTED]> wrote: > From: Kelie <[EMAIL PROTECTED]> > Subject: [comtypes-users] How to process the argument (type VARIANT) in an > event handler? > To: comtypes-users@lists.sourceforge.net > Date: Wednesday, June 25, 2008, 5:36 PM > Hello, > > I have this function in an event handler: > > def ObjectAdded(self, this, entity): > print "Object %s added in %s." % > (str(entity), self.doc.Name) > print type(entity) > > and this is the output: > > Object VARIANT(vt=0x4009, byref(<POINTER(IAcadLine) > ptr=0x28c7e4 at e8d3f0>)) > added in 04_C4-C10_PLANS.dwg. > <class 'comtypes.automation.tagVARIANT'> > > I have no idea what vt=0x4009 stands for here. My question > is how do I access > the 2nd part of this VARIANT so I can get to the LINE > object? > > Thanks! > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > comtypes-users mailing list > comtypes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/comtypes-users ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users