Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to save macro into correct .dll?

Status
Not open for further replies.

mihalj

Mechanical
Apr 15, 2009
40
Hi,
I just got a strange problem. I made one macro that works perfectly well when I run it from SW VSTA (programming code window). When I copy /bin folder (only bin folder with all data in it) into new folder on network and run it from there using "Run" command (and pointing to .dll) my macro does not work so well anymore (at some point I even get message "Cannot open nameOfFile.dll"). I tried then to copy my complete working folder (with .vbproj and all other stuff) on network and run it from there again using .dll file and again it didn't work properly. Only way it does it is when I run it from programming code. Does anyone know am I missing something here?
I would like to be able to put my program on network and that one to be run by button (that will point to .dll) or to run it by clicking on the green pointer from Macro toolbar and call same one (bottom goal is to avoid using an open programming code whenever need to run this macro - potential delete of data).
 
Replies continue below

Recommended for you

Does your bin folder contain SolidWorks Interop DLLs?

You must distribute the macro along with interops.

Artem Taturevich
CSWP
 
Yes, it does!
SolidWorks.Interop.SldWorks.dll
SolidWorks.Interop.swconst.dll
SolidWorks.Proxy.Sldworks.dll
SolidWorks.IRemoteInteropObjectContract.dll
Interop.Office.dll
Interop.VBIDE.dll

and also my

myMacroName.dll
 
Could you post these files. To try test it on diferent machines to make sure this is not the computer specific problem?

Artem Taturevich
CSWP
 
Here are macro files (all of them)!
You need to run them from Assembly it is going thru assembly and picking custom properties I need. Then it opening Excel blank sheet and filling data from SW into Excel (so you need to have Excel 2007 also on machine).
Thanks for your help!
 
 http://files.engineering.com/getfile.aspx?folder=d7e66666-5f95-4983-8d6c-5123e0a6c175&file=SWtoVantageBOM.zip
Status
Not open for further replies.

Part and Inventory Search

Sponsor