Greetings all.

I posted this a week ago and had no response, so I'll try again.  Any information would be helpful, even if it's just "that all looks right, no idea why it doesn't work."  I'll gladly provide more info if needed, or try a different statement of the problem if it isn't clear.

Thanks,
Greg Antal
Gregory W. Antal
Senior Technical Advisor
ATA Engineering, Inc.
11995 El Camino Real, Suite 200	
San Diego, CA  92130
www.ata-e.com

[EMAIL PROTECTED]
858-480-2072  (Phone)
858-792-8932  (Fax)


Greg Antal wrote:
Gentlemen:

I need to work with a TLB for a finite element pre/post processor called Femap.  Its API was built for Visual Basic, and it uses output arguments in many of its functions/methods.  Methods with only input arguments and return values work great, but I can't get anywhere with those that have output arguments.

Here's the documentation for a method 'Count' of the class 'feSelector':
Count ( entityType, nSelected )
Description:
  This method returns the number of entities of a given type that are currently selected
Input:
    INT4 entityType
        The entity type to query (node, element, etc)
Output:
    INT4 nSelected
        The number of "entityType" entities that are currently selected.
Return Code:  None


Here's the code makepy.py generated for this method:
    def count(self, entityTYPE=defaultNamedNotOptArg, nSelected=pythoncom.Missing):
        return self._ApplyTypes_(20002, 1, (3, 0), ((3, 1), (16387, 2)), 'count', None,entityTYPE
            , nSelected)


>From all the documentation I've been able to find (including the archives of this mailing list back to September 2005), my Python call should look like this:
nSel = zSelect.count(eFemTyps.FT_NODE)

When I try that, I get:
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "<COMObject feSelector>", line 2, in count
com_error: (-2147352561, 'Parameter not optional.', None, None)


I've tried supplying the extra parameter, but that results in a 'type mismatch' error, which probably doesn't surprise anyone.  Can someone help?

Thanks,
Greg Antal

_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to