i try to check if the drawing views of a draft are up to date. Here is my code:
Private Function UpToDate(filename As String) As Boolean UpToDate = True Dim draft As SolidEdgeDraft.DraftDocument draft = DirectCast(System.Runtime.InteropServices.Marshal.BindToMoniker(filename), SolidEdgeDraft.DraftDocument) 'draft = objApp.Documents.Open(filename) 'Is the draft uptodate? For Each objSheet As SolidEdgeDraft.Sheet In draft.Sections.WorkingSection.Sheets For Each objDrawingview As SolidEdgeDraft.DrawingView In objSheet.DrawingViews If Not objDrawingview.IsUpToDate Then UpToDate = False Exit For End If Next objDrawingview If Not UpToDate Then Exit For Next objSheet 'draft.Close() draft = Nothing Return UpToDate End Function
The function always returns true, even if the drawing is not up to date.
If i really open the draft (uncomment the two lines and comment the "BindToMoniker" line) everything works fine, but needs a lot of time.
Greetings from Germany
Solved! Go to Solution.
I just wrote a test case and confirmed what you're seeing. Sure seems like a bug and really unfortunate if it is. I'd really like to hear why we're seeing it work differently in this case. Next logical step is to submit an IR with GTAC.
Interesting. I suppose when the UI is visible, Activate() is invoked automatically...? We can only speculate. Glad you figured out a workaround. Good detective work!