Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
A.Acheson
in reply to: Anonymous

It seems this line is the issue.  You had not accessed the text  to initiate the replacement. 

oRow.Item("DATE") = Now

I changed this line to get it to work. 

oRow.Item("DATE").Text = Now

 

I used this link to trace the issue

https://forums.autodesk.com/t5/inventor-customization/ilogic-revision-tables/td-p/7548318

 

Here is another way to write this statement and declares the RevisionTableCell

Dim oDoc As Document = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDoc.ActiveSheet
Dim oTable As RevisionTable = oSheet.RevisionTables.Item(1)
Dim oRows As RevisionTableRows = oTable.RevisionTableRows
Dim oRow As RevisionTableRow = oRows.Item(oRows.Count)

Dim oCell4 As RevisionTableCell
'Get Cell to modify, Use ("Date") or (4) is date Column# counted from the left
oCell4 = oRow.Item("Date")
oCell4.Text = Now.ToShortDateString 
MsgBox("Revision Date: " & oCell4.Text)

Here is a few more date related formatting that could be useful.

 

'This will use computers default date formatting which maybe standardized across multiple applications by your IT department.
MessageBox.Show(Today, "Title")

'https://forums.autodesk.com/t5/Inventor-forum/ilogic-Date-format/td-p/2720101
'This allows a customization of the date by changing string variable e.g "d","F"
MessageBox.Show(DateTime.Now.ToString("D"), "Title")
MessageBox.Show(DateTime.Now.ToString("F"), "Title")
'Search bewlow page to sub heading "Format strings and DateTimeFormatInfo properties" this will customize date format 
'https://docs.microsoft.com/en-us/dotnet/api/system.globalization.datetimeformatinfo?view=net-5.0

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan