background

The company wanted to do the secondary development of Inventor, and searched many websites at home and abroad, but found that there were very few related learning materials. The most useful one was the API documents provided by the official website, but the English version was uncomfortable, so we decided to create a Chinese VERSION of THE API tutorial for the convenience of the following people. The level is limited, some translation may be wrong, you can put forward suggestions, I will timely correction.

The premise

The API version of my current translation is Inventor 2020, you can do reference and secondary development according to the corresponding version.

Let’s get started

Use Inventor to edit the introduction of the interface

This document provides a variety of resources to help you use the Inventor API. These resources are part of Inventor’s software Development Kit (SDK). Various elements of the SDK and some other external brothels are described below.

API help

API help is installed with Inventor and is accessible from the Help menu, as shown below.

The help includes the following parts:

  • This is the introduction to the API that you are reading now.
  • New features in this version of Inventor. This lists the changes made in Inventor that may require some changes to any existing program, and lists the new objects, methods, properties, and events added for this release.
  • User manual, which provides an overview of many API topics.
  • Refer to the manual. This reference manual provides detailed information about each object, method, property, and event. If the topic is demonstrated in the sample, the topic will have a link to the sample.
  • Sample program. This is a categorized list of sample programs. These are the same samples and can also be accessed by referring to the links in the topic of the manual. They are primarily VBA programs, with some C# programs. The API is the same regardless of which language you use. It is a syntactic variation, so programs in any language can serve as examples of how to use the API.

The SDK folder

By default, when you install Inventor, you get an SDK folder. On Windows 7/8.1/10, it was created in the following location: C:\Users\Public\Documents\Autodesk\Inventor

\SDK After installation, the SDK folder contains three files. Developertools.msi, userTools.msi, and sdk_readme.htm. To access SDK information, you need to install one or two.msi files, which can be installed by double-clicking on the.msi files in Explorer.

DeveloperTools.msi

Developertools.msi will install additional sample programs and tools to help developers write applications using the Inventor API. Once this component is installed, it will create a directory containing the DeveloperTools subfolders that contain the subfolders.

Docs

It contains an object model diagram diagram that can be used to understand the relationships between various objects. This folder also contains some guidelines to use when creating a user interface for the Inventor program.

Include

This folder contains several header files (.h), which are mainly used by programmers using VC ++. Sometimes, in other situations, the information in these files is also useful.

References

This folder contains a utility that is currently for internal use only and is now deprecated by registry free add-ons.

Samples

This folder contains a number of larger programs written in several different languages that demonstrate various ways to access and use the Inventor API.

Tools

This folder contains two programs that are useful utilities when using Inventor’s API. The first, called EventWatcher, lets you specify and monitor certain events that occur in Inventor. This tool is very useful when you write programs that will use events in Inventor. You can use this tool to better understand event behavior so you know how to leverage it in your programs. The second component, called ThumbnailView, is a small component that lets you extract thumbnail images from Inventor documents without having to go through Inventor. There is a readme file and some examples that describe and show its usage.

Wizards

This directory no longer contains the wizard installer, but now contains only readme files that describe the wizard’s usage. For those familiar with the previous other steps of installing the add-in wizard, separate wizard installers are no longer required, as these wizards are installed as part of the SDK installer. Use these wizards in Visual Studio to create the Inventor Skeleton add-on project.

UserTools.msi

The userTools.msi file contains multiple add-ins and separate executables that help automate certain tasks for Inventor users who are not available with the Inventor product itself. When this component is installed, it creates directories for tools that contain AddIns and standalone executables. The DLL and exe files are installed, so you can use these tools immediately without compiling any source code. The source code for these tools is also installed, which you can use as examples or modify to change and extend the behavior of these tools. The user tool installer includes the following add-ons: AttributeHelper, DrawingTools, GeneralTools, DerivedPart_SP, and AutoCustomize. It also includes the following separate executables: CopyDesign, PartNumberModifier. Create a UserTools subdirectory in the SDK folder and install the program there. For more details on these tools, see the separate “readme.txt” file associated with each tool.

Other resources

There are other resources on the web that contain additional information about the Inventor API. A general introduction to the Develop Inventor Site-API, including demos describing API features added in recent releases. Mod the Machine Blog- A Blog dedicated to the Autodesk Inventor API Autodesk Discussion Group – An Autodesk discussion group that has open discussions about all of Autodesk’s products. Autodesk Inventor custom groups are dedicated to Inventor API issues.