Sunday, October 5, 2014

Cust 35: Export Sheets to PDF: Part 2

...continued from part 1

This tutorial uses Visual Studio 2010 .Net 4.0 and Inventor 2015

Start Visual Studio and create a New Project.

Select Visual Basic from the Installed Templates and then Windows Forms Application.

05

In the Name Textbox enter ExportSheets and specify a Location for the Project using the Browse button.

Keep the Create and Add check boxes un-checked. Click OK.

06

From the Project menu, select Add Reference and from the COM tab select Autodesk Inventor Object Library.

07

At the top of the code window, add the following lines:

Imports Inventor
Imports System.Runtime.InteropServices
Imports System.IO

The first statement enables to use Inventor objects.

The System.Runtime.InteropServices has a Marshal class that helps to connect to Inventor as you will see soon.

The System.IO statement has file handling functions that help in exporting the Inventor drawings to various formats like PDF, DXF, etc.

From the menu select View > Toolbox and from the Toolbox add a Button 08 to the Form as below:

04

Select the button and change the Font size to 12 from the Properties window which if not visible can be made to be so from the menu View > Properties Window.

Few useful tips on adding a transparent image to the button and subsequent coding follows in Part 3...


Full Index of Inventor Tutorials, Tips & Crosswords