[python-win32] VARIANT parameter

Dan Glassman dan.glassman at gmail.com
Fri Oct 12 15:20:57 CEST 2012


On Fri, Oct 12, 2012 at 6:27 AM, Matteo Boscolo <matteo.boscolo at boscolini.eu
> wrote:


> sometimes you need a combination of variant type like
> win32com.client.VARIANT(VT_VARIANT | VT_NULL,None)
>

In this case, AutoCAD and Intellicad want:

filterType = VARIANT(pythoncom.VT_ARRAY | pythoncom.VT_I2, [0])
filterData = VARIANT(pythoncom.VT_ARRAY | pythoncom.VT_VARIANT, ['LINE'])

-drg

On Fri, Oct 12, 2012 at 6:27 AM, Matteo Boscolo <matteo.boscolo at boscolini.eu
> wrote:

>
> sometimes you need a combination of variant type like
> win32com.client.VARIANT(VT_VARIANT | VT_NULL,None)
>
> it's better to pass tuple instead of list .. may be this could help ..
>
> regards,
> Matteo
>
> Il 12/10/2012 13:13, Johannes Frank ha scritto:
>
> Hello,
>
> I am trying to access an AutoCAD clone, intellicad, via win32com. I
> managed to access, but now I am stuck.
> AutoCAD as well as Intellicad want
>
>         filterType=VARIANT(pythoncom.VT_ARRAY,[0])
>         filterData=VARIANT(pythoncom.VT_ARRAY,['LINE'])
>         dwg.ActiveSpace = cnsts.vicModelSpace
>
> sel.Select(cnsts.vicSelectionSetAll,None,None,filterType,filterData)
>
> I get an error:
>
> MemoryError: CreatingSafeArray
>
> In VB6 I pass two variant arrays in VB.NET 2010 I pass an integer array
> and an object array.
>
> Now how do I find out how to pass this parameter in pythoncom / win32com
>
> Thank you for your attention
>
> Kind Regards
>
> --
> Dipl.-Ing. (FH) Johannes-Maria Frank
> Bildungsberater
> Königsberger-Str. 19b
> 76139 Karlsruhe
> Tel. +49(170) 3833849
> e-mail: jmfrank63 at gmail.com
>
>
>
> _______________________________________________
> python-win32 mailing listpython-win32 at python.orghttp://mail.python.org/mailman/listinfo/python-win32
>
>
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20121012/6c6fb4f9/attachment.html>


More information about the python-win32 mailing list