Message 1 of 1
GetDWGDocumentReferences with bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I tried use GetDWGDocumentReferences for part with import acad. But GetDWGDocumentReferences return exception.
File attached for test. Its bug?
Any ideas?
Sub Main() Dim InvApp As Application = GetInventorApplication() Dim FM As FileManager = InvApp.FileManager Dim TestFile As String = "D:\Part10.ipt" Dim str() As String = FM.GetDWGDocumentReferences(TestFile) Console.ReadKey() End Sub 'Функция получения ссылки на Inventor Function GetInventorApplication() As Application Dim InvApp As Application Try 'Попытка присоединится к загруженному в память Inventor InvApp = CType(Marshal.GetActiveObject("Inventor.Application"), Application) Catch ex As Exception 'Загрузка Inventor в память и присоединение к нему Dim InvType As Type = Type.GetTypeFromProgID("Inventor.Application") InvApp = CType(Activator.CreateInstance(InvType), Application) InvApp.Visible = True End Try Return InvApp End Function