Code Hints in Visual Studio Code - howto

Code Hints in Visual Studio Code - howto

wh6Q9NU
Advocate Advocate
2,773 Views
5 Replies
Message 1 of 6

Code Hints in Visual Studio Code - howto

wh6Q9NU
Advocate
Advocate

This topic from 2015 explains how to get code hints working (Spider).

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/code-hint/m-p/5816475#M753

 

I can't seem to find any updates for getting code hints working in Visual Studio Code (in my case OSX).

 

All suggestions welcome. Thanks!

0 Likes
Accepted solutions (1)
2,774 Views
5 Replies
Replies (5)
Message 2 of 6

Nilesh.Mohite
Autodesk
Autodesk
Accepted solution

Hi  @wh6Q9NU ,

There are couple of things to consider

1.Can you verify that on your mac following directory is present and does it contain fusion modules mainly _init.py,core.py,fusion.py & cam.py etc.? Directory-
"~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Python/defs".

Solution-(Already this has been addressed and fix will be available in December release). If this is missing you can copy defs directory from your fusion app installed location like "~/Library/Application Support/Autodesk/webdeploy/<currentInsatlledbuild>/Autodesk Fusion 360/contents/API/Python/packages/adsk/defs"  to the directory "~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Python/defs" 

 

2.One more thing, once script is opened from fusion for edit/debug mode in VScode; fusion will generate setting.json file in "script_folder\.vscode".
Can you check that does setting file contains a node "python.autoComplete.extraPaths" which should point to directory "~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Python/defs".

Solution-(Fusion automatically creates proper setting.json file with node. Still)
You can add node in setting.json file as

"python.autoComplete.extraPaths":[ "~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Python/defs"]

 

Please let us know if this works for you and if you need any more help.


Nilesh Mohite
LinkedIn

If my answer helped you, please use  ACCEPT SOLUTION .
Also be generous with Likes!  Thank you and enjoy!

0 Likes
Message 3 of 6

wh6Q9NU
Advocate
Advocate

Thanks for the solution. Worked for me.

 

point 1); dir was missing, create and copy files 

point 2); config was already in place 

 

In addition, I had to restart Visual Code to get code hints working ⚠️

Message 4 of 6

Nilesh.Mohite
Autodesk
Autodesk

That's great.

Please let us know if you need any more help.

 


Nilesh Mohite
LinkedIn

If my answer helped you, please use  ACCEPT SOLUTION .
Also be generous with Likes!  Thank you and enjoy!

0 Likes
Message 5 of 6

Anonymous
Not applicable

Where can we find the _init.py,core.py,fusion.py & cam.py etc files to copy and paste and how do we know which ones must be there?

0 Likes
Message 6 of 6

Anonymous
Not applicable

You should be able to find the adsk folder that contains them in ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Python/defs

0 Likes