Anyone have issues writing PowerShell/API code to use the iLogic Add-in Automation within Inventor 2025?
In 2024 and older releases, I can reference and activate the iLogic Add-in Automation using code like this ($invApp is the Inventor 2024 instance):
$oDoc = $invApp.Documents.Open($file.LocalPath, $true) # open the file
$addIns = $invApp.ApplicationAddIns
foreach ($addIn In $addIns) {
if ($addIn.DisplayName.Contains("iLogic")) {
$iLogicAddIn = $invApp.ApplicationAddIns.ItemById("$($addIn.ClientId)")
if ($iLogicAddIn.Activated -eq $true) {
} else {
$iLogicAddIn.Activate()
}
$iLogicAuto = $iLogicAddIn.Automation
break
}
}
...and $iLogicAuto.RunExternalRule($oDoc, $RuleName) works great.
$iLogicAuto.RunExternalRule($oDoc, $RuleName)
...but when I try to run this code when using Inventor 2025 (with $invApp as the Inventor 2025 instance), I get this error:
Any ideas? The exact same code works when using Inventor 2024 with no errors, but in 2025 I get the "Type Library is not registered" exception.
Anyone have issues writing PowerShell/API code to use the iLogic Add-in Automation within Inventor 2025?
In 2024 and older releases, I can reference and activate the iLogic Add-in Automation using code like this ($invApp is the Inventor 2024 instance):
$oDoc = $invApp.Documents.Open($file.LocalPath, $true) # open the file
$addIns = $invApp.ApplicationAddIns
foreach ($addIn In $addIns) {
if ($addIn.DisplayName.Contains("iLogic")) {
$iLogicAddIn = $invApp.ApplicationAddIns.ItemById("$($addIn.ClientId)")
if ($iLogicAddIn.Activated -eq $true) {
} else {
$iLogicAddIn.Activate()
}
$iLogicAuto = $iLogicAddIn.Automation
break
}
}
...and $iLogicAuto.RunExternalRule($oDoc, $RuleName) works great.
$iLogicAuto.RunExternalRule($oDoc, $RuleName)
...but when I try to run this code when using Inventor 2025 (with $invApp as the Inventor 2025 instance), I get this error:
Any ideas? The exact same code works when using Inventor 2024 with no errors, but in 2025 I get the "Type Library is not registered" exception.
Anyone having this same issue or tried it?
Anyone having this same issue or tried it?
Can't find what you're looking for? Ask the community or share your knowledge.