Repository navigation
Open
Labels
Description
Summary
Dynamo for Revit has no out-of-the-box way to load a family (.rfa) into the active document from a file path. Requesting a new Family.LoadFromFile node, with load behavior controlled by a new FamilyLoadOptions object.
Motivation
- Samples: The adaptive components sample graph depends on
AdaptivePanel.rfa, which ships in the Dynamo samples data folder (e.g.C:\Program Files\Autodesk\Revit 2027\AddIns\DynamoForRevit\Samples\Data) but is not loaded in the Snowdon Towers sample model. Users have to leave Dynamo, locate the file, load it manually in Revit, then return and fix the family selection. With this node the sample could load its own dependency. See https://forum.dynamobim.com/t/revit-adaptive-components-sample-file/115215 - Forum: Loading families from a directory is a recurring forum request.
- Python migration: Today the only routes are custom packages or a Python node. The Python route requires implementing the
IFamilyLoadOptions.NET interface, which is a common reason package authors cite for being unable to move off IronPython 2.
Proposed API
Family.LoadFromFile(filePath, familyLoadOptions = null) -> Family
Wraps Document.LoadFamily(string, IFamilyLoadOptions, out Family).
filePath(string): path to the .rfa file.familyLoadOptions(optional): when omitted, uses default options so the simple case stays a single-input node.- Idempotent on re-execution: if the family is already loaded and unchanged, return the existing
Familyrather than null or a failure. - Clear warnings for a missing file, a non-.rfa path, or an invalid document context (e.g. family editor restrictions).
FamilyLoadOptions.ByProperties(overwriteExisting = true, overwriteParameterValues = false, sharedFamilySource = "Family")
A Dynamo-side class implementing IFamilyLoadOptions, so users never have to implement the interface themselves.
overwriteExisting: return value ofOnFamilyFound/OnSharedFamilyFound(whether to continue loading when the family already exists).overwriteParameterValues: maps to theoverwriteParameterValuesout parameter.sharedFamilySource: maps toFamilySource(FamilyorProject) for nested shared families.
Follow-up
Once available, update the adaptive components sample graph to load AdaptivePanel.rfa from the samples data folder automatically.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity