Try
If oDoc.ComponentDefinition.IsiAssemblyMember = False Then
End If
Catch ex As Exception
MsgBox("5 ComponentDefinition не существует. Аварийное отключение программы!")
Exit Sub
End Try
m_inventorApplication.SilentOperation = True ' Блокирует все запросы подтверждения
Call oDoc.SaveAs(noName, True) ' Сохраняем элемент под новым именем
Try
If oDoc.ComponentDefinition.IsiAssemblyMember = False Then
End If
Catch ex As Exception
MsgBox("6 ComponentDefinition не существует. Аварийное отключение программы!")
Exit Sub
End Try
If m_inventorApplication.ActiveDocument.FullFileName = noName Then
oDoc = m_inventorApplication.ActiveDocument
Else
Try
oDoc = m_inventorApplication.Documents.ItemByName(noName) ' теряет ComponentDefinition
Try
If oDoc.ComponentDefinition.IsiAssemblyMember = False Then
End If
Catch ex1 As Exception
MsgBox("7 ComponentDefinition не существует. Аварийное отключение программы!")
Exit Sub
End Try
Catch ex As Exception
oDoc = m_inventorApplication.Documents.Open(noName, False)
Try
If oDoc.ComponentDefinition.IsiAssemblyMember = False Then
End If
Catch ex1 As Exception
MsgBox("8 ComponentDefinition не существует. Аварийное отключение программы!")
Exit Sub
End Try
End Try
End If