Casting for intellisense

@c.poupin - as you are really good at Python- and I am just starting to immerse myself in it ; ) Question is with the intellisense (Auto.Completion) in Python - is there a way to CAST or DECLARE types to expose the intellisense and expansion on variables?

I.e.:

import sys                                      ##Standard system input
import clr

from Autodesk.Revit.DB import FilteredElementCollector  #FEC fast select
from Autodesk.Revit.DB import LogicalAndFilter          ##Combine filters for level + Walls

from RevitServices.Persistence import DocumentManager   ##Doc for active view
from RevitServices.Transactions import TransactionManager ##Trans to commit and undo actions

doc = DocumentManager.Instance.CurrentDBDocument <CurrentDBDocument>       ##Current Document <<<Fails  

ViewActive  = doc.ActiveView

Somethign to cast the documet to see the methods:

@jacob.small - If we had this under “F2” To search for classes and libraries to “import” of “from **” it would go a long way to keeping everything we need to code in DS or Python in the interface. I assume all the symbols are build into the libraries and just need to be indexed to be searched?

1 Like

The Python IDE is limited due to the editing platform used (Avalon Edit). Modernizing this and adding features like the search method mentioned is certainly on the wishlist and something the team would like to get to, but it’s not as high up the list as some of the other more features which have a lot more impact, as external IDEs provide a functional work-around for the time being.

1 Like

I think it’s not possible to solve intellisense by this way
without constructor, we can’t cast an object in Python, there is a method with Ironpython to convert some object, but it won’t solve the intellisense here

1 Like

Thanks @jacob.small and @c.poupin