Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic to VBA Creation Date .idw

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
548 Views, 4 Replies

iLogic to VBA Creation Date .idw

Hello,

 

How can i convert this iLogic code to VBA? i want to change .idw files Creation Date NOW with VBA code.

 

File-iproperties-creation date- NOW

 

Could you please help me? or which VBA code should i use?

 

Thanks

 

oTime = Now.ToShortDateString
iProperties.Value("Project", "Creation Date") = oTime
iLogicVb.UpdateWhenDone = True
End Sub

4 REPLIES 4
Message 2 of 5
bradeneuropeArthur
in reply to: Anonymous

Public Sub main()

'Dim oTime As String
'oTime = Now
'
''oTime.

Dim LValue As String

LValue = Format(Now, "dd/MMM/yy")

MsgBox LValue
MsgBox ThisDocument.PropertySets.Item(3).Item("Creation Time").Value
ThisDocument.PropertySets.Item(3).Item("Creation Time").Value = LValue

End Sub

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 3 of 5
Anonymous
in reply to: bradeneuropeArthur

Thanks for reply. It appears only a message  when i run the VBA code. It can not change the .idw files' creaton date. Long way to change the creaton date is : FILE-IPROPERTIES-PROJECT-CREATON DATE-NOW I want it to change with VBA code.
Message 4 of 5
bradeneuropeArthur
in reply to: Anonymous

Don't understand your last message!

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 5 of 5
Anonymous
in reply to: bradeneuropeArthur

I want to change the creation date with VBA code at below picture.

 

A.jpg

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

Post to forums  

Autodesk Design & Make Report