Hello, thanks for coming on over,

The Autodesk Northern Europe Manufacturing Blog has now moved to a new home. Please come over and join us at.....

This blog will not be updated.

Thursday, 13 May 2010

How did I put together the iLogic Web Configurator?

Apologies it has taken me so long to get details of how I created the iLogic Web Configurator up on here, it's been a pretty hectic few months with launch of all our 2011 products.

However, I did manage to add a quick reply on the iLogic User Forum on how I managed to put it together. If you've not been over to the iLogic User Forum yet, have a look and get involved. It's a place where we can all share iLogic tips, tricks and examples:


If you've not seen the iLogic Web Configurator video, or if you just want to see it again, here it is:

So what did I do to get iLogic rules within Autodesk Inventor controlled by a standard web page? Was it magic, was it some form of witchcraft - neither to be honest, it was just joining the dots between some pretty cool and readily available technology.

Let me start by saying I'm no programmer or developer, I'm just a regular guy (some might call me something else but we won't go there) with a passion for technology and Autodesk Inventor. With that in mind, there might be better, slicker and quicker ways to do what I have done using some programming but I wanted to do this using as little programming as possible. So what did I do.....

First of all I built a web page using Adobe Dreamweaver that contained a standard HTML form. When the form is submitted the values in the HTML form are entered into a Microsoft Access database.

At the same time, the reference number that is on the web page is written to a text file that is stored on the web server. The reference number is just an automatically generated value in the web page.

When the text file is changed, a free of charge watch process that I got hold of from the web see's that the text file has been changed and opens up a Microsoft Excel file that has an ODBC connection to the MS Access database file.

Inside of the MS Excel file is a macro that automatically runs when it is opened, the macro does a few things:

1) Runs a quick sanity check to make sure that the reference number (obtained from the database) is different to the last one in the Excel spreadsheet

2) If the reference number is different, the macro updates the ODBC link to the Access database to get the new values that were input into the web page and posted to the database.

3) Checks to see if Autodesk Inventor is running, if it is it opens up the relevant part. If Autodesk Inventor is not running it launches the application and loads the relevant part.

Once the relevant part is opened into Autodesk Inventor it's then time for iLogic to do its thing.

There is one main rule that controls the update with the Excel spreadsheet and then other rules that run depending on the values passed from with web page, via the Access database and Excel spreadsheet.

The main iLogic rule refreshes the link with the spreadsheet so that the values in the spreadsheet are passed to parameters inside of Autodesk Inventor. The parameters are then used to invoke iLogic rules to turn features on\off, update sizes but also set things like the part material, part number, project values within the iProperties.

Once the part is updated the main iLogic rule saves the part as a new file using the reference number that originated in the web page as part of the save as, all of the iLogic rules are deleted.

The iLogic rule then opens up the drawing for the part being configured, updates and then changes the reference so that it references the part that has just been renamed.

This means you end up with a part and drawing that has been configured based on the values inputted into the web page, with the same reference number so that it can be easily found if an engineer needs to do some final design\detailing.

The final piece of the puzzle is the 2D and 3D DWF file that is produced. The main iLogic rule creates a single DWF file that contains the 2D & 3D DWF data and saves it to a folder on the web server. The web page that the user sees refreshes until it the DWF file is present at which point it stops refreshing and displays the DWF file in the web page.

The whole process above takes a very short time to complete. From filling in the web page to viewing the DWF file takes about 90 seconds in this example.

What knowledge is needed:

- Creating a web page using HTML
- Passing data from a web page to a database using ASP\ADO
- Creating basic macros within MS Excel
- Building iLogic rules within Autodesk Inventor
- And that's pretty much it!

I've been asked a number of questions which I will try my best to answer below:

Q) Can the files be added to Autodesk Vault automatically?

A) Not at the moment no, there is no iLogic snippet that will allow us to automatically add them to Vault. However, I wouldn't want them added to Vault. The process that I had in minds would be that the parts are configured via the web configurator and only added to Vault once they become a valid part. Otherwise you could end up with lots of parts being added to Vault that have no pupose.

Q) Will the same thing work for assemblies?

A) In theory yes. The only reason I haven't tried it with assemblies is due to the part of the process that saves the documents as different file names and then changes the references. This becomes a bit more tricky for assembly data but it is something I am working on with the help of colleagues at Autodesk.

Q) Does this work over a WAN?

A) I have only tested this over my own internal network where the client (web page) can talk to the server directly over the LAN. The way I have it configured is that Autodesk Inventor is on the same workstation that is hosting the web server, MS Access, MS Excel and watch process.

If you have any other questions, please feel free to add them to the comments below and I will do my best to answer them.

Happy Configuring!