Blog · Inventor · 10 Oct 2026 · 3 min read · By Stefano B.
iLogicAuto Is Nothing: why a VBA macro can't find the iLogic add-in
The usual VBA helper that runs an iLogic rule from a button returns Nothing and quietly exits. A cause we found in copies of it, measured in Inventor 2025 VBA, a version of the function that says why it fails, and the RunRule versus RunExternalRule mix-up.
Short answer: one cause we reproduced: a stray character in the GUID of your copy of GetiLogicAddin. In the Autodesk thread below it shows as a ?; we got the same failure with an invisible character (U+200B). ItemById fails on it, On Error GoTo NotFound hides the error, and the function returns Nothing. Retype the GUID, {3BDD8D79-2179-4B11-8A5A-257B1C0263AC}, and use a version that shows the error instead of hiding it.
Measured in Inventor 2025.2, October 2026, with both functions run as VBA macros inside Inventor.
What we measured
| GUID passed to ItemById | Old function | Function below |
|---|---|---|
{3BDD8D79-2179-4B11-8A5A-257B1C0263AC} |
works | works |
| same, lower case | works | works |
with ? after 3bdd8d79 |
Nothing, no message | "Method 'ItemById' of object 'ApplicationAddIns' failed" |
with an invisible character (U+200B) after 3bdd8d79 |
Nothing, no message | same message |
In an Autodesk thread with 28,000+ views, two of the four posted copies of the function carry the ?. A user spotted it in 2013, and the same symptom was asked again in 2022.
A version that tells you why
Replace only the helper. The rest of the macro stays as it is.
Function GetiLogicAddin(oApplication As Inventor.Application) As Object
Dim addIn As ApplicationAddIn
On Error Resume Next
' if it still fails, retype this GUID by hand: copies from web pages can carry a stray character
Set addIn = oApplication.ApplicationAddIns.ItemById("{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}")
If Err.Number <> 0 Or addIn Is Nothing Then
MsgBox "iLogic add-in not found: " & Err.Description
Exit Function
End If
On Error GoTo 0
If Not addIn.Activated Then addIn.Activate
Set GetiLogicAddin = addIn.Automation
End Function
On Error GoTo 0 comes before Activate and Automation, so if one of those fails you see that error too. In the old version any of the three gave the same silent Nothing.
RunRule or RunExternalRule
They look alike and are not interchangeable. On a rule stored inside the part, measured:
| Call | Result |
|---|---|
iLogicAuto.RunExternalRule oDoc, "MyRule" |
error: Cannot find an external rule file named: "MyRule" |
iLogicAuto.RunRule oDoc, "MyRule" |
runs |
RunExternalRule is for rule files kept outside the document. If your rule lives in the part, call RunRule.
Do and don't
Do
- Type the GUID by hand, or check it character by character.
- Show the error in the helper instead of returning Nothing.
- Use
RunRulefor rules inside the document.
Don't
- Don't paste GUIDs from forum posts without looking at them.
- Don't use
On Error GoToa label that does nothing: it hides the cause.
Questions people ask
Did this change in a newer Inventor version?
We tested Inventor 2025 only. There the clean GUID works in upper and lower case, and ApplicationAddIns.ItemById is the documented way to get the add-in.
Does the add-in have to be activated? Activate it if it is not, as above. It costs nothing.
Can I run iLogic rules from outside Inventor, from a script or an AI agent?
Yes. From Python with late binding, AddRule and RunRule work; from VBScript they do not, and you need a bridge. See running an iLogic rule from outside Inventor.