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

Added some loop to go over all drawing views in all sheets, the following code only contains the case that setting iProperty of top level of the reference document of the drawing view, but not the occurrences  or sub occurrences of the referenced document if it is an assembly document. There need be some change if you need the function implemented on all level sub occurrences.

 

Sub Entrance()
Dim oDwgDoc As DrawingDocument
Set oDwgDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
Dim oDrawingView As DrawingView
Dim oModelDoc As Document

For Each oSheet In oDwgDoc.Sheets
oSheet.Activate
For Each oDrawingView In oSheet.DrawingViews
Set oModelDoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument
ClearDate oModelDoc
Next
Next
End Sub

 

Sub ClearDate(oDoc As Document)
' Get the PropertySets object.
Dim oPropSets As PropertySets
Set oPropSets = oDoc.PropertySets

' Get the design tracking property set.
Dim oPropSet As PropertySet
'Set oPropSet = oPropSets.Item("Design Tracking Properties")

oPropSets.Item("Design Tracking Properties").Item("Date Checked").Value = "01.01.1601 01:00:00"
End Sub




Jane Fan
Inventor QA Engineer