Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I just created little script to update creation time (or other) iProperty of all parts within assembly to current date.
I hope it will be useful for someone
It is simple script and tbh first one that is working 🙂 , if you have any comments how to improve it I will gladly read them.
Dim oDoc As Document
' Define the document
Dim oAssy As Document = ThisApplication.ActiveDocument
Dim allDocs As DocumentsEnumerator = oAssy.AllReferencedDocuments
'Try to update assembly date
Try
oAssy.PropertySets.Item(3).Item(1).Value() = Date.Today.AddDays(0)
Catch
End Try
For Each oDoc In allDocs
Dim oPropSets As PropertySets = oDoc.PropertySets
Dim oDesTrackProps As PropertySet = oPropSets.Item(3)
'Try to update part date
Try
oDesTrackProps.Item(1).Value() = Date.Today.AddDays(0)
Catch
End Try
Next
Solved! Go to Solution.