Switch to/Activate Design environment? crash...

Switch to/Activate Design environment? crash...

Anonymous
Not applicable
709 Views
3 Replies
Message 1 of 4

Switch to/Activate Design environment? crash...

Anonymous
Not applicable

In the CAM samples it is shown how to switch to the CAM Environment. This works great.

 

I'm setting up an Add-In for production and trying to make it as easy as possible for the users.

The add-in makes some changes in DESIGN, then jumps over to CAM where it updates and posts the toolpaths.

 

This all works great, however when I try a similar approach to switch Back to the DESIGN environment after all that is done, Fusion crashes...

 

Mind you if I make a small add-in that only makes that switch Fusion doesn't crash... What could I be doing to cause this, or is it more likely a bug?

 

This is what I'm doing to try and go back to DESIGN:

 

activateDESIGNWorkspace = _ui.messageBox('Activate the DESIGN Workspace?','DESIGN Workspace Activate',
                                                 adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                                 adsk.core.MessageBoxIconTypes.QuestionIconType)

if activateDESIGNWorkspace == adsk.core.DialogResults.DialogYes: designWorkspace = _ui.workspaces.itemById("FusionSolidEnvironment") designWorkspace.activate()
Accepted solutions (1)
710 Views
3 Replies
Replies (3)
Message 2 of 4

zachesenbock
Contributor
Contributor
Accepted solution

In my experience, I have found that crashes occur when switching back to the design workspace if a fusion input dialog is created in the design workspace before switching to the CAM workspace. I have found that the tkinter library is useful for creating dialogs in these scenarios. A tkinter dialog will not cause crashes and all the necessary information can be extracted from it.

Message 3 of 4

Anonymous
Not applicable

Indeed there is a fusion input dialog before the switch...

 

Thanks, I will try and look into tkinter!

Message 4 of 4

scottmoyse
Mentor
Mentor

@zachesenbock have you managed to figure out a way to make a tkinter dialog modal in the context of Fusion 360? I've found that if the user clicks anywhere other than the dialog, they lose the dialog behind Fusion 360. I haven't found a way to stop that, the documentation suggests the tkinter dialogs are modal by default, but also offer a way to pass in the parent window but I couldn't figure out what value represents the Fusion 360 main window.


Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

0 Likes