7) Some tips for Autodesk Inventor C++ programmers

Top  Previous  Next

Here are some tips, in no particular order, I've found useful when programming AutoDesk Inventor in C++


Tip1) Check your return values, hRes and COM pointers etc. I know it makes your code look messy, but you are flying blind otherwise. If speed is really a problem then take the out the checks only at the very end of the development.


Tip 2) Make sure that you know how to do manually what you are trying to do programatically. Else you may end up trying to debug source code when you should be debugging the manual method.


Tip 3) Name objects sensibly. "Part1" and "Assemby3" are less useful when debugging than "InnerTube" and "MainBikeAssembly".


Tip 4) Don't do programatically what may be easier to do by hand. For example you can make a parametric object by hand and simply change the parameters with your program.


Tip 5) If you know VB or C# then when in difficulty test using those languages. These are far more interactive than C++, even with the IDE.






Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)