@@ -7,3 +7,46 @@ Details: https://wiki.access-codelib.net/ACLib-Import-Wizard
77[ Video: create new Access application] ( https://access-codelib.net/videos/ACLib-Import-Wizard/neue-anwendung-erstellen/ )
88
99[ Video: Import from GitHub repository] ( https://access-codelib.net/videos/ACLib-Import-Wizard/ACLib-Import-Wizard_ImportFromGitHub.mp4 )
10+
11+ #### Automation API
12+ The wizard can be used without UI, e.g. from scripts or AI agents.
13+ ` API ` returns a JSON string:
14+
15+ ``` vba
16+ Application.Run "<add-in path without .accda>.API", "<Command>", "<Files>", "<Options>"
17+
18+ ' Example (installed add-in)
19+ Application.Run Environ("APPDATA") & "\Microsoft\AddIns\ACLibImportWizard.API", _
20+ "Resolve", "form/filter/FilterControlManager.cls", "mode=missing"
21+ ```
22+
23+ | Command | Arguments | Result |
24+ | ---| ---| ---|
25+ | ` GetVersion ` | - | add-in and API version |
26+ | ` GetConfig ` | [ Options] | configured repositories, resulting source |
27+ | ` ListInstalled ` | - | ACLib modules in the current database (` <file> ` from the codelib block) |
28+ | ` Resolve ` | Files, [ Options] | read only: files incl. dependencies, references, tests, planned action (` import ` /` skip ` /` overwrite ` ), missing files |
29+ | ` Import ` | Files, [ Options] | imports like the wizard form; imported/skipped files, missing dependencies, added/removed references, messages |
30+
31+ * Files: ` "data/SqlTools.cls;text/String2.cls" `
32+ * Options: ` "mode=missing|all|selected;tests=0|1;examples=0|1;source=config|local|github;repo=owner/name@branch" `
33+ (defaults: ` mode=missing ` , ` tests=0 ` , ` examples=0 ` , ` source=config ` = local repository if configured, otherwise GitHub ` AccessCodeLib/AccessCodeLib@master ` )
34+
35+ Result: ` {"ok":true,...} ` or ` {"ok":false,"error":{"number":...,"source":"...","description":"..."}} ` (no message boxes).
36+
37+ ``` json
38+ {"ok" :true ,"source" :" local" ,"repository" :" C:\C odeLib\A ccessCodeLib\\ " ,"mode" :" missing" ,"tests" :false ,"examples" :false ,
39+ "files" :[{"name" :" String2" ,"file" :" text/String2.cls" ,"type" :" class" ,"action" :" import" },
40+ {"name" :" _AccessCodeLib_license" ,"file" :" _codelib/license.bas" ,"type" :" module" ,"action" :" skip" },
41+ {"name" :" StringTools" ,"file" :" text/StringTools.bas" ,"type" :" module" ,"action" :" import" }],
42+ "missing" :[],"references" :{"added" :[],"removed" :[]},"executes" :[],"messages" :[]}
43+ ```
44+
45+ Notes:
46+ * The add-in and the target database must be in trusted locations. Otherwise Access shows a
47+ security prompt (the call blocks) or disables code.
48+ * ` Import ` stops before importing if a selected file is not available. Missing dependencies are
49+ skipped (as in the wizard form) and listed in ` missing ` .
50+ * Compile the project after ` Import ` and check the result.
51+ * With [ msaccess-vcs-mcp] ( https://github.com/joyfullservice/msaccess-vcs-mcp ) :
52+ ` vcs_call_vba(database_path="<target>.accdb", function_name="<add-in path without .accda>.API", args=["Resolve", "text/String2.cls"]) `
0 commit comments