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: 

Command Dialog set size methods appear to be broken

1 REPLY 1
SOLVED
Reply
Message 1 of 2
hobbyist.maker
298 Views, 1 Reply

Command Dialog set size methods appear to be broken

My plugin uses the setDialogInitialSize and setDialogMinimumSize to properly setup the Command Dialog before displaying to the user. This was working for the last few months that I've been working on the plugin, and this is one area of my code that I hadn't touched, but I'm running into strange behavior since one of the recent Fusion updates where these functions appear to not work.

 

On the Mac, if either of those two functions are called in the creation method for the command, the dialog always appears with the same size (705x620), when I'm trying to set it to appear at 410x620.

 

In my Windows environment, neither of those two functions seem to have any effect any longer. The dialog seems to appear using Fusion's default sizing.

 

Edited to add example code.

 

void GenerateCommand::onCreate(const adsk::core::Ptr<CommandCreatedEventArgs>& args)
{
    auto command = args->command();

    auto product = adsk::core::Ptr<Product>{m_app->activeProduct()};
    auto design = adsk::core::Ptr<Design>{product};

    command->setDialogMinimumSize(410, 620);
    command->setDialogInitialSize(410, 620);
    command->isRepeatable(false);
    command->okButtonText("Create");

    ... insert code here ...
}

 

1 REPLY 1
Message 2 of 2
goyals
in reply to: hobbyist.maker

It looks a bug in code. Created ticket FUS-72293 to track it. Thanks for reporting it. 



Shyam Goyal
Sr. Software Dev. Manager

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