@bradeneuropeArthurwrote:
what framework version are you using:
.NET Framework:
.NET Framework Version 4.7 or later.
Is recommended for 2019 of inventor.
I didn't realize I wasn't using the latest framework but made no difference when I tried 4.7.2.
I also compiled and ran my sample on my home computer and still will not work on 2019 files.
This is my VB.net test code. Just needs a form with text boxes named FileNameTextBox and TitleTextBox and a button named TestButton . Here is a link to the test exe ApprenticeServerWindowsApp.exe
I am hoping someone can test this... I am officially out of ideas.
Imports Inventor
Public Class Form1
Private Sub TestButton_Click(sender As Object, e As EventArgs) Handles TestButton.Click
Dim OpenFileDialog As New OpenFileDialog With {
.Filter = "(Inventor drawing)|*.idw"
}
If OpenFileDialog.ShowDialog() = DialogResult.OK Then
Dim strm As System.IO.Stream = OpenFileDialog.OpenFile()
Dim FilePath As String = OpenFileDialog.FileName.ToString()
FileNameTextBox.Text = FilePath
Try
Dim oApprentice As New Inventor.ApprenticeServerComponent
Dim oApprenticeDrawingDoc As Inventor.ApprenticeServerDrawingDocument = oApprentice.Open(FilePath)
' Obtain the PropertySets collection
Dim oPropsets As PropertySets = oApprenticeDrawingDoc.PropertySets
Dim oPropSet As PropertySet = oPropsets.Item("Design Tracking Properties")
oPropSet = oPropsets.Item("Summary Information")
Dim Title As String = oPropSet.Item("Title").Value
TitleTextBox.Text = Title
oApprenticeDrawingDoc.Close()
Catch ex2 As Exception
MsgBox(FilePath & " - " & ex2.ToString)
End Try
End If
End Sub
End Class