Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor Title Block Date

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
Anonymous
2485 Views, 12 Replies

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

Inventor Title Block Date

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.

12 REPLIES 12
Message 2 of 13
bengee5454
in reply to: Anonymous

bengee5454
Collaborator
Collaborator

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

 

Does this help?

0 Likes

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

 

Does this help?

Message 3 of 13
Mark.Lancaster
in reply to: bengee5454

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

 

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.

Message 4 of 13
Anonymous
in reply to: Mark.Lancaster

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

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.

Message 5 of 13
Mark.Lancaster
in reply to: Anonymous

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.

@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.

Message 6 of 13
mcgyvr
in reply to: Anonymous

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

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
Message 7 of 13
Anonymous
in reply to: mcgyvr

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

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?

Message 8 of 13
Anonymous
in reply to: mcgyvr

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

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?

Message 9 of 13
mcgyvr
in reply to: Anonymous

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

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
Message 10 of 13
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

Thanks so much!  Great solution.

0 Likes

Thanks so much!  Great solution.

Message 11 of 13
tobias.hammer
in reply to: mcgyvr

tobias.hammer
Explorer
Explorer

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

0 Likes

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

Message 12 of 13
Frederick_Law
in reply to: Anonymous

Frederick_Law
Mentor
Mentor

Comment it out.

Add ' in front of 

'MessageBox.Show(SavedDate, "Title")

 

Comment it out.

Add ' in front of 

'MessageBox.Show(SavedDate, "Title")

 

Message 13 of 13

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

Perfect, thank you mate!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report