← Commit history

v1.9.29: restored test-project helpers

John Lauer ·93eb19d878 ·2mo ago ·parent 3eb7302
4 files changed +27−6
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.28\ No newline at end of file+1.9.29\ No newline at end of file
adom-bridge-fusion-manifest.json+4−4
@@ -1,10 +1,10 @@ {     "manifest_version": 1,     "name": "fusion360",-    "version": "1.9.28",-    "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.28/adom-bridge-fusion-v1.9.28.zip",-    "sha256": "87e49c4489c299f4dc478daf78f33554f1418a02a73775d70238e1555501179c",-    "size": 379445,+    "version": "1.9.29",+    "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.29/adom-bridge-fusion-v1.9.29.zip",+    "sha256": "7267697dff96a35ee9529206ddb42924e1cdf59ef936b5070ca4d23a9be5f2e0",+    "size": 379606,     "verbPrefixes": [         "fusion_"     ],
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.9.28",+  "version": "1.9.29",   "description": "Drive Autodesk Fusion 360 from the cloud: launch Fusion, electronics board layout, design rules, exports (STEP/IGES/STL/3MF/USDZ/OBJ/DXF/DWG/Gerbers/BOM/CPL), fast APS server-indexed cloud search plus browse/recent/file-info/versions, cloud file download/upload and folder creation, and in-app parametric modeling (fusion_run_modeling_script). Never-charge: APS calls are capped to the free tier.",   "homepage": "https://wiki.adom.inc/adom/fusion-bridge",   "author": "Adom Inc.",
server.py+21
@@ -6085,6 +6085,27 @@ def _mtp_generate(lib_name, ex, part_name, urn="", rex=None, r_urn=""):     return sch, brd  +_TEST_PROJECT: dict = {}+++def _test_project_activate(kind):+    """Activate the test project's sch or brd DOCUMENT (newDesignFromLocal re-open =+    activate). Returns True when the doc is confirmed active."""+    import time as _t+    if not _TEST_PROJECT:+        return False+    path = _TEST_PROJECT.get(kind)+    if not path:+        return False+    _proxy_to_addin("execute_text_command", {"command": "Document.newDesignFromLocal %s" % path}, timeout=60)+    for _ in range(6):+        _t.sleep(2)+        st = _proxy_to_addin("get_app_state", {}, timeout=10)+        if _TEST_PROJECT["docBase"] in str((st.get("data") or {}).get("activeDocument", "")).lower():+            return True+    return False++ def _orchestrate_make_test_project(args: dict) -> dict:     """Generate + import a minimal test project around a library part.