[python-win32] SolidWorks & pywin32?

Tim Roberts timr at probo.com
Mon Nov 8 19:08:51 CET 2010


Samu Niveri wrote:
>
> I have created small app for SWx and encountered a minor problem with
> it. When trying to read properties from SWx-files using API-command:
> CustomPropertyManager.Get2(ByVal FieldName As String, ByRef ValOut As
> String, ByRef ReesolvedValOut As String)  I get results:
>
> CustPropMgr.Get2(CustProperty, ValOut, ResValOut)
>   File "<COMObject <unknown>>", line 2, in Get2
> pywintypes.com_error: (-2147352571, 'Type mismatch.', None, 2)

Those are output parameters.  You probably want this:
    (ValOut, ResValOut) = CustPropMgr.Get2(CustProperty)

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list