Listing revit update version links

Hi,

Do you think it’s possible to ask Dynamo to check revit version upades of linked filesI>The aim of my question is to know if revit files haves been created in revit 2021.1.2 or revit 2021.8 or 2021.1.10 for exmpale.

Thanks!

Gaëtan

Hello @Gaetan_DENIS and welcome to the forum ;)…try document properties from Genius Loci

guees i misunderstand you are after the build from link, try this one here and just feed in the link instances

import clr
import System

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.ApplicationServices import LanguageType
from Autodesk.Revit.DB import Document

# Function to get enum name
def enumGetName(enum, enumClass):
    return System.Enum.GetName(enumClass, enum)

# Current UI application
uiapp = DocumentManager.Instance.CurrentUIApplication 
app = uiapp.Application 

# Function to get Revit version info
def get_revit_version(doc):
    if int(app.VersionNumber) > 2017:
        fullVersion = app.SubVersionNumber
    else:
        fullVersion = str(app.VersionNumber)
    
    versionName = app.VersionName
    versionBuild = app.VersionBuild
    language = enumGetName(app.Language, LanguageType)
    versionShort = int(app.VersionNumber)
    
    return versionName, versionShort, fullVersion, versionBuild, language

# Get active document
doc = DocumentManager.Instance.CurrentDBDocument

# Get link document if provided
linkDoc = IN[0] if isinstance(IN[0], Document) else None

# Output results
OUT = get_revit_version(linkDoc) if linkDoc else get_revit_version(doc)

Hi,

Well i didn’t expect a response as fast as yours! Thanks I will have a look. By the way Model checker can do it but very interesting with dynamo thanks!

GAëtan

yeah try it…and cheers to @GavinNicholls for the original script, but without option for link