What kind of help are you looking for? Are you already familiar with VBA programming? If you're just looking for some examples, there are loads of them readily downloadable. If you're looking for someone to write you a complete macro, I'm not sure if you will be able to get someone to do that for you for free.
I'm somewhat familiar with VBA, but am by no means an expert. I can usually peice together macros or modify an existing one, but writing new ones is beyond me. I'm just looking for an example of reading the data in from Excel. I already have an example that writes custom properties back to the files in a directory, but it uses the same data for each file.
Generally I figure if it's something I need to do, someone else has probably ran into the same problem before. I know there are a lot of macros available on here, it's just a matter of finding them which can be tough some times.
I doubt you'll find a free macro that does exactly what you want. It will probably require some modification on your part or a consultant's part. If you're looking into doing your own VBA programming in Excel, check out this post: Using Microsoft Excel with SolidWorks API. Premium members at our site also have acces to a macro called "Export model’s custom properties to Excel file", in the Macro Library. This could be modified pretty easily to fit your needs.
ok here is something made with C# macro
this will open excel file
open each part then update and save part
then close solidworks
if you need help let me know.
Macro1.zip 704.3 KB
how does this file works
Wow it been a bit sent i posted this.
Looking at the code it will open the C:\Temp\Book1.xls
Using that file it will update the Solidwork File as show in the orginal post
you will have to update the code to point to the Excel file and where the Solidworks part are.
you will have to extrat it and then in solidworks
go to tools/macros/Edit…
select the SW VSTA C# Macro(*.csproj) in the dropdown on the bottom-right of the open dialog
then navagate to the extrated zip file and select Macro1.csproj file then you can edit the Excel file name and other part of the code if needed. then click run.
I would place a breakpoint on the first line in Main so i could step throught the Macro first few time running it
Awesome. I'll play around with these this weekend and see if I can make any headway.