Change file path of a family

Hi all,
there is a way to change the file path of family in dynamo.
I’ve a project with a lot of family (with nested family) and i would change the file location of them.
Kind Regards
Vincenzo

Hi @panasitiB8QEQ,
If the families are in your project, you could use nodes to open them in memory and save them to a new location.
If I’m not mistaken, then you can achieve this with nodes from the orchid package. Mind that the installation of this package is a bit different from most other packages, but follow the instructions, and you should be good :slightly_smiling_face:

Hi @MartinSpence,
I’ve tried with orchid package. First I load the family in my project, then I save to a new directory and remove from the project, then I reload it from the new directory.
The issue is that this don’t work with the nested families (ex. Furniture System) and if the family is used in the project.

Hi Vincenzo,

You could also try the method below (Open, SaveAs, Reload and Close Family Documents).
In your case you can skip the ParameterDelete step.

Kind regards,
Mark

Hi @MJB-online, I follow your step but the path of the family remains tha same. If I add the delete passage it works.
@erfajo thanks i’ve update the package.
My issue remains when i work with families with nested components…

I was looking for this to but the problem was that mine existing families where deleted when i used your solution. Now I used the MJB-online solution but I added a python script I used for something else to reload mine families now it is working and the families will save in file location I want and will reload the path.

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

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

#Inputs is stored in the IN variable
elements = IN[0]

#Ensure loaded families can overwrite existing families.
class FamilyOption(IFamilyLoadOptions) :
	def OnFamilyFound(self, familyInUse, overwriteParameterValues) :
		overwriteParameterValues = True
		return True

	def OnSharedFamilyFound(self, sharedFamily, familyInUse, source, overwriteParameterValues) :
		return True

#Core data processing
TransactionManager.Instance.EnsureInTransaction(doc)
try:
	for element in elements :
		doc.LoadFamily(element, FamilyOption())
except:
	pass
TransactionManager.Instance.TransactionTaskDone()

#Nothing assign to the OUT variable
OUT = 'Families is updatet/reloaded'

For the nested families I don’t have really a solution ad the moment…