Intellisense for PyMAPDL #683
-
Hello, I'm using VS Code to run pymapdl and I'm trying to implement intellisense into the different pymapdl commands such as the ones under the Areas class (...site-packages\ansys\mapdl\core_commands\preproc\areas.py) Using the default lines to launch mapdl and when I hover on 'a' to see its description I only see "Any" However, if I use 'from ansys.mapdl.core._commands.preproc.areas import Areas' and do 'Areas.a()' and hover over 'a' I'm able to see the description for 'a' However, this doesn't seem like the most optimal way since the correct use of 'a' is using mapdl (e.g. mapdl.a(k0, k1, k2) ) rather than Areas.a() I looked into modifying the __ init __ .py file (...site-packages\ansys\mapdl\core\ __ init __ .py) but not sure if that could create other problems ahead. Any suggestions on what tools/methods might be available to get intellisense working are appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Played around with this, and the biggest issue is we're unclear about which object we're returning from from ansys.mapdl.core import launch_mapdl, Mapdl
mapdl = launch_mapdl()
other_mapdl.a() Intellisense and auto completion works: screencast2.mp4I'm going to play with the launcher and see if we can return a consistent type and make it easier for intellisense to work. |
Beta Was this translation helpful? Give feedback.
Played around with this, and the biggest issue is we're unclear about which object we're returning from
launch_mapdl
. In fact, if you simply run:Intellisense and auto completion works:
screencast2.mp4
I'm going to play with the launcher and see if we can return a consistent type and make it easier for intellisense to work.