My First Autodesk Live Held At Bangalore India

Update: IN-Motion, a Motion and Dynamic Simulation Addin for Autodesk Inventor has been launched by us.

Update: Video tutorials on usage of IN-Motion for Dynamic Simulation of Autodesk Inventor Assemblies.

Autodesk Live Bangalore 2009

Autodesk Live was held at Bangalore on September 25th, 2008 at one of the best locations in Bangalore viz Leela Palace. It was mainly concentrated on Autodesk MSD(Mechanical System Design) products. It was my first CAD related conference and I was really excited to be a part of it. The registration for the event had started quite some time back at Autodesk SAARC website and when I googled for any info on what takes place at Autodesk Live, not much info was found about Indian context. So that added to my excitement.

To my surprise, I found close to 300 people who turned out as audience and around 10 guys from Autodesk had assembled to take us through the day’s proceedings. A couple of them had come from Singapore Autodesk SAARC center and others were from Delhi, Pune and also from Bangalore centers. Most of the audience assembled were end users of AutoCAD and some were also from automotive background who had just shifted from AutoCAD to Inventor for better 3D experience and productivity.

The session was started by Mr. Ajay Adwani, who heads MSD, Autodesk SAARC. He gave a key-note presentation about Autodesk in general and how it supports Designers to have an edge on Innovation front to drive the community further. He gave a nice example of how Mr. Ratan Tata envisioned a need for a low-cost car for common people and thus coming up with Nano. Not to wonder why Tata is the largest customer for Autodesk in India. It was also nice to know that Autodesk is the 2nd Software company to exist after Microsoft. He also threw some light on economic growth and stability of the company. It was more of a sales pitch with a message ” Guys, we are the company which has survived from past 26+ years. Everyone trusts us and know that we would always remain in the CAD field”. I am sure people were impressed with it.

The following session was from Mr. Sanjay Gera, who sits at Delhi center and looks after Sales in India. He briefly explained what Digital Prototyping was about and how it had helped companies to achieve better success and productivity. He also showed how 4 islands(depts viz Ideation, Engineering, Manufacturing, Customer) for a Product Manufacture can be seamlessly connected cutting down the cost and reducing the production time.

Then we had Customer sessions where 2 companies shared their success run by using Autodesk products. The first was BEML (Bharat Earth Movers Ltd) which uses Inventor to prototype their heavy machinery before finalizing the design and thus reducing costs enormously. The second company was Sartorious Stedim India Pvt Ltd, which does a lot of work in Biotech and Mechatronics. They have used Inventor to design their boilers, fermenters etc. They also showed how they had used Autodesk Navis Works, which is a great reviewing software, using which you can literally walk over your Assembly in Inventor.

The next session was about Autodesk Subscription by Mr. Ramesh Vedavyaasa and explained about various advantages of having an Autodesk Subscription. It would cost in the beginning, but people could really save the bucks in future, when the go for updates and upgrades. The following were the advantages explained:

  1. Tech Updrades
  2. Flexible Payment / Subscription system
  3. Direct web support
  4. Communication Center in 2009 products range and later integrated
  5. E-learning
  6. Usage of previous version (upto 3 last versions)
  7. Community Access
  8. Simplified Software Management

The following session was also taken by Mr. Ramesh Vedavyaasa which was “Building the Next Gen Designers”. He discussed about the challenges faced by CAD using industry viz Skilled Manpower, Rapid changes in Technology and Lack of revenue for Research purposes and how Autodesk has been trying to solve this problem by having a lot of training institutes to teach Autodesk technologies to college students and graduates and also by forming strategic alliances with some of the Universities to groom the talent there. Some of these in India are NID, Ahmedabad, IIT Kanpur, IIT Madras, JJ College, School of Planning and Architecture.

We then had Lunch and could meet a couple of Autodesk guys and also Mr. Thomas of Microgenesis, Bangalore. In the morning, I had also met Sunith Babu of AUGI fame and helped him in distributing AUGI World Magazine to all the attendees.

Post lunch session was the most interesting of the day. Thanks to Mr. Prasad Pandit and his sense of humor. He made sure that nobody would feel drowzy after a heartious meal. He explained ” Whats new in AutoCAD 2009 ?”. Some of the things worth mentioning are

  1. Ribbon Toolbar
  2. View CUbe
  3. Action Recorder
  4. Layer Properties Managers
  5. Fit and Finish
  6. Hover on an object to get its details as tooltip
  7. Tooltip/brief explaination on hovering on command buttons
  8. Mark Geographic location and integration with Google Earth with AutoCAD

The next session was “Digital Prototyping”. It was more of a combined session by Mr. Anand Joshi (Alias guy), Mr. Kiran (Inventor guy) and Mr. Ramana (AutoCAD Electrical guy). They showed us how they had solved an industry problem using Digital Prototyping. The problem definition stated them to Design a Floor Polisher for a client with some definite conditions. It began by Anand (looks like George Clooney) showed us how Alias looks like and used his tablet pen to come up with a concept design and then went on to show how they could generate curves and then surfaces and then make a 3D object with surface data in it. He then parsed on the finished data (Class A) to Kiran who then would add thickness to the members according to the Design standards. He explained how Design Accelartor could be used as a ready to use Design Data Book, which has a huge library of design data and also calculate various parameters while designing machine members, and also check whether a particular design is feasible or not. He also showed how AutoLimits could be used to check whether a condition was valid when Kinematic simulation of the Cleaning assembly was taking place. Once mechanical stuffs are done, some Electrical wiring and connections need to be done between the motors and their power sources. So Kiran then parsed the Electrical related data in the form of XML which Mr. Ramana could import in AutoCAD Electrical. He briefly explained the working of it and how we could connect different ports/connectors and simulate the electrical way to check if it works as expected. After connecting the harnesses properly, he gave back the data file to Kiran, who then makes some final modeling to finish of the Assembly.
Anand (Alias guy) then showed us the completed assembly and I must say, I almost fell off my chair. It was really awesome, it looked very real and hats off to Alias rendering engine. It was a great learning session.

Followed was Q & A session with some lucky dip prizes. People came up with good questions and some sounded very trivial to me. Just after the session, I was keen to meet Autodesk guys and in particular anyone who works with Inventor API. I was lucky to meet Mr. Anand Pujari who looks after Inventor addins certification. Had a sound and healthy discussion with him on Inventor customization and got some good inputs from him as well.

In a nutsheel, it was a great day at Autodesk Live and I would definitely be more than willing to attend future sessions as well. Though most of the audience were totally different from what I do or intend to do, I could meet up with some Autodesk folks who did help me out with some queries I had. Looking forward to make a good name in the field of CAD Development and Customization.

My First AUGI India HotNews Article

Update: IN-Motion, a Motion and Dynamic Simulation Addin for Autodesk Inventor has been launched by us.

Update: Video tutorials on usage of IN-Motion for Dynamic Simulation of Autodesk Inventor Assemblies.

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


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


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


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


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 FilesAutodeskInventor 2008BinInventor.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

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:WINDOWSMicrosoft.NETFrameworkv2.0.50727RegAsm.exe /codebase AR-CADInventorAddIn4.dll

PAUSE

Uninstall.bat

@echo off

C:WINDOWSMicrosoft.NETFrameworkv2.0.50727RegAsm.exe /unregister AR-CADInventorAddIn4.dll

PAUSE

Develop Autodesk Inventor Addin using C# – Part 1

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

Customize Autodesk Inventor API using C# – Part 3

In continuation to my previous post on Customizing Inventor using C#, I go a step further and interact with an opened Assembly through API. I have ported the code from VBA to C# for the example explained in Introduction to Inventor API and VBA (Visual Basic for Applications). The attached document is from Autodesk University of 2003.

Start a new C# Windows Application project in Visual Studio 2005, as done in previous tutorial. Design the form as shown in the image to the left. Double clicking on Hide / Show will take you to Form1.cs in the Code Viewer window and add/append the following code into it. Please note that I have changed the Names/Identifiers of form elements to txtSearchName , cmdShow, cmdHide as explained in the above tutorial document.

In this example, when you hit ‘F5’ or Debug, a windows form appears as shown. Type a part name in the Search Field and hit “Hide”. If any part(s) exist in the opened assembly with that name, it/they would be made invisible. If its hidden and you hit on “Show”, the part would be made visible. In our case, we have made Piston part invisible in the engine assembly that ships with Inventor as an example assembly. Save the application by File> Save All in Visual Studio.

You can also use this Windows Application by executing the .exe file that is produced, when you debug/build your application. In my case, its at My DocumentsVisual Studio 2005ProjectsWindowsApplication1WindowsApplication1binDebugWindowsApplication1.exe . Double clicking on the exe file would also popup the Form that was developed.

Form1.cs code

[sourcecode language=’c#’]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
//Instantiate a variable with Inventor.Application object.
//It should have a scope throughout this Class
private Inventor.Application oApp=(Inventor.Application)System.Runtime.
InteropServices.Marshal.GetActiveObject(“Inventor.Application”);

//Declare oAsmDoc to have a scope within this Class
private Inventor.AssemblyDocument oAsmDoc;
public Form1()
{
InitializeComponent();

//Check that a document is open
if (oApp.Documents.Count == 0)
{
MessageBox.Show(“An Assembly must be active”);

}
//Check that an assembly document is active
if (oApp.ActiveDocument.DocumentType !=
Inventor.DocumentTypeEnum.kAssemblyDocumentObject)
{
MessageBox.Show(“As Assembly document must be active”);

}
//First Type Cast ActiveDocument into AssemblyDocument
//Set a reference to the active document
oAsmDoc = (Inventor.AssemblyDocument) oApp.ActiveDocument;
}

private void cmdHide_Click(object sender, EventArgs e)
{
//Call the function that traverses the assembly
// and sets the visibility.
SetVisibility(oAsmDoc.ComponentDefinition.Occurrences,
txtSearchName.Text, false);

//Update the View.
oApp.ActiveView.Update();
}

private void cmdShow_Click(object sender, EventArgs e)
{
//Call the function that traverses the assembly
// and sets the visibility.
SetVisibility(oAsmDoc.ComponentDefinition.Occurrences,
txtSearchName.Text, true);

//Update the View.
oApp.ActiveView.Update();
}

private static void SetVisibility
(Inventor.ComponentOccurrences Occurences, string SearchName,
bool VisibilityOn)
{
//Iterate through each of the occurences
//in the collection provided.
foreach (Inventor.ComponentOccurrence oOccurence in Occurences)
{//Check to see if the occurence name matches the search name
//The strings are converted to lower case
// to remove context sensitivity.
if(oOccurence.Name.ToLower().Contains(SearchName.ToLower()))
{//Check to see if the visibility is different than the specified
if (oOccurence.Visible != VisibilityOn)
{//Set the Visibility of the occurence.
oOccurence.Visible = VisibilityOn;
}
}
}
}
}
}
[/sourcecode]

Customize Autodesk Inventor API using C# – Part 2


Watch High Resolution video on AR-CAD

I hope you have gone through my previous posts on Inventor API a) Introduction to Autodesk Inventor API and Customization and b) Customize Autodesk Inventor using C#. It is also assumed that you have gone through DevTV: Introduction to Inventor Programming Video, which is on Inventor Customization page. In the above video, we connect to Inventor API from Visual C# (Visual Studio 2005). I have just replaced the VB.NET code that was used in DevTV tutorial with the corresponding C# code. You can see the comparison below. Please note how GetObject in VB.NET is replaced by a much more lengthier code. If the above youtube video is not very clear, watch it on AR-CAD.

VB.NET Code
[sourcecode language=’vb’]
Dim oApp As Inventor.Application
oApp = GetObject( , “Inventor.Application”)
MsgBox(“Number of open docs = ” & oApp.Documents.Count)
[/sourcecode]

Visual C# Code
[sourcecode language=’c#’]
Inventor.Application oApp;
//The below initialization is on a single line
oApp =
(Inventor.Application)System.Runtime.InteropServices.Marshall.
GetActiveObject(“Inventor.Application”);

int number_int = oApp.Documents.Count;
string number_string = Convert.ToString(number_int);

MessageBox.Show (“Number of open docs =” + number_string);
[/sourcecode]