Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Why is message box required to observe the updates in dialog's parameters?

Anonymous

Why is message box required to observe the updates in dialog's parameters?

Anonymous
Not applicable

@MattWynn @BrianEkins 

If the message box is not provided then the below/next command is executed before opening the dialog.

 

m_Application->executeTextCommand("Commands.SetString infoStudyComments Comments");

 

Hence we don't see any update. Please refer to the GIF for a better understanding.

 

GIF: If a message box is present

SetParameter_WithMessageBox.gif

 

void updateParameters()
{
    m_Application->executeTextCommand("Commands.Start MSFNestPrepareNestCmd");

    m_UserInterface->messageBox("Updating parameters...");
    m_Application->executeTextCommand("Commands.SetString infoStudyComments Comments");
    m_UserInterface->messageBox("Updated");
}

 

 

GIF: If a message box is not present

SetParameter_WithoutMessageBox.gif

 

 

void updateParameters()
{
    m_Application->executeTextCommand("Commands.Start MSFNestPrepareNestCmd");

    m_Application->executeTextCommand("Commands.SetString infoStudyComments Comments");
}

 

 

0 Likes
Reply
419 Views
2 Replies
Replies (2)

BrianEkins
Mentor
Mentor

I don't know if you're going to find much help with attempting to drive dialogs using text commands. Any use of text commands is unsupported and as a result, it's not something I've spent any time investigating because of the unreliability. Since text commands aren't supported they could change at any time and in the workflow you're using, if the command dialog changes you'll also be broken.

 

However, I know when there isn't API support you don't have any other options.  I know I have projects that are sitting waiting for future functionality that I hope will come someday.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
1 Like

MattWynn
Alumni
Alumni

@Anonymous This is beyond my limited experience with the API.  You are on your own with using this functionality.  Using text commands from API is unsupported - meaning it is subject to change without notice.  Especially beware of the hidden text commands which will change or get removed without notice.


Matt Wynn
Senior Manager, Software Development, Fusion Fabrication
0 Likes