Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MessageBox Ver. 2.0.10027

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
kandennti
404 Views, 6 Replies

MessageBox Ver. 2.0.10027

Hi everyone.

 

It seems that UserInterface.messageBox has been changed since Ver 2.0.10027.
I cannot drag the displayed MessageBox with the mouse, is this a specification?

 

It used to be possible to drag them.
It is operated at 0:08-0:09.

 

6 REPLIES 6
Message 2 of 7
JeromeBriot
in reply to: kandennti

Hi,

 

I confirm that the messageBox object change and is no more movable:

 

ui.messageBox('test', 'Test Message box')

 

messageBox.PNG

Message 3 of 7
goyals
in reply to: kandennti

It is as per specification at the moment. We are trying to make message box in Fusion more HIG compliant. There will be more changes to the styling of this dialog in next Fusion update. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
Message 4 of 7
kandennti
in reply to: goyals

Thank you, @goyals .

 

Yes, sir. I'm looking forward to it.

If I really need the old style, I will use this.

def run(context):
    ui :adsk.core.UserInterface = None
    try:
        app :adsk.core.Application = adsk.core.Application.get()
        ui = app.userInterface

        msg = 'New Style'
        ui.messageBox(msg)

        msg = 'Old Style'
        app.executeTextCommand(f'UI.SimpleMessageBox "{msg}"')
        
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Message 5 of 7
kandennti
in reply to: kandennti

We have confirmed that Ver 2.0.10244 fixed the problem so that you can move it by dragging.
Thanks!

Message 6 of 7
JeromeBriot
in reply to: kandennti

Did you notice that you can now select text and copy/paste it using the right mouse button or keyboard shortcuts?

 

messageBox-copy-paste.PNG

Thanks to whoever implemented this.

 

 

 

Message 7 of 7
nnikbin
in reply to: JeromeBriot

Like the pre-modernized version, the new message box is able to show basic html formatting (an undocumented feature).

 

Running @JeromeBriot 's code from this post results the following message box.

 

45.png

And by copyig the html formatted text, you can paste it as formatted text, for example in a google docs document.

 

46.png

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report