Blog · Inventor · 1 Oct 2026 · 4 min read

Inventor API errors and what they really mean: err 5, 429, 0x80080005, Unspecified error

Inventor's COM errors rarely name the real cause, and some calls succeed while doing nothing. A reference of the errors and silent failures we met automating Inventor 2025 from scripts, with the cause and the fix for each.

Inventor's API errors are short and rarely point at the real problem. Worse, some calls return success and do nothing. This is the reference we wish we had: every error and silent failure we met while an AI agent drove Inventor 2025 from scripts, with the cause and the fix.

Connection errors

Error Where Cause Fix
0x80080005 CO_E_SERVER_EXEC_FAILURE CreateObject("Inventor.Application") Inventor is already open; this tries to start a second one GetObject(, "Inventor.Application")
429 CreateObject Inventor is closed Open Inventor, then GetObject
0x80131165 Type library is not registered GetActiveObject from PowerShell PowerShell route does not work Run a .vbs with cscript
FileNotFoundException Compiled C# at run time Interop DLL not next to the .exe Copy Autodesk.Inventor.Interop.dll beside it

Full setup: how to drive Inventor from the terminal without an MCP server.

Calls that fail from VBScript

Error Call Cause Fix
Invalid procedure call or argument (err 5) iLogic AddRule, RunExternalRule From outside the process, calls taking a Document fail Run the rule from inside: iLogic bridge
Type mismatch (13) SurfaceEvaluator.GetNormal, Evaluator2D.GetParamExtents They return arrays by reference Compiled C#
does not work Matrix.AsArray() Same limit Compiled C#
err 500, always CallByName on Inventor objects Not supported on these COM objects Call the property directly
fails on the second loop Dim inside For Each VBScript limit Declare variables before the loop
overflow CInt Limit of 32767 CLng

Calls that fail in the drawing

Error Call Cause Fix
Invalid procedure call or argument DXF SaveCopyAs No translator ini file Write the ini first: DXF and PDF export
Unspecified error export, after a few files Orphan models left open by earlier drawings Close everything the script opened
Unspecified error, file rolled back Document.Save Several Inventor processes running One Inventor only; back up before saving
err 5 Transform on an occurrence Matrix built from printed values: determinant 1.00000015 Copy occ.Transformation instead of rebuilding it
err 13 Add(collection) when inserting bodies Wrong overload AddByDefinition
Style Conflict dialog editing a template Template styles differ from the library Copy the style (TextStyle.Copy) and change the copy

Calls that succeed and do nothing

These are the dangerous ones. No error, wrong result.

Call What happens What to do
AddTitleBlock(..., PromptStrings) Returns OK, fills no field Put the values in the part's iProperties, use property fields in the title block, then Update()
PDF SaveCopyAs with context 13075 No file, no error Context 13059
Unfold() on a STEP solid "Succeeds" on parts that are not bent plates Check the result before trusting it
Flat view with SheetMetalFoldedModel = False With no flat pattern, Inventor quietly draws the folded part Check the part has a flat pattern first
DrawingView.Camera + ApplyWithoutTransition Base view turns, projected views stay rotated: wrong but plausible dimensions Create the three base views, measure them, keep the one with the largest area
SurfaceBodies.Item("Solid8") Does not look up by name Loop and compare Name
SurfaceBody.Delete Does not delete a body imported from STEP Copy the bodies you want into a new part instead
DrawingCurve.Visible Always reports zero for hidden lines Hidden state is on the curve segments
Close after a hung Documents.Add Returns 0, closes nothing Restart Inventor
a silent Catch in your own code Hides the real error Log every exception

Units: the error with no message

The API works in centimetres. Not the document units, not the sheet scale.

Text and encoding

Symptom Cause Fix
Dimension text doubles up <<>> appends text Use the <DimensionValue/> token in FormattedText
Value still shows after editing text Value not hidden HideValue = True first
Line break shows as text \P or vbLf <Br/>
CSV read as garbage in VBScript OpenTextFile format -1 is UTF-16, not UTF-8 Read the file as ANSI
Rule file corrupted sed -i broke UTF-8 Edit with a tool that keeps the encoding
File left at zero bytes UnicodeEncodeError halfway through a write Write to a temporary file, then rename
Python crashes on Ø Console encoding PYTHONIOENCODING=utf-8

The rule behind all of this

No result counts until it has been checked in the file. A run that ends without errors has proved only that it ended. Read the values back, count the entities, render the drawing and look at it.

Questions people ask

Where are the enum values documented? In the Interop DLL. Read them by reflection rather than writing them from memory: values we wrote from memory were wrong.

Which Inventor version is this? Inventor 2025. Other versions may behave differently; test before relying on any row of these tables.