Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

[Bug] TableCommandInput.minimumVisibleRows runtime error if > 4.

thomasa88
Advocate

[Bug] TableCommandInput.minimumVisibleRows runtime error if > 4.

thomasa88
Advocate
Advocate

TableCommandInput.minimumVisibleRows cannot be set higher than 4. An error is thrown if I set it to 5.

 

Reproduce:

* Grab Command Inputs API sample

* Make sure you have the resources: image.png, button, One, Two (I reported the broken link on the webpage)

* Insert "tableInput.minimumVisibleRows = 5" after "addRowToTable(tableInput)" on line 260.

* Run the script

 

---------------------------
Fusion 360
---------------------------
Failed:
Traceback (most recent call last):
File "C:/Users/Thomas/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/Scripts/Command Inputs API Sample/Command Inputs API Sample.py", line 260, in notify
tableInput.minimumVisibleRows = 5
File "C:/Users/Thomas/AppData/Local/Autodesk/webdeploy/production/b5edf6a9efeacc46b6646b394c91bddfaa2f2d05/Api/Python/packages\adsk\core.py", line 27250, in <lambda>
__setattr__ = lambda self, name, value: _swig_setattr(self, TableCommandInput, name, value)
File "C:/Users/Thomas/AppData/Local/Autodesk/webdeploy/production/b5edf6a9efeacc46b6646b394c91bddfaa2f2d05/Api/Python/packages\adsk\core.py", line 51, in _swig_setattr
return _swig_setattr_nondynamic(self,class_type,name,value,0)
File "C:/Users/Thomas/AppData/Local/Autodesk/webdeploy/production/b5edf6a9efeacc46b6646b394c91bddfaa2f2d05/Api/Python/packages\adsk\core.py", line 44, in _swig_setattr_nondynamic
if method: return method(self,value)
File "C:/Users/Thomas/AppData/Local/Autodesk/webdeploy/production/b5edf6a9efeacc46b6646b394c91bddfaa2f2d05/Api/Python/packages\adsk\core.py", line 27379, in _set_minimumVisibleRows
return _core.TableCommandInput__set_minimumVisibleRows(self, *args)
RuntimeError: 3 : invalid value

---------------------------
OK
---------------------------

 

1 Like
Reply
Accepted solutions (1)
470 Views
3 Replies
Replies (3)

nnikbin
Collaborator
Collaborator
Accepted solution

It is because the default maximumVisibleRows is 4 and minimumVisibleRows should not be less than maximumVisibleRows. You can set maximumVisibleRows first, then set minimumVisibleRows to any value less than maximumVisibleRows.

0 Likes

nnikbin
Collaborator
Collaborator

For those who do not have the resources folder (because of the broken link) I have attached it to this post (downloaded when the link was not broken).

1 Like

thomasa88
Advocate
Advocate

Ah, that makes sense. Thanks!

0 Likes