Error to run extension!

Hello everyone, I wrote script to calculate weight of column, it works in Revit python shell but when i create extension I faced with that error.

you can see my script is also in picture.

Regards,

Try

doc = __revit__.ActiveUIDocument.Document

2 Likes

Or

from pyrevit import revit

# this is the document that you could use everywhere
revit.doc
2 Likes