Client side COM and Python Problem

M

Mark

Hey Guys, Im new to working with com but i only want to do one thing.

I have activestate python and am trying to get python to run a simple
function in a com enabled 3d program called 3dsmax. If i try and
execute a function over the com interface it works fine as long as i
dont try and run the function with an argument. when i run it with an
argument like so. "o.mypingmax("test string")" it gives me an error in
my client app and an error in python.

please help me understand this error and what i am doing wrong? I have
tried a similar script in another language and it works. but python
does not like it.

#code
import win32com.client
o = win32com.client.Dispatch("MAX.Application.8")
o.mypingmax("test string")

# Python Error

Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python24\lib\site-packages\win32com\client\dynamic.py", line
491, in __getattr__
raise pythoncom.com_error, details
com_error: (-2147220992, 'CONNECT_E_NOCONNECTION', None, None)

#client Application error (3dsmax script output)

-- Argument count error: mypingmax wanted 1, got 0
during OLE automation function call

Sorry if its blindingly obvious but i just cant work out what is going on.

Cheers,

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,320
Members
48,004
Latest member
KelseyFors

Latest Threads

Top