I am looking for a macro that I can use to take a part or assembly and begin a three view drawing on a preset template and sheet format. The part has a different template than the assembly and I would like the assembly to use a preset SolidWorks BOM inserted as well. Dimensioning would be nice as well. I crank out about 600 parts and 300 assemblies a month and seem to repeat alot of steps for each one. I have tried to download a macro but it is not working with my set up. It seems to be having an issue finding a library. I am fairly new to VB but have been fumbling through until this. I am running windows 7 pro x64 and SolidWorks 2010 x64. any help would be greatly appreciated. Thank you.
SolidworksApi macros
Here are few things you can try to use:
Fast Draw
Auto-create Drawing from Model (You'll need to create a user here)
You can set up drawing borders to automatically generate views when making from new (see tutorials), I have mine set up, so that on pressing the ‘D’ button the New Solidworks Document comes up, select paper size, Paper layout (these would be set up previously by yourself) and bang, done! 1 sec and drawing is created, 4 views with an iso in the corner, can’t automatically create flat pattern, as the view looks for the flat pattern configuration, and this doesn’t except yet as you haven’t created it.
Does this help?
Nick
look into "pre-defined views" for your drawing templates - this will help some, but not with BOMs or dims.
I have tried the three method that you suggest and the Fast Draw locks up in 2010 on a 64 bit machine even after I added the references.
The Autodraw will bring the part in to a drawing with dimensions, although, I could not get it to accept my drawing template or format.
The Batch Process was just simply confusing and gave no inscrutions at all.
I am attempting to take the little knowledge that I do have on API and work with these files. I know this can be done with the right combination of grit and determination. I am using bits and pieces of the code from the two examples that you linked me and trying a scratch code with Solidworks recording the initial macro and then modifying. Do you know of a good piece of reference literature for Solidworks API? Free or low cost would be best. Thank you.
Fast draw might have been set for other OS.
Predefine your drawing templates/sheet formats and then use Auto Draw macro.
For books, I would recommend learning a language (e.g. VB, .NET, C, C++) first and then try these books http://www.angelsix.com/cms/features/books
Eric,
If you are having any troubling using BP just email me and I can give you instructions. Video tutorials are out shortly, but for now there is this:
http://batchprocess.co.uk/index.php?option=com_content&view=article&id=3&Itemid=3
http://www.angelsix.com/cms/features/tutorials
http://www.angelsix.com/cms/features/books
http://www.angelsix.com/cms/features/solidworks-macros
http://www.angelsix.com/cms/forum/viewforum.php?f=24
Luke Malpass
AngelSix (SolidWorks Tutorials and Books)
BatchProcess
Just an update on this. I scrapped the idea of the "macro that does it all" and instead went to a drawing template that has the "finished example" and utilized the Drive WorksXpress that came with SW 2010. I utilized the equations and configurations in the model and the capabilities of Drive Works to change needed dimensions. This seems to work far better than building the model and trying to change references. It also works with the top down models because Drive Works modifys the parts themselves and saves them under a predefined name that you set at the onset of the model creation. I find that it works so well that I make a new model instead of attempting to modify old ones. I have gotten away from Pack and Go almost completely. Thank you for the replies on this. I used a little bit of everything you sent and the culmination was a huge learning experience.