Run PowerShell against Inventor
scriptRun arbitrary PowerShell with full Inventor COM API access and user permissions when dedicated tools don't fit, returning one JSON line.
Instructions
Escape hatch for anything the other tools don't cover: runs arbitrary PowerShell with full access to Inventor's COM API and the user's permissions. Predefined: $inv (Inventor.Application), $MISSING (for optional COM arguments), Get-Doc (document by display name, or active) and FaceInfo (area/center in mm). The script must write exactly one line of JSON, e.g. @{ n = $inv.Documents.Count } | ConvertTo-Json -Compress. Prefer the dedicated tools when they fit; this one can modify or close documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | PowerShell code to run. Must output a single line of JSON. | |
| timeout | No | Seconds to wait before the script is abandoned. |