[pywin32-bugs] [ pywin32-Bugs-1820151 ] Solidworks API pass-by-reference
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-04-06 02:03:12
|
Bugs item #1820151, was opened at 2007-10-26 03:29 Message generated for change (Settings changed) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1820151&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pythonwin Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Joe Foley (foley) Assigned to: Nobody/Anonymous (nobody) Summary: Solidworks API pass-by-reference Initial Comment: When you run makepy on the SolidWorks api, it gets confused on any of the methods that use pass-by reference. In particular, to anyone trying to do automation using OpenDoc6 runs into the problem of the errors and warnings arguments which are pass-by reference being considered non-optional, even though they are return values. A fairly in-depth discussion and possible workarounds can be found at: http://ephemeralvalue.com/?p=16 and http://mail.python.org/pipermail/python-list/2002-December/175880.html Is there a way to make makepy not get confused on these methods, or is this just a function of the SolidWorks API? ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2008-04-06 11:59 Message: Logged In: YES user_id=14198 Originator: NO The solution would seem to be to call the function like: model, errors, warnings = sw.OpenDoc6( 'cube.sldprt', constants.swDocPART, constants.swOpenDocOptions_Silent, '', pythoncom.Missing, pythoncom.Missing ) ? Please reopen this if I'm missing something. Sadly, I can't change the defaults as that would cause many other things to break... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1820151&group_id=78018 |