Re: [python-win32] passing array by reference (3)

2017-02-19 Thread Andreas Holtz
I missed your second questions: I have no experience with this. But it looks like one could wrap a Python-array in such a VARIANT object and hand this to CATIA, like: v = VARIANT(pythoncom.VT_BYREF | pythoncom.VT_ARRAY | pythoncom.VT_R4, 12*[1.]) Worth a try. Peter Enenkel schrieb am 19.02.2017

Re: [python-win32] passing array by reference (3)

2017-02-19 Thread Andreas Holtz
> is described here > <http://docs.activestate.com/activepython/3.4/pywin32/html/com/win32com/HTML/variant.html> > do you > think that is a viable option, or am I misunderstanding the purpose of this > construct? > > best regards > Peter Enenkel > > 2017-02-19 16:2

Re: [python-win32] passing array by reference (3)

2017-02-19 Thread Andreas Holtz
Hi Peter, >From Python call Catia.SystemService.Evaluate() and hand over a VB script that >does what you need but returns an Array. This works for all CATIA methods that use an Array as Input/Output-parameter. Regards Andreas Peter Enenkel schrieb am 17.02.2017 um 23:29: > Hello All, > > >

Re: [python-win32] printing landscape in Windows

2015-07-13 Thread Andreas Holtz
Think about using a batch print tool like http://www.verypdf.com/app/pdf-print-cmd/ or http://www.doc2prn.com/ I used the first one and implemented a Python script to create the command (it prints more than PDF). Some professional printer offer a webserver where you can upload the files. Check

Re: [python-win32] Oldest Python version for pywin32?

2015-04-20 Thread Andreas Holtz
I am one 2.5 user, too. Reason is, that thanks to 4Suite (which is a fantastic XML framework) we are bound to 2.5. I didn't find a better XML framework for Python but it's not gonna developed further and will not be ported to 3.x (reminds me of contacting Jeremy Kloth for a port to a newer Pytho

Re: [python-win32] Tkinter newbie

2015-03-02 Thread Andreas Holtz
or "ask niceley and show that you tried yourself to find a solution". Andreas Ethan Furman schrieb am 02.03.2015 um 23:21: > On 03/02/2015 01:48 PM, Andreas Holtz wrote: > >> And perhaps you'll ask yourself, why you wanted to waste the precious time >>

Re: [python-win32] Tkinter newbie

2015-03-02 Thread Andreas Holtz
Hi John, seems you lack basic understanding of Python (and perhaps programming languages at all?). I recommend you reading a book like "Learning Python" from Mark Lutz or check some courses on https://wiki.python.org/moin/BeginnersGuide/Programmers Then you will learn the differences between att

Re: [python-win32] howto get the typename of a comobject

2015-02-05 Thread Andreas Holtz
Hi Anton, I think you need to rely to generated Python-Com-objects aka early binding. See http://timgolden.me.uk/python/win32_how_do_i/generate-a-static-com-proxy.html for details. There was another page explaining the differences really nicely between late and early binding and how to enforce t

Re: [python-win32] Referring to default (unnamed) property

2014-05-11 Thread Andreas Holtz
Hi £ukasz, when you use a COM-Interface via VB for example things like foo.bar(0) = "foo" are possible (as I just read these are properties). In Python this syntax is not working. Instead, getters and setters are generated by PyWin. I guess somewhere (probably in the files generated by Dispat

Re: [python-win32] Printing PDFs without external tools

2014-03-05 Thread Andreas Holtz
schrieb Tim Roberts am 04.03.2014 18:35: I should not have doubted you. ;) He be pardoned! :-D To do this, you will not go through the normal printing services. You need to send the PDF files directly to the printer as if it were a file server. The printer serves HTTP and FTP, and that's ho

Re: [python-win32] Windows automation basics

2014-03-05 Thread Andreas Holtz
Hi Alan, 1.) Try to get the documentation of the program. ;-) Or check the registry by searching for "YourApplication.Application" or just try it with win32com.client.Dispatch("YourApplication.Application") in Python with win32com installed. Checkout MakePy from PythonWin (installs with the wi

Re: [python-win32] Printing PDFs without external tools

2014-03-03 Thread Andreas Holtz
3rd party software (like Ghostscript). But I don't know how... Thanks Andreas schrieb Tim Roberts am 04.03.2014 05:52: On Mar 3, 2014, at 1:14 PM, Andreas Holtz wrote: I need want to print PDF files without the usage of tools like Adobe, Foxit, etc. THe printer does understand PDF files

[python-win32] Printing PDFs without external tools

2014-03-03 Thread Andreas Holtz
Hi guys, I need want to print PDF files without the usage of tools like Adobe, Foxit, etc. THe printer does understand PDF files, but I have no idea how to do it. I played around with win32api.ShellExecute(0, "print", pdf, None, ".", 0) but I am missing the possibilities to change layout and p

Re: [python-win32] Dropping support for Python 2.3?

2013-04-28 Thread Andreas Holtz
I didn't check it but will have a look. Thank you very much :) Andreas schrieb Amaury Forgeot d'Arc am 29.04.2013 00:38: 2013/4/29 Andreas Holtz mailto:a.ho...@gmx.net>> I'm bound to Python 2.5. I make heavy usage of 4Suite which is not supported for Pyth

Re: [python-win32] Dropping support for Python 2.3?

2013-04-28 Thread Andreas Holtz
I'm bound to Python 2.5. I make heavy usage of 4Suite which is not supported for Python 2.6+ so I can not upgrade :( Or does anyone know a good XML lib that support xpath? Regards Andreas schrieb Michael Manfre am 26.03.2013 14:08: Anyone running a no longer supported version of Python on Win

Re: [python-win32] win32api: How to send WM_SIZING to a Window

2010-09-30 Thread Andreas Holtz
am 30.09.2010 23:12: Andreas Holtz wrote: The program is CATIA from Dassault. They have a parameter to control the refresh of the display (CATIAApplication.RefreshDisplay = False) but this only works within their macro engine. For details see here: http://ww3.cad.de/foren/ubb/Forum137/HTML/001099

Re: [python-win32] win32api: How to send WM_SIZING to a Window

2010-09-30 Thread Andreas Holtz
30.09.2010 20:14: Andreas Holtz wrote: I have a program which I can control via COM and Python's win32com. This program will visualize a big tree, which gets created by my COM-commands. The problem is, that after each modification of the tree (like insert), the program refreshes its display

[python-win32] win32api: How to send WM_SIZING to a Window

2010-09-30 Thread Andreas Holtz
Hello, I have a program which I can control via COM and Python's win32com. This program will visualize a big tree, which gets created by my COM-commands. The problem is, that after each modification of the tree (like insert), the program refreshes its display area. Accidentally I discovered whe

[python-win32] Array and CATIA

2007-05-07 Thread Andreas Holtz
Hello, we have a problem to pass an array to the GetComponents()-Method of CATIA-COM-Object. The method expects an array as method-parameter. The result will be written in the given array. The array must be initialized with 12 elements. You can't pass an empty array/dictionary to the method.