Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Crashes form old iLogic code

5 REPLIES 5
Reply
Message 1 of 6
mporterC7FHA
172 Views, 5 Replies

Crashes form old iLogic code

After Loading Inventor 2025, it crashes a couple of times a day doing simple things.  Other people on my team that are not running the iLogic code do not experience the crashes.  How can you find the parts of the code that are causing the problems?

5 REPLIES 5
Message 2 of 6
A.Acheson
in reply to: mporterC7FHA

Hi @mporterC7FHA 

You will need to identify what rules are running and at what time before the crash. If you can isolate the rule then you can work to see what operation was being performed at the time. If you can then post the rule with information on the operation that led to the crash then we might be able to point out a solution or error catching methods to avoid failures like that.

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 6

I always use message boxes to find where the rule stops or crashes.

Do you use external vb.net forms or dll files. Inventor 2025 has changed to net8! This may also lead into issues with I logic than!

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 4 of 6
mporterC7FHA
in reply to: A.Acheson

Thank you for the feedback. Now that I know what to look for, I can figure out what code is running when it crashes. Once I know what crashes it, I will post that so we can take the next step.
Message 5 of 6

There are no calls to vb,net or dll files, although there are calls to excel files.
Message 6 of 6
JelteDeJong
in reply to: mporterC7FHA

Just some other points:

Inventor API is based on .Net core 8 (it used to be based on .Net framework 4.8.) It is a big upgrade but not very important if you are just creating simple iLogic rules. However, if your iLogic rules depend on other dll's (and they are based on .Net framework 4.8) then it might be possible to keep using them but that is not guaranteed. This is something you need to check. (Trial and error.)

A second thing that came up on the beta testing forums.

 


This is a case in which iLogic code that worked in Inventor 2024 and earlier will fail to compile on Inventor 2025. Here is a sample rule:

nameToFind = "Test"
Dim partDoc As PartDocument = ThisDoc.Document

For Each paramX As Inventor.Parameter In partDoc.ComponentDefinition.Parameters
    If paramX.Name.Contains(nameToFind) Then
       Logger.Info("Found {0}", paramX.Name)
    End If
Next


This will produce a compile error: "Late-bound extension methods are not supported."

There are several ways to fix it. The most general way is to change the line to:

If paramX.Name.Contains(nameToFind.ToString()) Then


The error happens because the "nameToFind" variable is an Object, and not a String. So the compiler is looking for an extension method named Contains (on the String class) which takes an argument of type Object instead of String.
In earlier versions of Inventor (running .NET Framework) it would automatically convert the argument to a String and find the Contains method.

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report