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: 

QuestionIconType not shown in messageBox

1 REPLY 1
Reply
Message 1 of 2
stefan
83 Views, 1 Reply

QuestionIconType not shown in messageBox

Hello Fusionistas

 

I am new to the Fusion API, so please bear with me 🙂

I am testing scripts in Python, and when creating a messageBox with the QuestionIconType icon, the messageBox does not show the icon.

In other words, QuestionIconType acts the same as NoIconIconType.

The other icon types works as expected.

What am I missing?

 

Best regards
Stefan

1 REPLY 1
Message 2 of 2
kandennti
in reply to: stefan

Hi @stefan .

 

I tried it and was able to reproduce it.(ver2.0.14567)

# Fusion360API Python script

import traceback
import adsk.fusion
import adsk.core


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

        IconTypeNames = [
            'NoIconIconType',
            'QuestionIconType',
            'InformationIconType',
            'WarningIconType',
            'CriticalIconType',
        ]

        for idx, name in enumerate(IconTypeNames):
            ui.messageBox(
                name,
                'IconTypes Test',
                adsk.core.MessageBoxButtonTypes.OKButtonType,
                idx
            )

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

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