Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

I am interested in writing a macro

Status
Not open for further replies.

13

Mechanical
Nov 24, 1999
59
I am interested in writing a macro for SolidWorks and I
dont know if it has been done yet. If anybody has any leads, please
let me know!

It would take an excel spreadsheet, with a format:

Name Part Number Description Date created Material Finish Notes
--- --- --- --- --- --- ---

etc....

And then the macro would open a specific drawing format and load it up
with all the info from the excel spreadsheet. It would take each "note" and place it
into its respective x and y location on the template.
I think this would save a LOT of unnecessary clicking.

Regards

 
Replies continue below

Recommended for you

Yes! About 50% of my job is SolidWorks automation. First, let me see if I understand your question.

1. Is this program (macro) going to be driven from the Excel file?

2. You have an excel file that contains this information (name, p/n, ..., notes). Is this a master file that will be used for all of your parts or is there a separate file for each part?

3. Then, you want the program to:
a. open SolidWorks
b. start a new drawing
c. insert the notes from excel into the drawing doc

4. Do you have MS Visual Basic programming language or do you just want to use VBA in Excel?

If you could describe each step, in detail, I am sure that I can get you moving in the right direction.
 
This post is a duplicate of one in the SolidWorks forum. Let's move the conversation there since it relates to SolidWorks.
 
hi again,

I would like the macro to run from solidworks, not excel.
i have ms visual studio c++ and also the limited capability in solidworks visual basic.
what i would like the program to do is this:
1. open solidworks.
2. run the macro.
3. input excel file that contains all the part info
4. then the data from the excel file(say there are 10 parts w/ all pertinent info) would be used to generate drawings for each line in the excel file, or each part in this case there would be 10 drawings generated.
5. also (this would be great but not necessary) if the views associated with each part are inserted into the drawing--top front side or whatever. and then the drawing would autosave as the part filename.
6. the program would loop until all the drawings were created with each part info inserted in x and y locations on the template. maybe in the excel file there would be a drawing size variable. that way i could decide which template to use for which drawing, depending on part size. i also realize that this would increase the array quite a bit.
7. once the program finished it would allow me to dimension everything--i feel that this should be the engineers job.

this would save a tremendous amount of time for the kind of work i do.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor