Message 1 of 3
[BUG?] Cannot get tooltip from commandDefinition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Title is pretty self explanatory, setting a commandDefinition's tooltip works fine but getting it only returns an empty string. I have tested this on two different computers and I have had the same problem.
I have this problem for both custom and native commandDefinitions. Here is a sample code for the Extrude command, am I the only one with this problem ?
If this problem can be reproduced, how you I go about properly reporting this bug ? (is a forum post enough ?)
Sample Code :
import adsk.core, adsk.fusion, traceback, adsk.cam
app: adsk.core.Application = adsk.core.Application.get()
ui = app.userInterface
def run(context):
try:
extrude = ui.commandDefinitions.itemById('Extrude')
if extrude.tooltip:
ui.messageBox(extrude.tooltip)
else:
ui.messageBox('empty string')
extrude.tooltip = 'test'
if extrude.tooltip:
ui.messageBox(extrude.tooltip)
else:
ui.messageBox('empty string')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))