Bug: Large contents in command dialog blanks dialog in sketch mode

Bug: Large contents in command dialog blanks dialog in sketch mode

thomasa88
Advocate Advocate
324 Views
3 Replies
Message 1 of 4

Bug: Large contents in command dialog blanks dialog in sketch mode

thomasa88
Advocate
Advocate

If I create a command window in sketch mode and show more contents than can fit in the window, both the texts of the window and the controls of the sketch windows are blanked. I noticed this when working with a smaller Fusion window as I had other windows on the side.

 

thomasa88_0-1731521807510.png

 

If I make the Fusion window larger (or the textbox smaller):

 

thomasa88_1-1731521845675.png

 

 

Here is a minimal example add-in. Make the Fusion window small or increase the number of lines in the textbox. Create a new sketch and choose CREATE -> Run command.

 

 

from .lib import fusionAddInUtils as futil

import adsk.core
from datetime import datetime

app = adsk.core.Application.get()
ui = app.userInterface

def run(context):
    try:
        # This will run the start function in each of your commands as defined in commands/__init__.py
        # commands.start()

        cmd = ui.commandDefinitions.addButtonDefinition('bug_run_cmd', 'Run command', '')
        ui.allToolbarPanels.itemById('SketchCreatePanel').controls.addCommand(cmd)

        futil.add_handler(cmd.commandCreated, cmd_created)

    except:
        futil.handle_error('run')

def cmd_created(args: adsk.core.CommandCreatedEventArgs):
    inputs = args.command.commandInputs
    inputs.addTextBoxCommandInput('txt', 'Textbox', 'text', 20, False)

def stop(context):
    try:
        # Remove all of the event handlers your app has created
        futil.clear_handlers()

        # This will run the start function in each of your commands as defined in commands/__init__.py
        # commands.stop()
        cmd = ui.commandDefinitions.itemById('bug_run_cmd')
        if cmd:
            ui.allToolbarPanels.itemById('SketchCreatePanel').controls.itemById('bug_run_cmd').deleteMe()
            cmd.deleteMe()


    except:
        futil.handle_error('stop')

 

 

 

325 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor

I can reproduce this, but I wonder how big of a problem it is. The only way I could reproduce it was to have the height of my Fusion window very small, which I doubt anyone uses for actual design work. Is there a particular use case where this is causing you problems?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 4

thomasa88
Advocate
Advocate

I hit the problem when developing an add-in. I took me a while to figure out what was going on and realize that this particular add-in's code was not buggy. But as you say, the use case of a small window is not very likely when doing 3d design.

0 Likes
Message 4 of 4

thomasa88
Advocate
Advocate

Update: It happened on my laptop too, with fullscreen. 1920x1080, 125 % scaling. Probably not a common scenario at a desktop workstation, but it can appear for quick on-the-go model changes on a laptop.

0 Likes