Inventor 2024 vs 2025 VBA/SQL Macro

Inventor 2024 vs 2025 VBA/SQL Macro

FAudet87ALV
Explorer Explorer
755 Views
5 Replies
Message 1 of 6

Inventor 2024 vs 2025 VBA/SQL Macro

FAudet87ALV
Explorer
Explorer

Hi everyone

We have done in here locally a macro thats push out all the information about a solid to another software with an ilogic script this was done using VBA i think,

i'm not the one who write this but i'm using it everyday since the last 3 year, everything was working properly when i was using the script with inventor 2023,last year i did install inventor 2024 everything was still working properly with 2024, i proceed the exact same way to install 2025 but this time this external ilogic script did not work anymore, can anyone could guide me a little bit with what change in inventor2024 vs 2025 that could break this, also i still had 2024 installed on my system and the ilogic script still run perfectly fine on 2024 but as soon as i run it in 2025 i got this error message

 

the script starts like this

' <SilentOperation>False</SilentOperation>
AddReference "System.Data"
AddReference "System.Core"
AddReference "System.Xml"
Imports System.Data.OleDb
Imports System.Data

Imports System.Xml
Imports System.Collections

Class ThisRule
Dim gParentId As Integer = 0
Dim gURL As String = "URL HERE"
Dim gConnectionString As String = "Server Information Username/Password Here"

thanks for your help

 

0 Likes
Accepted solutions (1)
756 Views
5 Replies
Replies (5)
Message 3 of 6

MjDeck
Autodesk
Autodesk

Hi @FAudet87ALV - in the 2025 release, Inventor moved from Microsoft .NET Framework 4.8 to .NET 8. Microsoft has made a lot of changes in .NET, and unfortunately this can cause some iLogic rules to break.
I think your rule can be made to work in Inventor 2025 by using Microsoft.Data.SqlClient. I'm trying to put together a sample.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 4 of 6

FAudet87ALV
Explorer
Explorer

Hi @MjDeck would be highly appreciated if you can help me to convert it to Microsoft.Data.SqlClient

thank you !

 

 

0 Likes
Message 5 of 6

MjDeck
Autodesk
Autodesk
Accepted solution

@FAudet87ALV , it looks like you don't have to use Microsoft.Data.SqlClient. You can continue to use System.Data.Client. That's not in the .NET 8 system, but it's installed with Inventor 2025.

To get it to work, I recommend making a copy of your rule (macro) just for Inventor 2025 and later.

In the 2025 version, add this line at the top:

 

AddReference "System.Data.SqlClient"

 

and in the Imports section, you might need this line:

 

Imports System.Data.SqlClient

 

Those might be the only changes required. Let me know if that works for you.

 


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 6 of 6

FAudet87ALV
Explorer
Explorer

it works now !

not as it was working with 2024 but i think its not related to inventor anymore

 

thanks for your help, appreciated !

0 Likes