1779/2078

pyRevit Home and ApiDocs Code Sample Collection

Originally Published in

Two exciting Revit API related news announcements from Ehsan Iran-Nejad and Gui Talarico:

New Comprehensive pyRevit Home Page

Ehsan @eirannejad ↗ Iran-Nejad unified the pyRevit online experience ↗, creating a new pyRevit home page ↗ that takes you through all project related aspects:

pyRevit home page

ApiDocs.co Code Search Sample Collection

Gui @gtalarico ↗ Talarico, the author of both the online Revit API documentation revitapidocs.com ↗ and the more general Apidocs.co ↗ covering Grasshopper, Navisworks and Rhino as well, announced an expanded search functionality ↗ in the latter that provides code samples directly within its pages by searching a whole collection of samples hosted in the new ApiDocs.co code search sample repository ↗.

ApiDocs.co

How Does it Work?

Apidocs.co ↗ uses the GitHub Code Search API against this repo to provide Code Samples directly within pages.

Because the GitHub Code Search API is limited to a single user or repo, this repository aggregates multiple relevant repos so they can all be searchable in a single request.

Limitations

  • It’s plain text search – some generic names like Application can trigger many false positives
  • It’s limited to certain entity types (e.g., Class, Method, Property, etc.)

How to Contribute

  • Fork this repo
  • Add a relevant repo to repos.json
  • Run python update.py
  • Send a Pull Request ↗

RevitApiDocs and ApiDocs Comparison

Question: Could the new code sample search functionality be added to both apidocs.co ↗ and revitapidocs ↗? It is tricky to know when to use which…

Answer: Users can use whichever they prefer. While revitapidocs ↗ will likely continue to get new API versions, it will not get new features – the code base has not aged well and adding new features to it is no fun.