I am trying to access the femap API, and having a bit of trouble. Here
is a simple example:
from win32com.client import Dispatch
femap = Dispatch("femap.model")
rc = femap.feAppGetActiveView(viewID)
This method, according to the documentation, is supposed to return a
long integer in viewID. If I do not define viewID, python returns the
error:
NameError: name 'viewID' is not defined
if I define viewID=0, python returns:
com_error: (-2147352571, 'Type mismatch.', None, 1)
I ran makepy and it generates a file, but I don't know if it is using
it or not. In the file, I can find the definition for the method:
def feAppGetActiveView(self, nViewID=pythoncom.Missing):
return self._ApplyTypes_(20376, 1, (3, 0), ((16387, 2),),
u'feAppGetActiveView', None,nViewID
)
To me it looks like win32 is not getting the information about the
variable types from com. Is there any way to get around this or am I
out of luck?
Thanks,
Jim
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32