Hello Inventor - vb.net Visual Studio - getting started
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Some of my previous requests relate to a grand idea to import a list of files into Inventor for further processing - printing, converting, replacing references on drawings, shrinkwrapping - a little like the task scheduler but the list can be exported from the PDM system & imported to excel & tweaked accordingly.
A VBA version to replace drawing references has been produced but VBA is 'unsupported' so a VB.net tool is being sort. (thanks: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/set-drawing-scale-from-list-using-vb... )
My guess is to move data between Excel & Inventor I need a better understanding of sub, function, public & private - relating to Inventor & Excel & how the lines of code target the information - there is a lot of code available & I can have it trigger error messages.
Here is 'Hello Inventor' - just finding code to launch Inventor took some searching..
After creating a windows form this was added in the button sub & it works, as in it will open Inventor:
Dim proc As New System.Diagnostics.Process()
proc = Process.Start("C:\Program Files\Autodesk\Inventor 2018\Bin\Inventor.exe", "")
Dim oPart As Document
Dim oPartPath As String
Dim Thisdoc As Inventor.Document
It was just a test to see how to open Inventor ( ideally Apprentice will be used for the finished tool).
Further testing to open specific files is throwing up errors which don't happen in iLogic because iLogic sits on Inventor & Visual Studio is outside Inventor. This project is to chop & change from file to file which (I'm advised) isn't iLogic friendly. ( also compared to iLogic efforts the VBA version is fast!).
The code between lines 18-35 was pasted in from an iLogic post with the intention it could be converted but the error messages are stumbling blocks.
Lines 33/34 are for the next test - have them opened/closed in Inventor by the form - just to test it can be done.
Great to see this tutorial:
http://www.hjalte.nl/60-creating-an-inventor-addin
Would be ideal if a pure vb.net version could be offered ( @JelteDeJong ) ; I did read if there are other ideas out there forward them on!
Back to the search...
Regards
Andrew
Regards
Andrew