jointOrigins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
.... another exception needed ... from log file ...
-------------------------------------------------------------------------------------------
CodeLine' if( comp.jointOrigins )
Traceback (most recent call last):
if( comp.jointOrigins 😞
File "..../Api/Python/packages\adsk\fusion.py", line 31437, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, Component, name)
File "..../Api/Python/packages\adsk\fusion.py", line 57, in _swig_getattr
raise AttributeError(name)
AttributeError: jointOrigins
----------------------------------------------------------------------------------------------
As a clarification ,the component in this case does not posses jointOrigin ... and I know F360 team recommendation ... just use magical "try" and see what happens.
Yes it is a solution ... but looking from broader perspective and finding so many such "field's mines" in API ... the safe code would require an exception by an exception by an exception ... by ... lines of code. It is not a good practice at high level programming.
Would not be cleaner to manage it within API itself just by allocating NULL pointers to objects during initialization/construction phases?
There might be exceptional exception excuses ... but too many, make them a rule ... so the exception as a name is misleading.
With Regards
MichaelT
MichaelT