Update Drawing Templates of existing drawings

I've read various threads about this, but none are quite what I'm looking for. As with many other people, I would like to change my drawing template for around 150 existing drawings.  I could go through each individual drawing and 'reload' but I was hoping to automate it. It seems that a macro would be ideal, I've tried a few from these pages but they don't work for me ('Change_Sheet_Format.swp' does formats, not templates, 'copydocoption-1.9.0.xls' doesn't change the template. 'Batch Process' would probably work, but seems quite expensive just for the single operation I require). I also tried recording my own macro - just mouseclicks - but I get a “Runtime error ‘450’ wrong number…….” error, and I'm completely VBasic illiterate so I don't know how to fix this error. I'm on SW2007 which also appears to make this operation more difficult. Any help gratefully appreciated.

TIA

Maurice

SolidworksDrawings And Detailing
Answers 7
DG
DG 2010-02-20 Best Answer

Copyocoption 1.9.0.xls should work for you. I agree if will not replace the template but it copies the settings of Tools > Options to your document, so there should not be any issues to use It. And for chancing the sheet format you can use the Change_Sheet_Format.swp

And you can try to use the SW task scheduler for running above mentioned programs.

MB
MB 2010-02-21

Hi Deepak-

Thanks for the quick reply. Yes, Copydocoption does copy the tools>options of my document, but not the template which is what I am trying to do. How can I change the template automatically? Like other posts, I have changed the drawing template and would like to update all the drawings already created with the previous template. It would be ideal if your 'Change_Sheet_Format.swp' could change the template as well. I've found 'batchprocessxpress' which appears to do what I want, I may try this tomorrow, although I would prefer a macro.

Maurice

SF
SF 2010-02-21

Templates cannot be changed in SolidWorks.  This is intentional, as a template is used at the foundation to create your document.  Copying the settings and replacing your sheet format (separate actions) is your best bet.

Matt Lorono

SolidWorks Legion

Twitter: fcsuper

MB
MB 2010-02-21

Thanks for the feedback Matthew.

I'll explain what I'm doing in case I'm getting confused with terminology. I think I should have said ‘formats’ instead of ‘templates’ in my message title.

I created a drawing template with all my preferred settings. It also contains my drawing border and title block which is just simple lines, text and links to custom properties of a part. I saved this as a template (*.drwdot), and then as a sheet format (*.slddrt).

I then created around 150 drawings.

After that I decided to alter some details in the drawing frame - changing some text and making more room for some of the custom properties. So I opened the drawing template (*.drwdot), updated it accordingly then saved it (*.drwdot), and also saved the sheet format(*.slddrt). Any new drawings come out correctly. But for all existing drawings I have to open them individually then RMB>Properties>Reload>Yes {to delete modified notes}>OK {To scale annotation position}>OK. Is this updating the sheet FORMAT (as opposed to template)?

This does change the appearance of the drawing frame to what I want. It is this updating which I want to do for the whole folder of 150 drawings in a single operation, rather than one at a time.I tried using the SW macro to record my mouseclicks and keystrokes, but this doesn’t work (error 450 as mentioned previously). As a test, I created another macro to draw some lines and create a new view, this worked OK.

I tried Deepak’s Change_Sheet_Format but absolutely nothing happens – perhaps because I am on SW2007 and I suspect the macro was written for 2009? I’ve also tried reload_sheetformat.swp and ModernizeSheetFormat.swp, but they each have errors when they run and I don’t know the first thing about VBasic to try and correct them. I’ve edited my drawing format name and address in these macros but that’s all.

If what I want to do is not easy in SW2007 then fair enough, I’ll go through each drawing and update it manually. It’s better that I have 150 rather than 1500 drawings!

Thanks again to both of you for your interest.

Maurice

SF
SF 2010-02-21
BatchProcess has no problem doing this it has a built in function to reload and/or replace/update drawing templates.
DG
DG 2010-02-22
<p>Maurice wrote:</p><p></p><p><span style="font-size: 10pt; color: #000000; font-family: Arial;">I </span><span style="font-size: 10pt; color: #000000; font-family: Arial;">tried Deepak’s Change_Sheet_Format but absolutely nothing happens – perhaps because I am on SW2007 and I suspect the macro was written for 2009? </span></p>

The macro should work on SW2007 also. If it is not working then try either of the following.

  1. Open macro in the editor (Tools > Macro > Edit). Go to Tools > Reference and fix the missing libraries. Un-check nay library that is listed as missing and check the corresponding one based on your SW version.
  2. Start a new macro (Tools > Macro > New) and side by open the Change_Sheet_Format macro in the editor. Now copy paste the codes from Change_Sheet_Format macro to the new macro. Save and run.

P.S. Change_Sheet_Format macro works only for one type of sheet format at the moment.

MB
MB 2010-02-22

Thanks again for the help Deepak. As it turns out I downloaded 'batchprocessxpress' and used it successfully before I saw the responses from both you and Luke Malpass.

Maurice