New Features and Improvements
Run Python Command
New Command Introduction: The new Run Python command allows users to run Python scripts directly within Autodesk Revit.
This feature enables automation and customization by giving users access to Revit API through Python code,
providing a flexible way to interact with the model, perform calculations, and modify elements.
Predefined Variables: Users can access predefined Revit API objects in their Python scripts, such as:
__revit__
: Accesses the UIApplication object representing the Revit application.
__uiapp__
: Another reference to UIApplication for interacting with the current Revit session.
__doc__
: The active Document object, allowing access to the current Revit project or family.
__uidoc__
: The UIDocument object for UI interactions within Revit.
Script Output: Users can print the result of their scripts using the print() function. For example:
This will display the document title in a task dialog within Revit.
For detailed usage instructions, please visit the user guide.