DATE LAST PRINTED

DATE LAST PRINTED

rjkdk
Enthusiast Enthusiast
294 Views
3 Replies
Message 1 of 4

DATE LAST PRINTED

rjkdk
Enthusiast
Enthusiast

Is there a method by which I can add a note to an inventor drawing which would give the information such as    " Last printed on ______"

0 Likes
295 Views
3 Replies
Replies (3)
Message 2 of 4

johan.degreef
Advisor
Advisor

Past this code in your (template) drawing ilogic rules "Plotdatestamp", and let it run on new document and before each save. It is not really printed on, but rather lastsaved on.

 

 

 

'define the drawing
Dim odrawdoc As DrawingDocument
odrawdoc = ThisApplication.ActiveDocument
'define the property set
customPropertySet = odrawdoc.PropertySets.Item("Inventor User Defined Properties")

'define the date string
Dim PlotDate As Date
PlotDate = Now
'define the time string
Dim PlotTime As String
PlotTime = Now.ToShortTimeString
'define the user name string
Dim PlotName As String
PlotName= ThisApplication.UserName

'---------------- find or create custom properties -------------
'look for the custom propety and add it if not found 
Try
      prop = customPropertySet.Item("Plotdatestamp")
Catch
      customPropertySet.Add("", "Plotdatestamp")
End Try

'look for the custom propety and add it if not found 
Try
      prop = customPropertySet.Item("Plottimestamp")
Catch
      customPropertySet.Add("", "Plottimestamp")
End Try

'look for the custom propety and add it if not found 
Try
	prop = customPropertySet.Item("PlotAuthor")
Catch
	customPropertySet.Add("", "PlotAuthor")
End Try

'---------------- set the property values -----------------------
'set the date property
iProperties.Value("Custom", "Plotdatestamp") = PlotDate
'set the timeproperty
iProperties.Value("Custom", "Plottimestamp") = PlotTime
'set the name property	
iProperties.Value("Custom", "PlotAuthor") = PlotName
	
'update the file 
InventorVb.DocumentUpdate()

 

 

 

 

 

 

 

 Then paste this in the border of your drawing template

 

Knipsel.JPG

 

Knipsel.JPG

Inventor 2025, Vault Professional 2025, Autocad Plant 3D 2025
0 Likes
Message 3 of 4

pball
Mentor
Mentor

If you're willing to go as far as making an Addin this is possible to add text before printing and remove it after it's printed. I have an addin that does just this and adds the date and username of who printed it. It also adds that stamp when a drawing is exported as a DWG/DXF/PDF.

 

As for with iLogic it's not exactly possible. But I made an idea post to have an on print iLogic trigger so please vote for it.

https://forums.autodesk.com/t5/inventor-ideas/ilogic-event-trigger-before-print/idi-p/5105480

Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style
0 Likes
Message 4 of 4

rjkdk
Enthusiast
Enthusiast
Thanks
0 Likes