vscode python intellisense

vscode python intellisense

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

vscode python intellisense

Anonymous
Not applicable

Intellisense seems to kind of work but of the hop I was trying to access, edit, add userParameters. My code I found to add a user parameter 

 

 design.userParameters.add("MyPar", adsk.core.ValueInput.createByReal(5*2.54),"in","")

 

worked after much research and scouring the forums but I could not get the userParameters to populate after typing design.us <Ctrl+Space> 

 

My VSCode was installed using a one click installer for FIRST Robotics to program primarily Java. It is possible I could be missing key Extensions

 

I followed the post What-is-the-path-to-fusion-360-api-internal-module-adsk But nothing changed. Some Intellisense does work like with the above design.parentDocument and a few others do populate the list. 

 
0 Likes
1,549 Views
8 Replies
Replies (8)
Message 2 of 9

kandennti
Mentor
Mentor

Hi @Anonymous .

 

I don't know why IntelliSense doesn't work, but I do know how to make it work.

If you use a cast or Type Hints, it should work.

1.png

Message 3 of 9

Anonymous
Not applicable

@kandennti 

 

Capture.PNG

This is all I get

Message 5 of 9

Anonymous
Not applicable

These issues most definitely tied to the mix of auto updates vs manual ones and different developers of these tools that try to play nice together. 

 

Someone who knows what version currently are playing nicely and fully should compile a list.

0 Likes
Message 6 of 9

BrianEkins
Mentor
Mentor

I'm using what I believe is the latest VS Code and the Python extension and things are working for me.  The only issue I've found is that at first I thought Intellisense wasn't working but I just had to be patient for it to first load up and then it worked great.

VSCodeVersions.png

 

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 7 of 9

thomasa88
Advocate
Advocate

I second using "cast".

@AnonymousDid you try using cast or the type declartion? It does not look like that in your screenshot. I have always had to use cast() for e.g. design.

 

Then again, if it should work without cast, then it's a bug.

0 Likes
Message 8 of 9

Anonymous
Not applicable

@thomasa88 I'm not 100% on how to cast() this. Do you have an exsample?

 

Here are a few screen shots of some Intellisense working: but you see the

UserParameters dose NOT populate.

Design.PNGNo user par.PNG

0 Likes
Message 9 of 9

kandennti
Mentor
Mentor
0 Likes