I had a comment on one of the previous posts about iProperties asking about how to present the user a list of valid entries for an iProperty. It’s a good question and would be a useful feature, but is not something that Inventor supports. However, that’s an advantage of learning to program because you can create new functionality and add support for this yourself, which I’ve demonstrated below.
I’ve written a sample program to demonstrate one possible solution to this problem. The program is an Inventor add-in. It adds a new command to the application menu in the ribbon, as shown below. (It will add it to the File menu if you’re using the classic user-interface.) I chose to call the command iProperties+.
When the command is executed it brings up a custom iProperties dialog, as shown below.
This dialog provides access to some of the standard iProperties plus an additional custom iProperty (Finish). It has the advantage of providing a simplified view of the iProperties where only those iProperties that are important for your workflow are shown. This makes it faster to enter the values and much easier since you’re not having to navigate through several tabs to remember and find the iProperties you need to fill out.
Another advantage is that since this is a custom dialog you can choose to present the iProperties in any form you want. For example, Finish, Material, and Approved By are implemented as combo boxes allowing you to present the user with a list of valid values. The picture below shows the drop-down list when the Finish field is selected. Using the drop-down makes is even easier for the user and eliminates any mistakes from typing.
Here is the source code for this sample. It’s written using Visual Basic Express 2008 and is compatible with Inventor 2010 and later since it expects the ribbon to be available. I don’t think the program is very useful as-is since everyone will have different requirements as far as which properties they want to display. In my sample I chose to use an external file to define the contents of the drop-down lists so they could be easily updated without modifying any code. If you want to see the program run, you just need to open the source within VB Express and compile it. This will compile and register it on your system so that when you start Inventor you should see the “iProperties +” icon in the Application menu.
The use of iProperties within the program is the most important part of the program but is also a small portion of the code. There is quite a bit of add-in code and also a fair amount of code to deal with the dialog. Updating this program for your specific needs would be a good project to get you going in the world of add-in development using VB.Net. For some background on add-ins and user-interface customization you might want to read these other posts; Accessing iProperties, Custom iProperties, and Supporting the Ribbon User Interface.