AnsweredAssumed Answered

epdm API: when files NOT cached, calling openfiledialog from excel VSTO does not auto cache clicked file...

Question asked by Barry Cavanaugh on Apr 10, 2016
Latest reply on Apr 11, 2016 by Greg Rupp



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.