I've been getting a lot of questions about Autodesk.Connectivity.Explorer.ExtensibilityTools.dll so I thought I would explain a bit about it. On the surface it looks like a collection of useful functions, but there's more to it that you should be aware of.
Most importantly, you need to be aware of two things:
- Using this DLL creates a mini Vault Explorer within your process.
- There is a significant memory and performance cost with these tools.
For example, Downloading a small Inventor file will cause about 60 MB of DLLs to be loaded. The initial load may take about 1.5 seconds.
The concept behind ExtensibilityTools is simple enough. Provide some functions which do client-side operations. The web service API is only concerned with server features. By design, it can't do anything related to client-side data. Meanwhile the Vault Explorer client performs a lot of client-side operations, seemingly with ease. People would frequently ask me for these features and indicate that "it should just work like Vault Explorer".
The trick is that a lot of the Vault Explorer features are not easy at all. Update Properties, for example, is very hard if the property is mapped to a property in the CAD file. In these cases, the CAD API needs to be loaded in order to update the CAD file on disk. So that implies that A) you have a bunch of CAD API's handy and B) you have a way to determine which one to use.
If all that logic were placed directly into the SDK, it would become huge because you would have to re-distribute the CAD APIs along with it. Instead, ExtensibilityTools just acts as a gateway to Vault Explorer, which already has all the supported CAD API's. This keeps the SDK small and re-uses an existing product. The downside is that Vault Explorer was never intended to work in this mode. It's optimized for UI workflows, and not meant to be a utility library.
Best practices:
- If possible, try to load IExplorerUtils only once and hold on to the reference.
- Keep in mind that there are no easy ways to unload .NET assemblies. To the memory cost is not temporary.
- The ideal case is if you are a Vault Explorer customization. In that case, you there is no load cost because Vault Explorer is already loaded. In these cases, make sure to call ExplorerLoader.GetExplorerUtil instead of LoadExplorerUtil.
Known issues:
- Doesn't work with base Vault - You need Workgroup, Collaboration or Professional.
- Doesn't work inside Inventor - Vault Explorer uses Inventor Apprentice, which can't run inside of Inventor.exe.