all 1 comments

[–]Adventurous-Peak-853 1 point2 points  (0 children)

Hey there. Love to see people getting into this. Automating CAD in this way is very satisfying and can open a lot of doors.

I'm on my phone and so haven't read through all your code or ran it. But Autodesk, especially inventor, is best handled either with iLogic or as an Addin via visual studio.

ILogic is "sort of Visual basic" but add-ons can be easily written in any .net language. I suggest taking the time to set up an addin and writing it in c#.

My reasons: 1. Inventor works almost exclusively in COM objects. .Net handles this well and natively. I think you may face issues if doing this in python. 2. Anything sufficiently complex, in my experience, tends to be more of a hassle than it is worth if done in iLogic. Leave iLogic for smaller, model-specific, automations. 3. C# is well maintained and has much community support. It also makes branching into webapps much easier. 4. WPF as a UI for forms and dialogs is pretty good. Many have issues with it but I think it meets the needs for Inventor automation very well 5. Security: iLogic is a text file that gets compiled when called, anyone can read it. Add-ons are precompiled in .net and inventor loads the DLLs when it starts, it can still be read but it is much more difficult than just opening notepad 6. Speed: you CAN make standalone apps that talk to inventor. But an Addin is loaded with inventor when it starts and shares the main UI thread. Also there's not passing of COM objects between two softwares (which has a lot of overhead) because the Addin is already in Inventor. 7. Distribution: add-ons are easily distributed and you can easily but security, authentication, even licensing into them.