gtalarico / ironpython-stubs

Autocomplete stubs for common IronPython/.NET libraries
Other
248 stars 80 forks source link

How to make my own stubs? #10

Open AlekseiBalyshev opened 6 years ago

AlekseiBalyshev commented 6 years ago

Hello, could you please describe how to make my own stubs? I'd like to add Autodesk Navisworks, AutoCAD, Civil3D and a couple of other dll's. I use VS Code.

gtalarico commented 6 years ago

Give it shot with one of these you listed and we can go from there.

  1. Clone this repository

  2. Edit the PATH variable in default_settings.py to include the location of the DLL you want to create a stub for.

  3. From the root directory in this repository, run: ipy -m ironstubs make NameOfDllWithoutExtension (eg. ipy -m ironstubs make RevitAPIUI)

Let me know if that works

mitevpi commented 6 years ago

I gave it a shot with a custom class library, but got this error:

image

Is there something I need to do in my class library to be able to generate stubs, or is the stub generator just not made for custom code.

gtalarico commented 6 years ago

It should work for most dlls, but some have quirks. The main revit dlls for example only run inside of revit.

The error you are getting above has to do with ironpython frames. Try running ipy - X:FullFrames -m...

gtalarico commented 5 years ago

is it alright to delete my comment? Sure, feel free to delete it