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: 

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

2 REPLIES 2
Reply
Message 1 of 3
navalkishor.sahKWL5T
219 Views, 2 Replies

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

@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");
}

 

 

2 REPLIES 2
Message 2 of 3

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
Message 3 of 3

@navalkishor.sahKWL5T 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

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