_ui.messageBox problem

_ui.messageBox problem

brad.bylls
Collaborator Collaborator
547 Views
5 Replies
Message 1 of 6

_ui.messageBox problem

brad.bylls
Collaborator
Collaborator

Trying to show message box.

Screenshot (44).png

 

 

 

I get this:

Screenshot (43).png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

What am I missing?

Thank you.

Brad Bylls
0 Likes
548 Views
5 Replies
Replies (5)
Message 2 of 6

BrianEkins
Mentor
Mentor

I don't see any problems. I typed the following three lines into the TEXT COMMAND window with the "Py" option selected and when I run the last line, I get the expected dialog.

app = adsk.core.Application.get() 
ui = app.userInterface 
answer = ui.messageBox('Check your inputs,\nScrew is shorter than clearance length!') 

 

BrianEkins_0-1679442316859.png

 

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

Jorge_Jaramillo
Collaborator
Collaborator

How are you running the script?

Could you share the script?

 

0 Likes
Message 4 of 6

brad.bylls
Collaborator
Collaborator

Attached is the file.

Brad Bylls
0 Likes
Message 5 of 6

Jorge_Jaramillo
Collaborator
Collaborator

Hi @brad.bylls ,

I don't see the run method in your source file.

I can see in your source code you have CreateInchFHSCS class and drawBolt method.

 

How are you calling those? 

Are you running the script from Fusion360?

 

Message 6 of 6

brad.bylls
Collaborator
Collaborator
It runs through a framework that Patrick Rainsberry created.
Brad Bylls
0 Likes