ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
BCBarry Cavanaugh10/04/2016

Hello,

I have created an excel vsto custom addin - this addin features a button that, when clicked, opens a openfiledialog browse window so that a user can select the solidworks files that they wish to attach to the excel file that is currently open.

In situations where the selected cad files are already cached, everything works great.

In situations where the cad files are NOT cached, the user can select the files and click OK to close the openfiledialog window, but an error occurs (file not found). Presumably this is because the file is not cached (therefore, to really present on the local computer)

I wrote a simpler test program that is not called from the excel addin and in this case the openfiledialog window will auto cache the selected file upon being single-clicked by the user  - this is the desired behavior. It seems that the fact that I am calling openfiledialog from within my excel addin is preventing the auto cache behavior from occuring.

I do have a workaround, although it is a bit extreme - for the openfiledialog portion of the addin I actually created a separate .exe that is called from the excel addin as a process - the openfiledialog window generated by this separate .exe DOES auto cache and everything works fine.

anyone experienced anything like this before?

Thanks for your thoughts on this.

Barry