Visual Studio and Fusion seem to be unlinked

Visual Studio and Fusion seem to be unlinked

Anonymous
Not applicable
1,823 Views
8 Replies
Message 1 of 9

Visual Studio and Fusion seem to be unlinked

Anonymous
Not applicable

Hi there

 

So today I tried to run my code in fusion that I wrote in Visual Studio, the code is

 

        extent_all = adsk.fusion.throughallextentdefinition.create()

 

The problem is that when I run it in fusion I get the error

AttributeError: module 'adsk.fusion' has no attritube 'throughallextentdefintion'

but I know this code should work as I have copied it from Extrude Feature API Sample API Sample, Example 5

 

So I was wondering if anyone had any ideas about how to fix this issue, any would be helpful as in stumped

Also when I try and edit my script, it no longer automatically opens up visual studio like it used to, I don't know if this has anything to do with it?

 

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
1,824 Views
8 Replies
Replies (8)
Message 2 of 9

kandennti
Mentor
Mentor
Accepted solution

Hi @Anonymous .

 

Perhaps this is the sample here and it's handled correctly.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-CB1A2357-C8CD-474D-921E-992CA3621D04 

 

The reason for the error is that you are not running VSCode from Fusion360.

And I think the reason why you can't launch VSCode from Fusion360 is the version of the extension "ms-Pythpn".

Currently the latest Ver2020.7.96456 could not be launched from Fusion360.

 

Here's what @akonovalenko  wrote that's important.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/socket-timeout-timed-out/m-p/9628489#M10676 

Ver2020.5.78807 seems to be a good choice.
However, I am using Ver2020.6.91350 and do not feel a problem.

"What are some of the best versions?" I have not checked.

 

And most importantly, as he wrote, disable automatic updates to the extension.

Given what we've done so far, I think this problem will probably continue to occur in the future.

0 Likes
Message 3 of 9

Anonymous
Not applicable

I too seem to be having this trouble now too. I Just started to explore the API. Yesterday I was battling Intellisense (Still not working) and now VSCode will not launch from Fusion that turns out breaks all the debugging. 

0 Likes
Message 4 of 9

Anonymous
Not applicable

Can confirm I uninstalled the current ms-Python 2020.7.96456  in VSCode and manual installed 2020.6.91350

 

VSCode now opens from fusion 360, But I still have missing Intellisense

0 Likes
Message 5 of 9

kandennti
Mentor
Mentor

・Shutting down Fusion360.
・Disable automatic update of the extension in VSCode.
・Shut down VSCode.
・Deleted the extension "ms-Pythpn".
  I don't know about mac, but on win.

C:\Users\<username>\.vscode\extensions\ms-python.python-<version>

  Remove all.

・Download the VSIX file of old "ms-Pythpn".
・VSIX file installation.
・Launch Fusion360.
・Launch VSCode from Fusion360.

 

I don't use Python outside of Fusion360, but if you are using "ms-Pythpn" elsewhere, you may have a problem.

0 Likes
Message 6 of 9

Anonymous
Not applicable

Hi @kandennti 


Thanks so much for the advice, uninstalling VS Code & Python and reinstalling older versions seems to work fine

I'm now running

VS Code: 1.44.2

VS Python: 2020.5.86806

Fusion: 2.0.8624

 

Message 7 of 9

Anonymous
Not applicable

Thanks a lot for the solution! It worked awesome for me. 

 

For anyone in the future, you actually might just downgrade the version of ms-python extension by following this StackOverflow thread [https://stackoverflow.com/questions/62299687/how-to-install-previous-version-of-python-extension-for...]. I am using this version -- 2020.6.88468 -- and it works fine.

0 Likes
Message 8 of 9

Anonymous
Not applicable

How do I keep Fusion360 from upgrading the ms-python.python-2020.6.88468 if this is the solution to my Intellisense and loading issues? Everytime I manually install ms-python.python-2020.6.88468 it gets upgraded to ms-python.python-2020.7.96456. The script that runs from Fusion to launch VSCode prints to the console "installing......ms-python.python-2020.7.96456..."

 

I have changed the VSCode Upgrade: Mode to "None" (File>Preferences>Setting>) 

0 Likes