DirectName icon indicating copy to clipboard operation
DirectName copied to clipboard

New F360 Version broke Direct Name: RuntimeError: 2 : InternalValidationError : selecCmd

Open patl1 opened this issue 1 year ago • 13 comments

Direct Name seems to be broken in today's (4/3/23) version of F360

patl1 avatar Apr 04 '23 02:04 patl1

Copy this message using Ctrl+C:

C:\Users\J\AppData\Roaming\Autodesk\ApplicationPlugins\DirectName.bundle\Contents\thomasa88lib\events.py failed:

Traceback (most recent call last): File "C:\Users/J/AppData/Roaming/Autodesk/ApplicationPlugins/DirectName.bundle/Contents\thomasa88lib\events.py", line 142, in catcher func(args) File "C:/Users/J/AppData/Roaming/Autodesk/ApplicationPlugins/DirectName.bundle/Contents/DirectName.py", line 350, in rename_command_destroy_handler ui_.activeSelections.clear() File "C:\Users/J/AppData/Local/Autodesk/webdeploy/production/df098dc22bdb0532c3884db0a2d6182c8f8678de/Api/Python/packages\adsk\core.py", line 15655, in clear return _core.Selections_clear(self) RuntimeError: 2 : InternalValidationError : selecCmd

j244 avatar Apr 04 '23 15:04 j244

Hi, I can confirm the problem. I have not yet had time to look at it.

My initial suspicion was that the new Fusion version handles components/occurrences differently, making the problem only appear at top-level. But now I saw that it also appears when creating features within components.

thomasa88 avatar Apr 05 '23 06:04 thomasa88

Thanks Thomas. I look forward to using it again. Appreciate your efforts to create and maintain the useful tool

Pat

From: Thomas Axelsson @.> Sent: Tuesday, April 4, 2023 11:03 PM To: thomasa88/DirectName @.> Cc: patl1 @.>; Author @.> Subject: Re: [thomasa88/DirectName] New F360 Version broke Direct Name (Issue #5)

Hi, I can confirm the problem. I have not yet had time to look at it.

My initial suspicion was that the new Fusion version handles components/occurrences differently, making the problem only appear at top-level. But now I saw that it also appears when creating features within components.

— Reply to this email directly, view it on GitHub https://github.com/thomasa88/DirectName/issues/5#issuecomment-1496961951 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7WVZ5GEBV7IZCU2NCIEM3W7UDHTANCNFSM6AAAAAAWSCY5CU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AG7WVZZW6SJUFBARCVXLA23W7UDHTA5CNFSM6AAAAAAWSCY5CWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSZHHJZ6.gif Message ID: @.*** @.***> >

patl1 avatar Apr 05 '23 13:04 patl1

Hi,

I am also getting error msg:

C:\Users\troyo\AppData\Roaming\Autodesk\ApplicationPlugins\DirectName.bundle\Contents\thomasa88lib\events.py failed:

Traceback (most recent call last):

File "C:\Users/troyo/AppData/Roaming/Autodesk/ApplicationPlugins/DirectName.bundle/Contents\thomasa88lib\events.py", line 142, in catcher

func(args)

File "C:/Users/troyo/AppData/Roaming/Autodesk/ApplicationPlugins/DirectName.bundle/Contents/DirectName.py", line 350, in rename_command_destroy_handler

ui_.activeSelections.clear()

File "C:\Users/troyo/AppData/Local/Autodesk/webdeploy/production/df098dc22bdb0532c3884db0a2d6182c8f8678de/Api/Python/packages\adsk\core.py", line 15655, in clear

return _core.Selections_clear(self)

RuntimeError: 2 : InternalValidationError : selecCmd

I miss DirectName already 😢

On Wed, Apr 5, 2023 at 8:02 AM Thomas Axelsson @.***> wrote:

Hi, I can confirm the problem. I have not yet had time to look at it.

My initial suspicion was that the new Fusion version handles components/occurrences differently, making the problem only appear at top-level. But now I saw that it also appears when creating features within components.

— Reply to this email directly, view it on GitHub https://github.com/thomasa88/DirectName/issues/5#issuecomment-1496961951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDJQKQ73CH43F7NVMSWWBDW7UDHVANCNFSM6AAAAAAWSCY5CU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

troyostrander avatar Apr 05 '23 13:04 troyostrander

I'm also in pain, and glad to see that this is a known issue. I'll reference #7 here, since it refers same problem, and copy-paste my response from there

I have encountered the same issue. In my understanding, it is related to a part of Fusion 360's API that is responsible clearing selection, but I have not yet found a solution to this problem. It's already discussed in #5

Pixel48 avatar Apr 07 '23 20:04 Pixel48

This is simple, stupid, ducktape-&-glue fix

It seems like this errors are generated probably because now Fusion 360 seems to handle clearing selections in viewport in different way - omitting ui_.activeSelections.clear() in whole DirectName.py removes problem without braking plugin's functionality (at first glance at least).

image

Could be good temporal fix, but definitely there's more API changes in this update, so this needs more refined solution in the long-run

For code, check out #8

Pixel48 avatar Apr 07 '23 20:04 Pixel48

Sorry for the late reply.

I guess the cleanest quick workaround is changing ui_.activeSelections.clear() to ui_.activeSelections.all = adsk.core.ObjectCollection.create()

However, the underlying problem seems to be that (not all) the selections in focusChanged() are no longer "liked" by Fusion.

I'm thinking about just removing this selection logic - at least for now. The intention was to help the user to see what body or feature is being renamed, but right now it is doing more harm than help, and I'm not sure that it was that used that much anyway.

thomasa88 avatar Apr 13 '23 06:04 thomasa88

Please try the latest master. If it works, I'll pack it up in a release and send it to Autodesk for review.

thomasa88 avatar Apr 13 '23 06:04 thomasa88

Just did a very quick test using the latest master (just copied directname.py over existing) and it seems to works fine. I agree that I never really looked at the part being highlighted. A nice-to-have if it works in the future, but I'd rather have it working without, than not working at all. Thanks for a great plugin!

RafeAldridge avatar Apr 13 '23 11:04 RafeAldridge

Thomas, worked for me. Thank you.

Pat

From: Thomas Axelsson @.> Sent: Wednesday, April 12, 2023 11:19 PM To: thomasa88/DirectName @.> Cc: patl1 @.>; Author @.> Subject: Re: [thomasa88/DirectName] New F360 Version broke Direct Name (Issue #5)

Please try the latest master. If it works, I'll pack it up in a release and send it to Autodesk for review.

— Reply to this email directly, view it on GitHub https://github.com/thomasa88/DirectName/issues/5#issuecomment-1506409386 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7WVZ4UL3I7TLAAV4B6LSDXA6LE7ANCNFSM6AAAAAAWSCY5CU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AG7WVZYXMV56IFKENIGRSLLXA6LE7A5CNFSM6AAAAAAWSCY5CWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSZZH52U.gif Message ID: @.*** @.***> >

patl1 avatar Apr 13 '23 18:04 patl1

Thanks for confirming. I have now uploaded a new release in GitHub: https://github.com/thomasa88/DirectName/releases/tag/v1.2.2

Follow the instructions in the README to install from Github. Make sure to uninstall the version installed from the Autodesk store. https://github.com/thomasa88/DirectName

I'm submitting the new version to the Autodesk store. It will likely show up in a few weeks.

thomasa88 avatar Apr 13 '23 18:04 thomasa88

Follow the instructions in the README to install from Github. Make sure to uninstall the version installed from the Autodesk store. https://github.com/thomasa88/DirectName

I suggest you update the README to tell people who have installed it from the Autodesk store to go into Control Panel > Uninstall to uninstall DirectName - at least for Windows. Not sure what to do on Mac.

I installed your new version yesterday it it's fixes this new bug, but it was a little confusing what to do at first.

Also, the Autodesk page that you refer people too in the README doesn't show the correct directory, at least for to my computer. Autodesk says to use:
%appdata%\Autodesk\Autodesk Fusion 360\API\AddIns

But on my computer, it was: C:\Users\my_user_name\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\AddIns\

Scott216 avatar Apr 19 '23 14:04 Scott216

@Scott216 just for reference %appdata% is just shorthand on windows for C:\Users\my_user_name\AppData\Roaming so the location is in fact the same.

Jo-Dan avatar Jul 12 '23 06:07 Jo-Dan