Get Revit Version while loading family

Hi Joseph,

You can use this piece of python to retrieve the Revit version. All you need to do is supply the paths to the family files.
Revit version reporter.dyn (3.2 KB)

import clr

clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
#The inputs to this node will be stored as a list in the IN variables.
path = IN[0]
listout = []
for p in path:
	try:
		info = BasicFileInfo.Extract(p)
		version = info.SavedInVersion
		listout.append(version)
	except:
		listout.append("failed")

OUT = listout
6 Likes