diff --git a/pkg/freecad/silo_origin.py b/pkg/freecad/silo_origin.py index 29892d3..d78600c 100644 --- a/pkg/freecad/silo_origin.py +++ b/pkg/freecad/silo_origin.py @@ -329,6 +329,24 @@ class SiloOrigin: FreeCAD.Console.PrintError(f"Silo open item failed: {e}\n") return None + def openDocumentInteractive(self): + """Open document interactively via Silo search dialog. + + Shows the Silo_Open dialog for searching and selecting + a document to open. + + Returns: + Opened App.Document or None + """ + try: + cmd = FreeCADGui.Command.get("Silo_Open") + if cmd: + cmd.Activated() + return FreeCAD.ActiveDocument + except Exception as e: + FreeCAD.Console.PrintError(f"Silo open failed: {e}\n") + return None + def saveDocument(self, doc) -> bool: """Save document and sync to Silo. @@ -402,6 +420,26 @@ class SiloOrigin: ) return False + def saveDocumentAsInteractive(self, doc) -> bool: + """Save document interactively with new identity. + + For Silo, this triggers the new item creation form which allows + the user to select category and create a new part number. + + Args: + doc: FreeCAD App.Document + + Returns: + True if operation succeeded + """ + if not doc: + return False + + # For Silo, "Save As" means creating a new item + # Trigger the new item creation form + result = self.newDocument() + return result is not None + # ========================================================================= # Extended Operations # =========================================================================