09-16-2021
07:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-16-2021
07:44 AM
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
NextSave the drawing after all property operations with
invDraw.Save2This will also save all dependent dirty documents.
R. Krieg
RKW Solutions
www.rkw-solutions.com