Hello,
First of all, I suppose most users on this list would have no interest in this
topic. But I'm posting it anyway because it has puzzled for quite a while and
finally thanks to Thomas who found a solution. I also want to thank Ed Blake who
showed me a solution with win32com.
The question started with how to pass the right parameter to AutoCAD's AddPoint
function. It is supposed to be Variant (three-element array of doubles)
according to the VBA API reference. The array.array function was the answer:
import array
import comtypes.client
acadApp = comtypes.client.GetActiveObject("AutoCAD.Application")
ms = acadApp.ActiveDocument.ModelSpace
pt = array.array('d', [0,0,0])
ms.AddPoint(pt)
print "Done."
--
Kelie
UliPad <http://code.google.com/p/ulipad/> is my Python editor.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
comtypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/comtypes-users