My First AUGI India HotNews Article

Tagged Under : , , ,

Posted in AUGI, CAD by rajeev

 

 AUGI is the Autodesk User Group International, officially recognized by Autodesk as representing the Autodesk user community. AUGI has two prime directives. The first is to assist its members by presenting programs and information that will enhance their use of Autodesk products. The second is to deliver the voice of the user community to Autodesk, thus assisting Autodesk in product development and giving users a say in the process.

AUGI is a free community with a lot of benefits for its members. You can join it by clicking on the banner to the left.

AUGI has a publication division which publishes the following two CAD related magazines/ e-zine

  1. AUGI World : It is the official publication of AUGI, is a bimonthly magazine designed to help readers improve their use of Autodesk products and learn new techniques. Every issue is packed with product tips & tricks and other technical fare, CAD management issues, and education trends.
  2. AUGI HotNews: It is the monthly newsletter written for AUGI members, brings them up to date on the latest from AUGI, Autodesk, and the Autodesk community. With feature articles, product tips, special offers and announcements, HotNews keeps AUGI members in the loop.

Like any other active community, AUGI has spread across the world in the form of Country Chapters and Local Chapters (City wise). I belong to AUGI India Chapter and Bangalore Local Chapter. Recently, I got an opportunity to write an article about Inventor Customization in AUGI India HotNews September 2008 edition. I have tried to keep it simple and logical that even a person without much or any programming experience can understand it. You can find the article at AUGI India HotNews page, go to September 2008 edition and my article is listed as Autodesk Inventor API and Customization. The article is titled “Autodesk Inventor API and Customization for Dummies Part - I “. As evident from the title, I intend to write more articles for AUGI which would continue from where I have stopped. 

If in a hurry, you can also download the article in pdf from here.

 

Develop Autodesk Inventor Addin Using C# - Part 5

Tagged Under : , , , ,

Posted in Autodesk Inventor, CAD, Inventor Customization by rajeev


Watch High Resolution Video at AR-CAD

Summary: How to Add extra buttons to already existing Addin Command Bar.

This is in continuation of my earlier posts on Developing Inventor Addins using C# Part1, Part2, Part3 and Part4. In our last screencast, I had explained how to replicate assembly tree view inside our addin command dialog. We go a step further and interact with the opened Assembly document / file.

In this ScreenCast, we mainly deal with How to add another button to our existing addin command bar. By clicking on that button, a form would show up. We use SelectSet method of Inventor to capture user Selections. In screencasts to follow, we would try to explore how InteractionEvents can be used in place of SelectSet.

Upon selecting an ocurrence (Part/ Sub-assembly), the label in our Form is changed to its Display Name. Its not a big deal though, but atleast we are heading in the right direction.

Would love to hear any feedback in the form of comments.

Develop Autodesk Inventor Addin using C# - Part 4

Tagged Under : , , , ,

Posted in Autodesk Inventor, CAD, Inventor Customization by rajeev


Watch High Resolution Video on AR-CAD

This is in continuation of my earlier posts on Developing Addins for Autodesk Inventor using C# Part1, Part2 and Part3. In this screencast, I have introduced a TreeView component in our Custom Form, which gets displayed upon clicking on our Addin Button. I have also introduced concept of ImageList briefly and how it was coupled together with our TreeView.

We also added a new set of methods/ functions in AssemblyTreeCmdDlg.cs file. The major part of the code has been taken from AssemblyTree Apprentice Server example, that gets shipped with Inventor SDK.

Upon clicking on Submit button (on our Form), Inventor quickly produces a TreeView with all the Parts, Sub-Assemblies in the active assembly file, and also shows the Constraints that each of these parts / sub-assemblies have.

Develop Autodesk Inventor Addin using C# - Part 3

Tagged Under : , , , ,

Posted in Autodesk Inventor, CAD, Inventor Customization by rajeev


Watch High Resolution Video on AR-CAD

This post is in continuation of my earlier posts on Developing Addins for Inventor using C# part1 and part2. In this screencast / video tutorial, we go a step forward and show a Form / Command Dialog when our Custom Button is clicked in Inventor. The form created is very much basic. Ideally the form should minimize along with Inventor if Inventor is minimized. That part is not taken care of in this screencast. It would be done in coming tutorials.

When our Custom Button is clicked (OnExecute), a form is displayed with a label and a Submit Button. Upon clicking Submit Button, the file name of the active document (opened file) is retrieved from Inventor Application object and updated in the Form.

Debugging Autodesk Inventor Addin using Visual Studio

Tagged Under : , , , ,

Posted in Autodesk Inventor, CAD, Inventor Customization by rajeev


Watch High Resolution video on AR-CAD

If you have followed my earlier screen casts on Developing Inventor Addin using C# (Visual Studio) here and here, I had not touched anything on How to debug an Addin using Visual Studio. When you build / register an Addin, a DLL (Dynamic Link Library) file is created which Inventor identifies as an Addin. To be able to debug an Addin, you have to step into Inventor Process. This can be done as follows.

If you are using a free version of Microsoft Visual Basic (Express Edition), it does not have a debugging option for COM objects out of the box. This can be done with the following work around / trick

  • Create a file with a name <yourAddinDllName>.csproj.user (In my case, it is AR-CADInventorAddIn4.csproj.user
  • Put the following content into this file (The only thing that could probably change is the location of your Inventor.exe file)

<Project xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″>

<PropertyGroup Condition=” ‘$(Configuration)|$(Platform)’ == ‘Debug|AnyCPU’ “>

<StartAction>Program</StartAction>

<StartProgram>C:\Program Files\Autodesk\Inventor 2008\Bin\Inventor.exe</StartProgram>

</PropertyGroup>

<PropertyGroup>

<ProjectView>ShowAllFiles</ProjectView>

</PropertyGroup>

</Project>

  • Close the solution and open it again. By doing this, the .csproj.user file is associated with the project.
  • Insert a “Break Point” in your code and Start Debugging by hitting F5 key.
  • Now Inventor gets started and you are halted at the break point. Use Step Through and Step Into to inspect different objects, by hovering the mouse over the objects.
  • When you are done with Debugging, your addin would load up and hence Inventor is loaded completely. You can also insert break points when you click on a Custom Button , your addin has created when the Inventor is loaded completely.

If you happen to have a Visual Studio Professional version, there is no need to create the .csproj.user file, you can follow these instructions to get the debugger working.

  • Right Click on your addin project. Go to its properties.
  • Go to Debug Tab listed in the left side of this dialog.
  • Set Configuration = Debug , Platform = Any CPU
  • Set Start External Program to the location pointing to Inventor.exe
  • Close the properties Dialog box
  • In the Solutions Explorer, click on an icon “Show All Files”
  • Carry on with your debugging session as explained above and also in the screencast

I hope things are pretty much clear, if there are any queries, I would love to hear them in the form of comments.

Develop Autodesk Inventor Addin using C# - Part 2

Tagged Under : , , , , ,

Posted in Autodesk Inventor, CAD, Inventor Customization by rajeev

Part 2a:

Watch High Resolution video of Part2a videos on AR-CAD


Part 2b:

 

Watch High Resolution video of Part2b videos on AR-CAD


Part 2c:

 

Watch High Resolution video of Part2c videos on AR-CAD


This video tutorial is in continuation of my earlier post on Developing Autodesk Inventor Addin using C# - part 1. In this session, we go a step further and create Command Button(s), that is added into a Custom Command Bar, which in turn gets added into Panel Bar of Assembly Files.

 

We start with a project that gets formed when we use Inventor Addins Template for C# language. We then add a couple of references and use most of the code from SimpleAddin that gets shipped along with Inventor in its SDK kit. We use the Button class from SimpleAddin as it is, and then append code to StandardAddInServer.cs file as explained in the video.

Some of the main points discussed in the video are as follows:

  1. How to deal with User Interface Event
  2. How to deal with Event Handler for Command Bars and Environments on Reset
  3. How to use ‘try & catch’ loop to handle errors effectively
  4. How to extend Button base class. Each ButtonCommand (AssemblyTreeButton) will have a Class which implements Button class
  5. How to load Image icons (.ico) for User Interface items
  6. How to create Buttons (CommandButtons)
  7. How to create Command Category
  8. How to add Button to Command Category
  9. How to create a custom command bar (toolbar), only the first time the addin loads up
  10. How to add a custom command bar to an available Environment (again only first time)
  11. How to Restore CommandBars and Environments and clean up the custom CommandBars and Environment changes done by activate method
  12. How to run a command when a button is clicked
  13. How to Build a Solution from Visual Studio 2005
  14. How to register and unregister an Addin using RegAsm.exe (easier way)
  15. How to check whether you addin has been loaded in the Inventor when it is started

I hope a lot of basics of a Command Button are covered in this video tutorial. In the coming ones, I would try to work on “Debugging an Addin from Visual Studio” and more complex addins which actually do something other than just showing some messages.

Please comment below if there is anything that is not clear. To view high resolution Videos of the above screencasts, check them out at AR-CAD at part2a, part2b, part2c.

Update: Looks like the install.bat and uninstall.bat files content are not very clear in the video, here are they in text

Install.bat

@echo off

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase AR-CADInventorAddIn4.dll

PAUSE

Uninstall.bat

@echo off

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /unregister AR-CADInventorAddIn4.dll

PAUSE

Develop Autodesk Inventor Addin using C# - Part 1

Tagged Under : , , , , , ,

Posted in Autodesk Inventor, CAD, Inventor Customization by rajeev

Part 1a

Part 1b

Watch High Resolution video of both above videos on AR-CAD

I hope you have gone through my earlier video tutorial and post, as they provide a good (if not great) foundation for basic concepts of Autodesk Inventor API and how it Inventor can be customized using Visual C#. In the previous posts, we had connected to Inventor as an external exe file, which runs out 0f process with respect to Inventor and hence can be considered slow. To make the addins work faster and to give the end user a better work-flow and experience, we have to make an addin which is internal to Inventor and which runs in-process with respect to Inventor.

In the above videos ( they have been broken into part 1a and 1b as youtube couldn’t upload the whole video, which is 12 mins long), basic introduction is given to “How to develop an addin to Inventor using C#”. Please go through it and I hope the explanation in it is good enough to get you started. In Next versions of this tutorial, I shall try to increase the complexities. If there are any doubts/ clarifications / suggestions, I would love to hear from you as comments to this post. Watch High Resolution video of both above videos on AR-CAD