Family Reload From

Family Reload From

lumoric
Contributor Contributor
789 Views
1 Reply
Message 1 of 2

Family Reload From

lumoric
Contributor
Contributor

How to programmatically assign a new path to a family? 

family.LookUpParameter("File Path") returns the path but the parameter is read only.

 

I have an almost identical family I'd like to replace in document but don't know how. I've tried temporary storing Parameters from old family and assigning them no a new one upon LoadFamily(), but it also doesn't work.

When I do it manually, right click on family tree > reload and repath, it works perfectly. All old parameters stay the same value.

 

Thanks,

Luka

 

 

 

 

0 Likes
790 Views
1 Reply
Reply (1)
Message 2 of 2

Sean_Page
Collaborator
Collaborator

Try using the overloaded. Ersionnof the LoadFamily() method that allows you to specify options like overwrite Parameters.

 

https://www.revitapidocs.com/2016/cb950c8e-f440-c6db-8563-d1dd16ef3fee.htm

Sean Page, AIA, NCARB, LEED AP
Partner, Computational Designer, Architect
0 Likes