Re: [python-win32] problem AddLine AutoCAD win32com.client

2012-02-01 Thread Dan Glassman
Daniel, I've tested a prerelease version of pywin32 that contains the new win32com.client.VARIANT class and it works well with AutoCAD. Once released, you can write something like this: import win32com.client import pythoncom def POINT(x,y,z): return win32com.client.VARIANT(pythoncom.VT_ARR

Re: [python-win32] problem AddLine AutoCAD win32com.client

2012-02-01 Thread DANIEL POSE
I have used array module because it worked with comtypes module. If I use simple list it doesn't work with comtypes nor pywin32. If I use: pt1 = [0.0,0.0,0.0] pt2 =[1.0,1.0,0.0] Then Python responds: Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\

Re: [python-win32] problem AddLine AutoCAD win32com.client

2012-02-01 Thread Mark Hammond
Re-added the python-win32 list - please keep replies on list. Your code uses: > pt1 = array.array('d', [0.0,0.0,0.0]) > pt2=array.array('d',[1.0,1.0,__0.0]) But these aren't supported by pywin32 in the way you expect - what happens if you change this to: pt1 = [0.0,0

Re: [python-win32] problem AddLine AutoCAD win32com.client

2012-01-31 Thread Mark Hammond
Sadly not many people have access to autocad so it is hard to test. What errors do you get using win32com? Mark On 1/02/2012 5:11 AM, DANIEL POSE wrote: Hello, Recently I try to write some code to automate AutoCAD from Python. I have to draw lines from Python using win32com.client module, but

[python-win32] problem AddLine AutoCAD win32com.client

2012-01-31 Thread DANIEL POSE
Hello, Recently I try to write some code to automate AutoCAD from Python. I have to draw lines from Python using win32com.client module, but I obtain error. By other hand I solved the problem using comtypes module. However, If I try to obtain block attributes information, comtypes doesn't work but