If you are just learning the Inventor API, these webcasts delivered in the spring of 2010 are a great resource. There are labs for each section. (A slide in the presentation). The finished labs that are downloaded with the webcast recordings are very useful however the lab instructions do not have much detail.
When I do labs I usually want to have step by step instructions. If you are like me then the steps in these VB.NET projects will be better. There are four VB .NET projects in the zip file.
- Labs
- Labs_Compete
- Lab_10_AddIn_Add_To_Ribbon
- Lab_10_Complete_AddIn_Add_To_Ribbon
The Labs project creates a standalone executable that connects to Inventor from out of process. Lab_10_AddIn_Add_To_Ribbon project is an Add-In created by the SDK Add-In wizard.
Here is an example of the Instructions in the Labs project:
' ***** Start of LAB 2 ***********************
' 2.1 Add a procedure called iProps.
' Note: put the End Sub below step 2.19
' 2.2 Declare a variable as a PartDocument
' Name it m_PartDoc
' 2.3. Make a new PartDocument by using the Add
' method of the documents collection of the
' Application(variable created in step 3 of LAB1)
' (Instantiate the variable created in 2.2)
' 2.4. Use a For Each loop and iterate through
' all the PropertySets in the PartDocument
' created in step 2.3.
' Note: put the Next statement below Step 2.10
' 2.5. Use Debug.print and print the DisplayName
' of the PropertySet
' 2.6. Use Debug.print and print the InternalName
' of the PropertySet
' 2.7. Use a For Each loop and iterate through
' all the Property in the PropertySet created in
' step 2.4.(in the For Each statement)
' Note: put the Next statement below Step 2.10
You can use Labs_Complete if you have trouble getting the lab to work right.
Here is a synopsis of the labs.
Lab1: Access the Application Object – Connect to an Inventor session change the ActiveView and the caption of the Inventor Window.
Lab2: iProperties - In this lab you create a procedure that creates a new part document and sets a few iProperties for the part.
Lab3: UnitsOfMeasure and parameters - Use UnitsOfMeasure to test to see if a string you get from the user is valid. If the value is valid you convert it to a different unit and use the value to update a parameter.
Lab4: WorkFeatures Sketch & Fetures - Access workaxes and workplanes. You create a new workaxis and workplane. You also create a new part, add a sketch and then extrude it. You also create a SweepFeature. (It needs a SketchLine3d)
Lab5: B-Rep: In this lab you get information about a selected edge using the curveEvaluator of the edge. You also use the B-Rep API to traverse the solid. You also use LocateUsingPoint and FindUsingRay to get geometry of the model.
Lab6: – (not finished) It would have done more with the B-Rep API
Lab7: Sheet Metal – Demonstrates the creation of sheet metal face and cut features. It creates a new sheet metal document, creates a face feature, a cut feature and another face feature. You also create a R12 DXF file.
Lab8: Assembly Occurrences - Create an assembly and place components. You will also see how to move occurrences by transforming them. This lab also has instructions for exploring proxies and how to add constraints.
Lab9: Drawings - Create an idw file and see how to add a dimension
Lab10: Add-In – Create an AddIn that adds buttons to the part and assembly ribbon. The project you complete was created by the Add-In wizard. To get your Add-In to load make sure to edit the .addin file and put the file in a location where Inventor will find it.
The instructions in these labs require some experience with VB.NET programming. If you are just getting started with programming then be sure to go through the “My First Plug-In” training first.
Wayne Brill