Message 1 of 7
[Bug?]: Reading existing DropDownControl attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm attempting to clone some of the design solid menu Panels (eg create) and associated controls for my own AddIn purposes. On the whole it works as expected. However, attempting to clone a DropDownControl results in an error.
The issue occurs attempting to read the name and the resource folder of the existing DropDown. In VSC, inspecting both attributes show a traceback message of:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "...AppData/Local/Autodesk/webdeploy/production/a86b1e861af1608f41e2e5ec25336d404338c9db/Api/Python/packages\adsk\core.py", line 22335, in _get_name
return _core.DropDownControl__get_name(self)
RuntimeError: 2 : InternalValidationError : nuInputControl
app = adsk.core.Application.get()
ui = app.userInterface
allWorkspaces = ui.workspaces
designWorkspace :adsk.core.Workspaces = allWorkspaces.itemById('FusionSolidEnvironment')
designTabPanels = designWorkspace.toolbarTabs.itemById('SolidTab').toolbarPanels
dd = [x for x in designTabPanels[0].controls if isinstance(x, adsk.core.DropDownControl)]
dd[0].name #Results in Error - should give result 'pattern'
dd[0].resourceFolder #As does this one - should give result ''
I don't think it's anything I'm doing
Regards
Peter
I'm not an expert, but I know enough to be very, very dangerous.
Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).
Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).