Inventor 2024 & Windows Forms with Visual Studio 2019

Inventor 2024 & Windows Forms with Visual Studio 2019

MICHAEL.JONES.AMCE
Advocate Advocate
496 Views
6 Replies
Message 1 of 7

Inventor 2024 & Windows Forms with Visual Studio 2019

MICHAEL.JONES.AMCE
Advocate
Advocate

Summary:

We are trying to create a VB.net form to integrate with iLogic rule.

 

Error code:  0X80131500

 

Environment:

Inventor 2024

Visual Studio 2019 Version 16.11.31 (updated 11/9/23)

Targeted Net 5.0

 

Details:

We can add in a Windows Form - but as soon as we add in the Inventor 2024 iLogic references the form will no longer load.

 

Unknown error.

MICHAELJONESAMCE_0-1699535785850.png

After doing a rebuild and when we attempt to load the form we get the following error dialog

MICHAELJONESAMCE_1-1699535966268.png

 

Can we no longer utilize Windows Forms with Inventor 2024?

 

If not, then can we attach WPF forms to the iLogic rules?

 

Thanks in advance for any and all assistance.

 

M.

 

 

0 Likes
Accepted solutions (1)
497 Views
6 Replies
Replies (6)
Message 2 of 7

Michael.Navara
Advisor
Advisor

WinForms works well for me in Inv 2024.1

But the issue can be in target .NET version. You need to use .NET Framework 4.8 instead of .NET 5

 

Message 3 of 7

MICHAEL.JONES.AMCE
Advocate
Advocate

Wondered if that was the case.  WIll need to submit a request to IT to install the .NET Framework 4.8. 

 

They should be able to install it sometime next week. 😞

 

Will report back once it's installed.

 

 

0 Likes
Message 4 of 7

Michael.Navara
Advisor
Advisor

If you have Inventor installed, you have installed .NET Framework 4.8 also. This si a mandatory component.

But you need to start (or modify existing) project in VS to use .NET Framework 4.8

MichaelNavara_0-1699546676305.png

Screen shot is from VS 2022 but in 2019 it is similar.

0 Likes
Message 5 of 7

MICHAEL.JONES.AMCE
Advocate
Advocate

We do not show the option for .NET Framework 4.8 - stops at .NET Framework 4.7.2.

 

MICHAELJONESAMCE_0-1699547058626.png


There is a download option - so hopefully out overworked and underpaid IT department will be able to install it sometime next week.

MICHAELJONESAMCE_1-1699547170729.png

Will try at home where the PC is locked down by an over zealous IT department  🙂

 

Thanks again for the assistance.

 

0 Likes
Message 6 of 7

Michael.Navara
Advisor
Advisor
Accepted solution

You can use any older version.

Here are two sample projects (C# and VB.NET)  which works for me.

 

Launch rule

 

AddReference "C:\Path\To\bin\Debug\FormSampleCSharp.dll"
AddReference "C:\Path\To\bin\Debug\FormSampleVbNet.dll"

Dim form1CSharp As New FormSampleCSharp.Form1()
form1CSharp.PartNumber = iProperties.Value("Project", "Part Number")
Dim dialogResult1 = form1CSharp.ShowDialog()
iProperties.Value("Project", "Part Number") = form1CSharp.PartNumber

Dim form1VbNet As New FormSampleVbNet.Form1()
form1VbNet.PartNumber = iProperties.Value("Project", "Part Number")
Dim dialogResult2 = form1VbNet.ShowDialog()
iProperties.Value("Project", "Part Number") = form1VbNet.PartNumber

 

 

Message 7 of 7

MICHAEL.JONES.AMCE
Advocate
Advocate

Thank you again for your assistance.

 

We were able to remove multiple iLogic prompts into a single dialog.

 

MICHAELJONESAMCE_0-1699623864684.png

 

0 Likes