Update the current date in drawing with iLogic

Update the current date in drawing with iLogic

Anonymous
Not applicable
2,431 Views
4 Replies
Message 1 of 5

Update the current date in drawing with iLogic

Anonymous
Not applicable

Hello

 

I am making a drawing, i is there a way to make a auto update od the date in titel block or text?

 

0 Likes
Accepted solutions (1)
2,432 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Yes

 

If (ThisDoc.Document.DocumentType <> kDrawingDocumentObject) Then Return
Dim odrawdoc As DrawingDocument
odrawdoc = ThisDoc.Document
If (odrawdoc Is Nothing) Then Return

customPropertySet=odrawdoc.PropertySets.Item("Inventor User Defined Properties")

iProperties.Value("Project", "Creation Date")=Now

InventorVb.DocumentUpdate()
Message 3 of 5

Anonymous
Not applicable

thak ypu for your reply

 

can you tell me how can i use the rule

 

when i run it, nothing happens

0 Likes
Message 4 of 5

rossano_praderi
Collaborator
Collaborator

Hi Aleksandar,

try this piece of code

 

If (ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then
iProperties.Value("Project", "Creation Date") = Now.ToShortDateString()
iLogicVb.UpdateWhenDone = True
end if

Let me know if you have any troubles with it.

 

 

Bregs

Rossano Praderi

 

 



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes
Message 5 of 5

edwin.davidU9BPU
Explorer
Explorer
Accepted solution
oTime = Now.ToShortDateString
iProperties.Value("Project", "Creation Date") = oTime
iLogicVb.UpdateWhenDone = True
0 Likes