AutoCAD 2008 typelib:
[id(0x00000403), helpstring("Sets the extended data (XData) associated with an 
object"), helpcontext(0x00010231)] void SetXData(
                [in] VARIANT XDataType, 
                [in] VARIANT XDataValue);

Taken from Ole2View.
>From Autocad Developer Help:
Signature 

object.SetXData XDataType, XData 

Object

All Drawing Objects , AttributeReference, Block, Dictionary, DimStyle, Group, 
Layer, Linetype, PlotConfigurations, RegisteredApplication, TextStyle, UCS, 
View, Viewport; XRecord
The object or objects this method applies to. 

XDataType

Variant (array of short); input-only 

XData

Array of Variant; input-only 

Remarks 

Extended data is an example of instance-specific data created by applications 
written with ObjectARX or AutoLISP. This data can be added to any entity. This 
data follows the entity's definition data and is maintained in the order in 
which it was saved into the document. (AutoCAD maintains this information but 
doesn't use it.) 

Test (on an old version of comtypes):
>>> line.SetXData(array.array("i", [1001, 1070]), ['Test_Application', 600])
Traceback (most recent call last):
  File "<input>", line 1, in <module>
COMError: (-2145320939, None, (u'Invalid argument type in SetXData method', 
u'AutoCAD.Application', u'C:\\Program Files\\AutoCAD Civil 3D Land Desktop 
Companion 2008\\HELP\\OLE_ERR.CHM', -2145320939, None))

Ed Blake
--- On Fri, 7/18/08, Kelie <[EMAIL PROTECTED]> wrote:

> From: Kelie <[EMAIL PROTECTED]>
> Subject: Re: [comtypes-users] How to create array of variants?
> To: comtypes-users@lists.sourceforge.net
> Date: Friday, July 18, 2008, 12:53 AM
> Thomas Heller <[EMAIL PROTECTED]> writes:
> 
> > I think Suraj is close.  Can you look up somhow the
> IDL definition of the 
> > SetXData method, or posth the corresponding line from
> the generated code?
> > 
> 
> Thank you Thomas. Where can I look up the IDL definition?
> What does IDL mean?
> This is from the generated code in comtypes/gen directory:
> 
>     COMMETHOD([dispid(1027), helpstring(u'Sets the
> extended data (XData)
> associated with an object')], HRESULT,
> 'SetXData',
>               ( ['in'], VARIANT,
> 'XDataType' ),
>               ( ['in'], VARIANT,
> 'XDataValue' )),
> 
> > Does this code work?
> > 
> >   line.SetXData([1001, 1070],
> ['Test_Application', 600])
> > 
> 
> It doesn't work and gives this error:
> _ctypes.COMError: (-2145320939, None, (u'Invalid
> argument type in SetXData 
> method',
> 
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> comtypes-users mailing list
> comtypes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/comtypes-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to