diff --git a/pkg/freecad/silo_commands.py b/pkg/freecad/silo_commands.py index cfc5c70..df66e7c 100644 --- a/pkg/freecad/silo_commands.py +++ b/pkg/freecad/silo_commands.py @@ -1894,6 +1894,13 @@ class Silo_Pull: if not has_any_file: if existing_local: FreeCAD.Console.PrintMessage(f"Opening existing local file: {existing_local}\n") + # Pull assembly dependencies before opening (#337) + try: + item = _client.get_item(part_number) + except Exception: + item = {} + if item.get("item_type") == "assembly": + _pull_dependencies(part_number) FreeCAD.openDocument(str(existing_local)) else: try: diff --git a/pkg/freecad/silo_origin.py b/pkg/freecad/silo_origin.py index d78600c..818025e 100644 --- a/pkg/freecad/silo_origin.py +++ b/pkg/freecad/silo_origin.py @@ -315,13 +315,8 @@ class SiloOrigin: FreeCAD.Console.PrintError(f"Silo open failed: {e}\n") return None - # Try to find existing local file by part number - # (UUID lookup would require API enhancement) - local_path = find_file_by_part_number(identity) - if local_path and local_path.exists(): - return FreeCAD.openDocument(str(local_path)) - - # Download from Silo + # Route through open_item() which pulls assembly dependencies + # before opening, ensuring PropertyXLink references resolve (#337) try: doc = _sync.open_item(identity) return doc