architecture-building-systems / revitpythonshell

An IronPython scripting environment for Autodesk Revit and Vasari
MIT License
490 stars 112 forks source link

RevitLookup.SnoopElement from InitScript init.py no longer works #157

Open alexworkorb opened 1 month ago

alexworkorb commented 1 month ago

Describe the bug RevitLookup.SnoopElement from InitScript init.py no longer works. The error message when trying to execute SnoopElement is:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 92, in SnoopElement
AttributeError: 'RevitLookup.Views' object has no attribute 'ObjectsView'

This could be because the 'ObjectsView' class has been removed in RevitLookup in this commit: https://github.com/jeremytammik/RevitLookup/commit/7fe319dd36a20498fe0f4315b25773208ba73973

Experiencing this error with RPS 2.0.2 and RevitLookup 2024.1.4 running on Revit 2024

To Reproduce Steps to reproduce the behavior:

  1. Open Revit Python Shell inside Revit
  2. execute a SnoopElement such as
    _revitlookup.SnoopElement(doc.ActiveView)
  3. See error messae

Screenshots image