Is it possible to insert current time just like ?

I have a note on my drawing that displays the current date a drawing was printed <SW-Short Date>, but I would also like the current time it
was printed. Is this possible with a default note, or will it involve inserting the time using a macro?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I have a note on my drawing that displays the current date a drawing was printed <SW-Short Date>, but I would also like the current time it was printed. Is this possible with a default note, or will it involve inserting the time using a macro?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I use the "footnote" (?) function in the print menu, and print date, time and file name of the printed doc.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
SW Monkey,
Do you want a static date and time that represents the last time the document was printed on the electronic document itself or do you want the time the document was printed to only show on the paper print.
Regards, Corey
Jean Marc wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

We create PDFs of our drawings. What I would like is a note that displays the current date/time that the PDF was created. We use the SolidWorks "Save As PDF" option. I can get the current date on the drawing by putting <SW-Short Date>, but how can I do the current time ?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
SW Monkey, I have the following in the border of the drawing: $PRP:"SW-Folder Name"$PRP:"SW-File Name" $PRP:"SW-Last Saved Date" $PRP:"SW-Last Saved By"
It looks like this: S:\acaddwg\MANUALS\DWG\TBEI1520manual Wednesday, December 20, 2006 1:34:30 PM bputnam
I think this shows the last time it was saved, not when it was printed. For us, this is close enough.
Brian
SW Monkey wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Well, that could be used to fake the Print Date, by making a macro that saves the drawing, rebuilds it (to update the linked note) and then prints it. Kinda around-about, but I think it would do what you are asking.
Matt
Brian Putnam wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Monkey,
Ok, I come up with the code to add Time stamp to your drawings, with some help from my VAR and from SW API Help. To make this work, add an annotation text with a link to the custom property "Print Time" ($PRP:"Print Time"). Once this note is on your template, simply run this macro (assign it to a toolbar icon or shortcut key). When you run this macro, it will update the time/date stamp on your drawing, then print it to the default printer. [If you wish to make sure you use the same printer each time, you will need to modify the Print instruction (PrintOut2) to callout the specific printer.]
Option Explicit
Public swApp As Object Dim retval As Boolean Dim bret As Boolean Dim Doc As Object
Sub main()
Dim swApp As Object Set swApp = CreateObject("SldWorks.Application") Set Doc = swApp.ActiveDoc
retval = Doc.DeleteCustomInfo("Print Time") retval = Doc.AddCustomInfo("Print Time", "Text", Now)
retval = Doc.ForceRebuild3(False)
bret = Doc.PrintOut2(0, 0, 1, False, 0, 0, False, 0)
End Sub
-------------------
SW Monkey wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
UPDATE: I've uploaded this code (with each function explained) to my site at:
http://sw.fcsuper.com/index.php?name=UpDownload&req=viewdownloaddetails&lidC
Matt
fcsuper wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Thanks for the code, but I still think it is simpler to use the Header / Footer button in the print dialog box. (previous post)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.