Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Inventor Title Block Date

Anonymous

Inventor Title Block Date

Anonymous
Not applicable

In AutoCAD, the date in the title block automatically changes to the current date whenever I save the drawing.  Is there a way to have the date in a Inventor 2D drawing title block do the same thing?  Normally I have to go and manually do this which just more extra steps I would like to avoid.

0 Likes
Reply
Accepted solutions (1)
2,687 Views
12 Replies
Replies (12)

bengee5454
Collaborator
Collaborator

You can make an iproperty with the current date, then add that to your title block.

 

Does this help?

0 Likes

Mark.Lancaster
Consultant
Consultant

@Anonymous

 

Welcome to the community..

 

You will have to create an iLogic code for this and then have it triggered on save.  Do you know how to write a iLogic code?

 

Also not saying you can't change the date every time you save..  Just wondering why you want to do this?

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

0 Likes

Anonymous
Not applicable

I am unfamiliar with creating iLogic Code.  Is there a tutorial that would help?  The company I work for wants the current date displayed on all 2D drawings whenever the drawing gets saved.  The date does not need to change if you are just opening the drawing to view it, but if you save the drawing, they want the day you hit the save button to automatically change the date in the title block.  Strange, but that's their rule.

0 Likes

Mark.Lancaster
Consultant
Consultant

@Anonymous

 

This code does a little more but it can be adapted to meet you needs.  I will also tag the author @Curtis_Waguespack..   He has an app for everything.  Smiley Wink

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

mcgyvr
Consultant
Consultant

It could be done as simple as this..

Open your drawing template file..

Create a new ilogic rule (called it "Saved Date" or whatever) and paste this into it..

SavedDate = Now
iProperties.Value("Status", "Checked By") = SavedDate
'update the file
InventorVb.DocumentUpdate()

The edit your titleblock to use the "Checked By" iproperty from the Status tab..

Then use the "Event Triggers" button in the ilogic tab to set that rule to run on the "Before Save" event..

 

This will throw the data and time even into the title block automatically.

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269

Anonymous
Not applicable

Hi, and thank you for your help.  I pasted the code as directed but received an error message that said the following:

 

Rule Compile Errors in Saved Date, in Drawing4

 

Error on Line 1 : End of statement expected.

 

Have I missed something?

0 Likes

Anonymous
Not applicable

I take back my previous reply.  I tried your fix again and it works.  Is there a modification I can make to remove the time stamp portion of the code?

0 Likes

mcgyvr
Consultant
Consultant
Accepted solution

@Anonymous

SyntaxEditor Code Snippet

SavedDate = Now.ToString("MM/dd/yyyy")
MessageBox.Show(SavedDate, "Title")

iProperties.Value("Status", "Checked By") = SavedDate
'update the file
InventorVb.DocumentUpdate()


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269

Anonymous
Not applicable

Thanks so much!  Great solution.

0 Likes

tobias.hammer
Explorer
Explorer

Would it be possible to leave out the pop up message box?

0 Likes

Frederick_Law
Mentor
Mentor

Comment it out.

Add ' in front of 

'MessageBox.Show(SavedDate, "Title")

 

tobias.hammer
Explorer
Explorer
Perfect, thank you mate!
0 Likes