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

Hello

 

Some questions:

- There are 2 or more models referenced in your drawing?

- There is always only one relevant view on every sheet?

I think you don't need to activate each sheet in drawing. The referenced models are already opened in background if you have the drawing open. No need to open it again.

I have not tested, but try to do:

...

'Add Designed By Date
Dim invDesignDate As Property
For Each oSheet In invDraw.Sheets
    Set oDrawingView = oSheet.DrawingViews.Item(1)
    Set oModelDoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument
    Set oStatusSet = oModelDoc.PropertySets.Item("Design Tracking Properties")
    Set invDesignDate = oStatusSet.ItemByPropId(kCreationDateDesignTrackingProperties)
    invDesignDate.Value = Date
Next

 Save the drawing after all property operations with

invDraw.Save2

This will also save all dependent dirty documents.


R. Krieg
RKW Solutions
www.rkw-solutions.com