Is there a VB.NET example available for creating work features?
Work features are objects used to create and position other features and are used when current geometry is not sufficient for constructing features. There are three types of Work features:
Work points are placed on faces, linear edges or on arcs and circles. They can be used to mark pattern centers, define coordinate systems, and define planes and 3d paths.
Work axes can be used to mark symmetry lines, centerlines or distance between revolved features.
Work planes can be used when constructing axes, sketch planes, termination planes and to sketch entities on a part face when it is not available as a sketch plane.
When you use the Inventor user interface to create work features you are able to select objects "visually". For example in the case of creating a workplane tangent to the cylindrical face and parallel to another planar face, in the UI all you have to do is select the cylindrical face and then select the planar face. When doing this using the API we do not have the visual feedback and it is sometimes necessary to query for geometry information in order to determine the shape and orientation of the faces.
One of the attached zip files provides a VB.NET example that uses different methods to create work features. A part named “test.ipt” (2008 format) is included in the zip file and can be used with this example. Currently the code needs to find this ipt in the c:\temp. Open this file and notice there are no user defined work features. Close the ipt and then run the project. In the Form1_Load procedure test.ipt is opened and the work features are added.
This example creates a workplane tangent to a cylindrical face and parallel to a planar face. It does this using Brep to obtain the Face whose shape is cylindrical, and then query for a point on the face whose normal is parallel to the planar face.
See the help file for other methods for creating work features. (Such as AddByPlaneAndTangent)
Download Test (.ipt file)