Hi guys,
did anybody already write a node to get the file path of the family, where it is located on the server?
The path I would see if I reload a family.
Ideas welcome!
Thorsten
Hi guys,
did anybody already write a node to get the file path of the family, where it is located on the server?
The path I would see if I reload a family.
Ideas welcome!
Thorsten
It seems to be possible programatically
But you have to pretend to edit the family, then back out of it. Not sure if that is possible in Dynamo.
As far as model management/auditing, this would be a great tool- find all those rogue families…
Andrew
I came across this thread searching for the same functionality and made a rough implementation in Python that accepts a list of families: https://bitbucket.org/snippets/thomascorrie/qKLEG
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(‘RevitAPI’)
import Autodesk
clr.AddReference(‘RevitServices’)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
#Close all transactions
trans = TransactionManager.Instance
trans.ForceCloseTransaction()
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
fam = IN[0]
family = []
path = []
for f in fam:
family.append(UnwrapElement(f))
for f in family:
famDoc = doc.EditFamily(f)
if not famDoc.PathName:
path.append(“Family location not found”)
else:
path.append(famDoc.PathName)
famDoc.Close(False)
#Assign your output to the OUT variable.
OUT = path