Get name of Revit.Application.Document thats open in the background

How can I get the name of this document? I need to filter it out of a list.

try:
doc.Title

1 Like

Hello @jedbjorn a way with ootb nodes…

2 Likes

Using Python, not sure if there is another way…:

import clr
clr.AddReference("RevitServices")
import RevitServices 
from RevitServices.Persistence import DocumentManager
uiapp = DocumentManager.Instance.CurrentUIApplication

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

app = uiapp.Application.Documents

doc = DocumentManager.Instance.CurrentDBDocument

currentDoc = doc.Title

openedDocs = []

for d in app:
	if d.Title != currentDoc:
		t = d.Title
		p = d.PathName
		openedDocs.append(t)
		openedDocs.append(p)

OUT = openedDocs

2 Likes

thanks this is great! super helpful.

1 Like

I thought there was but I am trying to understand python and the API better so I can work with this in python more. Thank you though!

1 Like