Example 1 - today.swb
This macro will enter the current date into your drawing.
Three things have to be done.
Edit your template and add a note that has a link to "Date completed" which is a custom property of the drawing file. You may want to read up on custom properties and how to create links to them. I have an online tutorial that may help. I hope you find it useful. It was written for another project, but the first half of it will make a good reference.
Use a macro to update the drawing's custom property "Date completed" to reflect the current date. The macro I used looks like this.
'
'**************************************************************
' today.swb written by Joe Jones of New Hampshire CAD 7/13/99
' www.nhcad.com Mechanical Design and Custom Programming
'
'**************************************************************
Dim swApp As Object
Dim DrawingDoc As Object
Sub main()
Set swApp = CreateObject ("SldWorks.Application")
Set DrawingDoc = swApp.ActiveDoc
retval = DrawingDoc.DeleteCustomInfo("Date completed")
retval = DrawingDoc.AddCustomInfo("Date completed", "Date", Str(Date))
DrawingDoc.EditRebuild
End Sub
When you run the macro, it should update the custom property which in turn will update the note in your border template. While it seems like a round-about way to do it, the nice thing is the macro doesn't have to worry about what size borders you have or where the note is placed.
The only thing left to do is create a menu item or assign a key (or keys) to run the macro.