Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Now available: Fusion 360 plugin for Intellij IDEA/PyCharm

83 REPLIES 83
Reply
Message 1 of 84
JesusFreke
7268 Views, 83 Replies

Now available: Fusion 360 plugin for Intellij IDEA/PyCharm

I've put together a little plugin for IDEA to add support for developing Fusion 360 python scripts. It allows you to launch and debug fusion scripts in IDEA, similarly to the bundled Spyder IDE.

 

You can find the plugin at https://github.com/JesusFreke/fusionIdea. It should be available in IDEA's built-in plugin repository soon, it's just pending approval.

 

You'll also need to install a small add-in in fusion 360, to help facilitate launching scripts from within IDEA. You can find more info in the README

83 REPLIES 83
Message 2 of 84
JesusFreke
in reply to: JesusFreke

The plugin has finally been approved and is available in the IDEA plugin repository

 

fusionIdeaScreenshot.jpg

Message 3 of 84
PinRudolf
in reply to: JesusFreke

That sounds fantastic! As a python and Fusion API starter I am still heavily depending on the autocomplete functionality, but I will defenitely try this in the future!

Message 4 of 84
JesusFreke
in reply to: PinRudolf

You mean like this? 🙂

 


autocomplete.png

 

doc.png

 

When you add the fusion 360 facet to a module, it automatically adds the fusion API as a dependency, so you get autocomplete, docs, etc. 

 

 

 

Message 5 of 84
mcurtis45
in reply to: JesusFreke

With Pycharm, I looked in settings/plugins and searched for "Fusion 360" , and it didn't show up. When I go to the plugins website, it is there. Not sure what's going on. Thanks for the effort!

Message 6 of 84
JesusFreke
in reply to: mcurtis45

Hmm. What version of pycharm do you have? is it lower than 2018.2.5? I can look at lowering the minimum version requirement, assuming there are no api changes, etc. that would prevent it.

Message 7 of 84
mcurtis45
in reply to: JesusFreke

2018.3    I tried downloading it, and installing from drive, and got following error "Plugin 'Fusion 360 Scripting' is incompatible with this installation".

 

Message 8 of 84
JesusFreke
in reply to: mcurtis45

It looks like the gradle plugin build was automatically setting a "until-build" attribute in the plugin metadata, that limited it to only 2018.2.5.

 

I've submitted a new version to jetbrains plugin repository, but it will take a day or two before it's approved. In the meantime, you can download it from the github repository - https://github.com/JesusFreke/fusionIdea/releases

Message 9 of 84
JesusFreke
in reply to: JesusFreke

The new version has been approved, so you should be able to find it in the plugin repository in PyCharm now. (It may take a few minutes before the approval fully propagates, etc.)

Message 10 of 84
mcurtis45
in reply to: JesusFreke

Thanks... works as expected. Next problem, how to add a facet in pycharm. I don't use pycharm a lot, so am not that familiar with it. From my brief googling, facets only exist in Idea. This page (scroll down to facets, not official Jetbrains) indicates they only exist in Idea. Seems like Languages and Frameworks is where you'd find it in Pycharm.

Message 11 of 84
mcurtis45
in reply to: mcurtis45

Also, when I check installed plugins, I'm getting following error

LoadError.JPG

Message 12 of 84
JesusFreke
in reply to: mcurtis45

*sigh*. I guess I should actually install pycharm and try it out :). I just assumed it would be basically identical to IDEA for the purposes of developing the plugin.

 

Thanks for letting me know - I'll look into it and get it work 🙂

Message 13 of 84
mcurtis45
in reply to: JesusFreke

I tried it with Idea, installs fine, but still getting error about PythonCore not enabled in the  Fusion 360 Scripting plugin. I have the Python plugin installed, and a Hello world python program running. Without it enabled, it doesn't show up in the facets list.

Message 14 of 84
JesusFreke
in reply to: mcurtis45

Huh, I have no idea what might be wrong in IDEA. Are you running community or ultimate? And are you on a mac by chance? I would be a bit surprised if the plugin worked on a mac as-is, although I suspect it would be pretty easy for someone to add support. I just don't have access to a mac 🙂

 

I did add better support for PyCharm though. 0.5.3 fixes the PyCharm dependency issue, and adds a settings screen in "Settings -> Languages & Frameworks" in order to enable and configure the plugin. The update is pending jetbrains approval, and you can get it from github in the meantime.

 

If you don't mind, let me know if you still have dependency issues in IDEA.

Message 15 of 84
mcurtis45
in reply to: JesusFreke

Some progress with Pycharm. Plugin does not show up with latest release, however it installed from disk OK. Took me a while, but have it running a script with the debugger. However,  it fails if you try to run it without debugging. Error below.

I'm not on the computer with Idea, but after adding the facet, and making a Configuration to run, it says it has nothing to run. I'll try to get some better diagnostics tomorrow. It's running on a PC, full version. The dependency problem seems to have gone away.

 

 

Error doing a plain run on pycharm

 

PycharmRunErroe.PNG

Message 16 of 84
JesusFreke
in reply to: mcurtis45

re: "nothing to run." in IDEA, you probably need to select the fusion process to attach to. If you look in the top toolbar with the dropdown to select the run configuration, pull down the dropdown and you should see a list of fusion processes (likely only 1, if you just have the single fusion instance running). Just select the process and try running the configuration again.

 

For the pycharm run problem, I think I know what the problem there is. I'll get that fixed in another update.

 

Re: not showing up in pycharm's plugin browser - ugh. I think I've given up trying to understand the correct dependencies to add to get the automatic compatibility working. There are some configuration settings in the plugin repository that seem to allow me to override the automatically detected supported products - so I've manually added the various pycharm,idea and android studio products. Hopefully that will resolve it? I've never published a plugin before, so it's a bit of a learning process. Sorry!

 

 

Message 17 of 84
mcurtis45
in reply to: JesusFreke

Found the problem with Idea. The path that both the facet and Language and Frameworks points to is wrong. The path that loads by default (most recent modified) seems to only have data in it, no python api etc. When I manually change to path with all the libs (next most recent modified), it works. Screenshots below of explorer.

Thanks for the effort to get this working. 

 

Date modified. Top folder is loaded by default. Contents shown below.

Date modified of foldersDate modified of foldersPath that worksPath that worksPath loaded by defaultPath loaded by default

Message 18 of 84
JesusFreke
in reply to: mcurtis45

Ah, gotcha. Yeah, I know there was just recently a fusion update, so the auto-detect had probably detected the path before that, and then the update happened, but the plugin doesn't update that path when fusion changes.

 

Thanks for letting me know. I'll see if I can add some better UI to detect when the path has become invalid, and make it easy to re-auto-detect and update to the new path.

Message 19 of 84
JesusFreke
in reply to: JesusFreke

0.5.4 has a fix for that run issue, and it adds a warning and a quick fix for when fusion 360 is updated and invalidates the path to the executable. It's pending approval, but you can get it on the github page as per usual.

 

fusionIdeaUpdateExecutable.png

 

 

Message 20 of 84
mcurtis45
in reply to: JesusFreke

More progress. Plugin shows up in both pycharm and idea, and I got notified of the update. Also, running now works. However, after running completes, I get following warning.

 

PycharnRunError2.PNG

Thanks for the fixes!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums