Message 1 of 4
Inventor 2023 interface breaking somehow related to my iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
updated 7/11/24 after error occurred again
TLDR:
Rarely when I run one of my rules, without a clear connection to one rule, and always while in a drawing document, the Inventor application acts as though some primary service silently failed. I am having trouble debugging this issue. What could cause the symptoms I am seeing?
What Inventor does:
This issue has happened on multiple computers, Win11 and Win10, running Inventor 2023.4.1
- Most obviously, the top control bar of the application looks as though Inventor is running inside another window. See the attached image.
- Most of the interface breaks. Control bar, ribbon, and all right-click menus buttons do nothing. Using hotkeys for these functions also fails. Once in sketch edit mode it is not possible to exit (though some rules run as though the sketch is exited anyway?)
- Some operations still run. Can close documents, closing a doc prompts to save and saves without the advanced save associated docs options. Can open files from computer. Can use the 3d interface (move and edit drawingViews, delete dims, make changes within a sketch, etc.)
- iLogic rules run from the "Global Forms" section, but can run into some errors, for instance when coloring DrawingCurves.
- If I close the primary Inventor window, it closes immediately without prompts. If I check command prompt afterwards, Inventor is still running, but without any interface, and I need to end the task.
My use of iLogic:
I have been programming using iLogic for a few years now. I can't post it all, but let me know if there are specific areas I should describe in more detail. I have been redesigning the wheel in a way that suits my obsession for modularity:
- My architecture involves several AddVbFile statements and often a module or class overriding the default iLogic structure within the rule I am writing. The only other interop I use is simple RunExternalRule without passing any NameValueMap.
- Some of my attached vb files need access to the Inventor application or other interface stuff:
System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")
Dim oCompManaged As IStandardObjectProvider = Autodesk.iLogic.Interfaces.StandardObjectFactory.Create(oComponent.Parent.Document)
Dim iPart = oCompManaged.iPart
' stuff happens
oCompManaged.Dispose()
- I have a live and a working repo, and everything is inside a dropbox folder so I get everyone's data. Our project folder and libraries are all synced live in a dropbox folder. I know, this does create issues sometimes, but it works at least as well as I have seen vault work for a company at my scale.
- I built an object associating a transaction, loading bar, etc with code being being run. I use try/catch blocks to avoid run-away transactions. Transaction management does not seem to be causing my issue.
- I am saving and loading user preferences and history to text files and/or embedding it into Inventor objects using Attributes. On occasion this fails due to locked file errors. This seems unrelated to my issue.
- I built custom windows forms to handle every kind of user interaction needed. Some of these time-out and close themselves asynchronously using system.threading. I also have set my form.parent to
ThisApplicationWindow.AssignHandle(ThisApplication.MainFrameHWND)
- I built and optimized modular functions to find components via search string within any type of input object including the browser. These are recursive functions and they often catch weird object errors.
- I am handling errors and logging to text files to allow me to remotely debug errors that my team reports. The breaking application does not throw any errors in iLogic. Once the application is broken, some things start throwing weird browser or document related errors.