How can you update the Drawing Template via macro?
How can you update the Drawing Template via macro?
(OP)
We have several revisions of our Title block...
The new versions are saved over the old ones with the same name and location...
To manually update them... you go to the sheet properties and click Reload in the Sheet Format/Size frame...
I recorded a macro... but it (and what I tried to derive from it) did not seem to work...
Any
Ideas here?
The new versions are saved over the old ones with the same name and location...
To manually update them... you go to the sheet properties and click Reload in the Sheet Format/Size frame...
I recorded a macro... but it (and what I tried to derive from it) did not seem to work...
Any
Ideas here? When dealing with computers, there are 10 things you need to know: one, zero, and the rest is Binary.
-Josh S






RE: How can you update the Drawing Template via macro?
Also check out FAQ559-520
Making the best use of this Forum. FAQ559-716
How to get answers to your SW questions. FAQ559-1091
Helpful SW websites every user should be aware of. FAQ559-520
RE: How can you update the Drawing Template via macro?
RE: How can you update the Drawing Template via macro?
You set the Template to None then Back to the Template...
CODE
Dim S As Sheet, SP() As Double, ST As String
With Application.SldWorks
Set S = .ActiveDoc.GetCurrentSheet
SP = S.GetProperties
ST = S.GetTemplateName
.ActiveDoc.SetupSheet4 S.GetName, SP(0), swDwgTemplateNone, SP(2), SP(3), SP(4), ST, SP(5), SP(6), "Default" ', True
.ActiveDoc.SetupSheet4 S.GetName, SP(0), swDwgTemplateCustom, SP(2), SP(3), SP(4), ST, SP(5), SP(6), "Default" ', True
End With
End Sub
When dealing with computers, there are 10 things you need to know: one, zero, and the rest is Binary.
-Josh S
RE: How can you update the Drawing Template via macro?
(There were not any replys when I started...)
Oh well...
Nice link though, I will give you a Star for the link (now bookmared
Thanks,
Josh
When dealing with computers, there are 10 things you need to know: one, zero, and the rest is Binary.
-Josh S