# autos.skills.solidWorks.help 库模块帮助文档

## autos.skills.solidWorks 成员列表 <a id="autos.skills.solidWorks" href="#autos.skills.solidWorks">&#x23;</a>

### autos.skills.solidWorks.help() <a id="autos.skills.solidWorks.help" href="#autos.skills.solidWorks.help">&#x23;</a>
创建离线 SOLIDWORKS API 文档助手。首次缺少缓存时自动获取最新 Release，使用 web.rest.githubMirrors 镜像下载并校验；已有缓存完全离线复用。  
无需调用 download，也不连接 SOLIDWORKS。失败返回 null,err。  

[返回对象:swHelpObject](#swHelpObject)

### autos.skills.solidWorks.help(options) <a id="autos.skills.solidWorks.help" href="#autos.skills.solidWorks.help">&#x23;</a>
可选指定 {cacheDir="缓存目录"}；默认 %LOCALAPPDATA%\aardio\autos\solidWorks\help。缓存为 ZIP + JSON 目录索引，不解压大量小文件。  

[返回对象:swHelpObject](#swHelpObject)

## sw_help 成员列表 <a id="sw_help" href="#sw_help">&#x23;</a>

### sw_help.info() <a id="sw_help.info" href="#sw_help.info">&#x23;</a>
返回缓存纯数据摘要：release（文档包版本，不是 SOLIDWORKS 版本）、fileCount、categories、cacheDir、archivePath、sha256、checksumVerified、fromCache、sourceUrl。

### sw_help.read(topic,options) <a id="sw_help.read" href="#sw_help.read">&#x23;</a>
读取 API 名称、类型/枚举名或 search 返回的 path；例如 IFeatureManager.FeatureExtrusion3、IFeatureManager::FeatureExtrusion3、[[IModelDoc2]]、swDocumentTypes_e。同名歧义须用精确路径。  
可选 {start=1;limit=16000}，均按 Unicode 字符计数，limit 1..100000。  
返回 {text,path,title,release,start,end,totalChars,truncated,nextStart}，按 nextStart 续读，不截断 UTF-8 字符。失败返回 null,err。

### sw_help.search(query,options) <a id="sw_help.search" href="#sw_help.search">&#x23;</a>
忽略大小写的字面关键词查询；空白分隔多个关键词，全部匹配（AND），不是正则。默认先查 API 名称/路径。  
可选 {fullText=true;scope="examples";limit=10;offset=0}；scope 可为 types/enums/examples/docs/index 或 types/IModelDoc2 等目录。limit 1..100，offset 从 0 开始。  
返回 {items=[{path,title,scope,bytes,matchedIn,snippet}],total,truncated,nextOffset,release}，失败返回 null,err。全文查询会扫描所选范围的正文。

### sw_help.update() <a id="sw_help.update" href="#sw_help.update">&#x23;</a>
强制重新查询最新 Release 并镜像下载，即使版本未变也重新下载；成功返回 info 摘要，失败返回 null,err 并保留当前实例和旧缓存。一般无需调用。
