Message 1 of 6

Not applicable
07-31-2015
09:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an add-in that was working fine before the latest update, that now won't load. I get the following error:
2015-07-31 11:17:42,958 __main__C%3A%2FUsers%2Fdaniel_obermiller%2FAppData%2FRoaming%2FAutodesk%2FAutodesk%20Fusion%20360%2FAPI%2FAddIns%2F: ERROR Failed: Traceback (most recent call last): File "C:\Users\daniel.obermiller\Documents\fusion-360\Add-Ins\my_addin.py", line 309, in run commandPolicyDef.toolClipFilename = getToolClipFileName() File "C:/Users/daniel.obermiller/AppData/Local/Autodesk/webdeploy/dev/feeb652b43527cc3143c29c11fc5b90c1f517401/Api/Python/packages\adsk\core.py", line 2855, in <lambda> __setattr__ = lambda self, name, value: _swig_setattr(self, CommandDefinition, name, value) File "C:/Users/daniel.obermiller/AppData/Local/Autodesk/webdeploy/dev/feeb652b43527cc3143c29c11fc5b90c1f517401/Api/Python/packages\adsk\core.py", line 51, in _swig_setattr return _swig_setattr_nondynamic(self,class_type,name,value,0) File "C:/Users/daniel.obermiller/AppData/Local/Autodesk/webdeploy/dev/feeb652b43527cc3143c29c11fc5b90c1f517401/Api/Python/packages\adsk\core.py", line 44, in _swig_setattr_nondynamic if method: return method(self,value) File "C:/Users/daniel.obermiller/AppData/Local/Autodesk/webdeploy/dev/feeb652b43527cc3143c29c11fc5b90c1f517401/Api/Python/packages\adsk\core.py", line 2935, in _set_toolClipFilename return _core.CommandDefinition__set_toolClipFilename(self, *args) RuntimeError: 3 : invalid argument value
The code looks like this
commandPolicyDef = ui.commandDefinitions.addButtonDefinition("Name", "Text", "", "./Resources/CommandOne") commandPolicyDef.toolClipFilename = getToolClipFileName() onCommandPolicyCreated = CommandPolicyCreatedEventHandler() commandPolicyDef.commandCreated.add(onCommandPolicyCreated)
Where getToolClipFileName just returns this
"./Resources/CommandOne/ToolClip.png"
Why am I getting this error now?
Solved! Go to Solution.