Posts

Inventor Addins and Assembly Binding Redirect... Ew.

Image
For those of you brave souls who have ventured forth into the wild and wacky world of writing plugins for Autodesk Inventor, you may have run into some baffling issues while trying to use 3rd party packages, and I want to throw this out so that if any of you have this issue, you can benefit from me battling the bewilderment.  I'm currently writing a plugin for inventor using mostly FSharp. Yeah, you can do that, and yeah, it's totally amazing, like any use of FSharp. So in my fervor and masocistic need to never settle for the bare minimum, I decided it would be amazing to use the Elmish Model-View-Update style of doing things, using Elmish and Elmish.WPF for creating my user interface.  And.. it IS amazing, but ..  Well instead of being able to use the very latest and greatest available to us, since Inventor itself is still in the .NetFramework land instead of the new hotness of .Dotnet 6 and beyond, we have no choice but to use some funky work arounds when using...

Part Smarter, not harder.

Image
One way to simplify the process of using parts in inventor is to make a master part file that's driven by parameters and then create a rule in ilogic to save all of your info for each configured variant of that part into the .ipt file, swapping them out when the params change. I've been doing this with Json into a custom AttributeSet, and it seems to work pretty awesome. I've got these .ipt's I call smartparts, and what I do is I make a class that holds a bunch of data to drive the parameters of the model file. i just serialize and deserialize from there. So, for instance, for a pipe you could write this in a rule: Sub main Dim PipeList As List ( Of Pipe ) = New List ( Of Pipe ) Dim SchList As List ( Of ScheduleTableValues ) = New List ( Of ScheduleTableValues ) Dim JSeri As JavaScriptSerializer = New JavaScriptSerializer AttName = "JSON" Dim ThisPartDocument As PartDocument = ThisApplication . Documents . ItemByName...

Made2Manage Database writing using EFCore, or things I wish I knew before goring myself on the unicorn's horn.

Image
  If you're reading this, and you're doing it on purpose, you're likely shocked that anyone is bothering on about trying to interact with Aptean's Made2Manage SQLServer database to begin with, mostly because you're not sure you should be doing it yourself. But you've got an "INCREDIBLE IDEA!™" and come hell or high water, you're going to dive in and make it happen.  Ok, I can't blame you, I'm the same way.  So, the way I've chosen to tackle this is through using my good friend C# on the latest Language Version 9, .Net 5 release, with WPF DataGrid, MVVM with the help of the utterly fantastic framework Prism, which can be found on the Prism Website , and then learned about at Brian Lagunas' Youtube channel , which is unbelievably good, and last, but not least, EFCore. The rest of this little post is going to be focused on the last part, specifically things that would have saved me the last few days of headache if I had known about the...