first: creating a new project in VB.NET and placing / using an igrid works fine.

Problem: I'm developing an AddIn for Autodesk Inventor (CAD-software). The AddIn itselve is a DLL. I have placed a form with an igrid (nothing else, no code) and call it from the AddIn with
Using frm As New Form1
End Using

The code stops at
with an System.IO.FileNotFoundException:
Screenshot 2023-01-10 173555.jpg

Click to View Image13 View(s)

Any idea what could be missing here? When compiling for DEBUG the TenTec-DLLs are placed in the same folder like the AddIn-DLL.

Kind regards
It's hard to say what is wrong without having your development environment and your project. Is it something like we build in our Basic Example of Excel VSTO Add-in: Display Form with Grid  article?

I know that you recently upgraded to the latest version of iGrid. I would recommend that you check the references in your project and the iGrid DLL you supply with your add-in.
Hi Igor,

I really don't know if Excel and Autodesk Inventor use the same mechanisms. What I know is that I made some Inventor-AddIns in the past including forms with iGrid, and there were no problems at all. I could send you a sample project, but you would need to install Inventor (there is a 30days-evaluation version). But I suppose that's too much effort for you.

I uninstalled all old iGrid components, installed the current demo and then the retail DLLs.
The 10tec reference in the project is the same as in a winform project where I have no problems.

I suppose there is no other reference needed for iGrid (not speaking about printing and filter)?

Unfortunately, the error message says nothing about which component is missing.

I also tried to create the grid by code
Dim myGrid As New TenTec.Windows.iGridLib.iGrid
, f.e. in a button-click-event, and the error message pops up when the click-event happens.
It's very strange, especially looking at the fact that iGrid works in your other projects.

Have you thought about manual loading of the iGrid assembly in an event handler of the AppDomain.AssemblyResolve  event?

Here is what we do in one of our projects to 'help' the .NET runtime to find an assembly it couldn't find itself:

private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
	int myIndexOfComma = args.Name.IndexOf(",");
	if (myIndexOfComma < 0)
		myIndexOfComma = args.Name.Length;

	foreach (Assembly myCurRootAssembly in fAssemblies)
		string myPath = Path.GetDirectoryName(myCurRootAssembly.Location) + "\\" + args.Name.Substring(0, myIndexOfComma) + ".dll";
		if (File.Exists(myPath))
			Assembly myAssembly = Assembly.LoadFile(myPath);
			return myAssembly;

	return null;
I found out the problem, too easy:
the default template wizard for an Inventor AddIn creates the DLL somewhere in %appdata%. After first compilation I changed this to a more handsome path but was not aware that Inventor still loaded the DLL from the old path where no 10tec-dlls exist.
Changing the loader now to the correct path where I also put the 10tec dlls did the trick.

Sorry for confusion.

Kind regards
Users browsing this topic